void RenderNamedFlowFragment::updateLogicalHeight() { RenderRegion::updateLogicalHeight(); if (!hasAutoLogicalHeight()) return; // We want to update the logical height based on the computed auto-height // only after the measure cotnent layout phase when all the // auto logical height regions have a computed auto-height. if (m_flowThread->inMeasureContentLayoutPhase()) return; // There may be regions with auto logical height that during the prerequisite layout phase // did not have the chance to layout flow thread content. Because of that, these regions do not // have a computedAutoHeight and they will not be able to fragment any flow // thread content. if (!hasComputedAutoHeight()) return; LayoutUnit newLogicalHeight = computedAutoHeight() + borderAndPaddingLogicalHeight(); ASSERT(newLogicalHeight < RenderFlowThread::maxLogicalHeight()); if (newLogicalHeight > logicalHeight()) { setLogicalHeight(newLogicalHeight); // Recalculate position of the render block after new logical height is set. // (needed in absolute positioning case with bottom alignment for example) RenderRegion::updateLogicalHeight(); } }
void RenderRegion::updateLogicalHeight() { RenderBlock::updateLogicalHeight(); if (!hasAutoLogicalHeight()) return; // We want to update the logical height based on the computed auto-height // only if the view is in the layout phase in which all the // auto logical height regions have a computed auto-height. if (!m_flowThread->inConstrainedLayoutPhase()) return; // There may be regions with auto logical height that during the prerequisite layout phase // did not have the chance to layout flow thread content. Because of that, these regions do not // have a computedAutoHeight and they will not be able to fragment any flow // thread content. if (!hasComputedAutoHeight()) return; LayoutUnit autoHeight = hasOverrideHeight() ? overrideLogicalContentHeight() : computedAutoHeight(); LayoutUnit newLogicalHeight = autoHeight + borderAndPaddingLogicalHeight(); ASSERT(newLogicalHeight < LayoutUnit::max() / 2); if (newLogicalHeight > logicalHeight()) setLogicalHeight(newLogicalHeight); }
LayoutUnit RenderNamedFlowFragment::pageLogicalHeight() const { ASSERT(isValid()); if (hasComputedAutoHeight() && m_flowThread->inMeasureContentLayoutPhase()) { ASSERT(hasAutoLogicalHeight()); return computedAutoHeight(); } return m_flowThread->isHorizontalWritingMode() ? contentHeight() : contentWidth(); }
LayoutUnit RenderRegion::logicalHeightOfAllFlowThreadContent() const { ASSERT(m_flowThread); if (hasComputedAutoHeight() && !m_flowThread->inConstrainedLayoutPhase()) { ASSERT(hasAutoLogicalHeight()); return computedAutoHeight(); } return m_flowThread->isHorizontalWritingMode() ? contentHeight() : contentWidth(); }