Changeset 161553 in webkit
- Timestamp:
- Jan 9, 2014 4:06:21 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r161551 r161553 1 2014-01-09 Andrei Bucur <abucur@adobe.com> 2 3 [CSSRegions] Move regions auto-size code into RenderNamedFlowFragment 4 https://bugs.webkit.org/show_bug.cgi?id=122959 5 6 Reviewed by Mihnea Ovidenie. 7 8 Move the auto-height logic from RenderRegion to RenderNamedFlowFragment because it's 9 used only by the CSS Regions implementation. 10 11 Bug 126642 covers the auto-height logic move from RenderFlowThread to RenderNamedFlowThread. 12 13 Tests: No new tests, just refactorings. 14 15 * rendering/RenderFlowThread.cpp: 16 (WebCore::RenderFlowThread::styleDidChange): 17 (WebCore::RenderFlowThread::validateRegions): 18 (WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent): 19 (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight): 20 (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout): 21 (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect): 22 (WebCore::RenderFlowThread::addForcedRegionBreak): 23 * rendering/RenderMultiColumnSet.h: 24 * rendering/RenderNamedFlowFragment.cpp: 25 (WebCore::RenderNamedFlowFragment::RenderNamedFlowFragment): 26 (WebCore::RenderNamedFlowFragment::styleDidChange): 27 (WebCore::RenderNamedFlowFragment::incrementAutoLogicalHeightCount): 28 (WebCore::RenderNamedFlowFragment::decrementAutoLogicalHeightCount): 29 (WebCore::RenderNamedFlowFragment::updateRegionHasAutoLogicalHeightFlag): 30 (WebCore::RenderNamedFlowFragment::updateLogicalHeight): 31 (WebCore::RenderNamedFlowFragment::pageLogicalHeight): 32 (WebCore::RenderNamedFlowFragment::layoutBlock): 33 (WebCore::RenderNamedFlowFragment::attachRegion): 34 (WebCore::RenderNamedFlowFragment::detachRegion): 35 * rendering/RenderNamedFlowFragment.h: 36 * rendering/RenderRegion.cpp: 37 (WebCore::RenderRegion::RenderRegion): 38 (WebCore::RenderRegion::pageLogicalHeight): 39 (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent): 40 (WebCore::RenderRegion::isLastRegion): 41 (WebCore::RenderRegion::styleDidChange): 42 (WebCore::RenderRegion::attachRegion): 43 (WebCore::RenderRegion::detachRegion): 44 * rendering/RenderRegion.h: 45 * rendering/RenderRegionSet.h: 46 * rendering/RenderTreeAsText.cpp: 47 (WebCore::writeRenderRegionList): 48 1 49 2014-01-09 Antti Koivisto <antti@apple.com> 2 50 -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r161443 r161553 174 174 // because the auto-height regions don't have their height computed yet. 175 175 if (inMeasureContentLayoutPhase() && region->hasAutoLogicalHeight()) { 176 region->setComputedAutoHeight(region->maxPageLogicalHeight()); 176 RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region); 177 namedFlowFragment->setComputedAutoHeight(namedFlowFragment->maxPageLogicalHeight()); 177 178 m_regionsHaveUniformLogicalHeight = false; 178 179 } … … 917 918 end = m_regionList.end(); regionIter != end; ++regionIter) { 918 919 RenderRegion* region = *regionIter; 919 if (region->hasAutoLogicalHeight()) 920 region->setComputedAutoHeight(region->maxPageLogicalHeight()); 920 if (region->hasAutoLogicalHeight()) { 921 RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region); 922 namedFlowFragment->setComputedAutoHeight(namedFlowFragment->maxPageLogicalHeight()); 923 } 921 924 } 922 925 } … … 961 964 // If we find an empty auto-height region, clear the computedAutoHeight value. 962 965 if (emptyRegionsSegment && region->hasAutoLogicalHeight()) 963 region->clearComputedAutoHeight();966 toRenderNamedFlowFragment(region)->clearComputedAutoHeight(); 964 967 965 968 LayoutUnit regionLogicalWidth = region->pageLogicalWidth(); … … 1023 1026 1024 1027 if (region->hasAutoLogicalHeight()) { 1028 RenderNamedFlowFragment* namedFlowFragment = toRenderNamedFlowFragment(region); 1029 1025 1030 // A forced break can appear only in an auto-height region that didn't have a forced break before. 1026 1031 // This ASSERT is a good-enough heuristic to verify the above condition. 1027 ASSERT( region->maxPageLogicalHeight() == region->computedAutoHeight());1028 1029 mapToUse.set(breakChild, region);1032 ASSERT(namedFlowFragment->maxPageLogicalHeight() == namedFlowFragment->computedAutoHeight()); 1033 1034 mapToUse.set(breakChild, namedFlowFragment); 1030 1035 1031 1036 hasComputedAutoHeight = true; 1032 1037 1033 1038 // Compute the region height pretending that the offsetBreakInCurrentRegion is the logicalHeight for the auto-height region. 1034 LayoutUnit regionComputedAutoHeight = region->constrainContentBoxLogicalHeightByMinMax(offsetBreakInCurrentRegion);1039 LayoutUnit regionComputedAutoHeight = namedFlowFragment->constrainContentBoxLogicalHeightByMinMax(offsetBreakInCurrentRegion); 1035 1040 1036 1041 // The new height of this region needs to be smaller than the initial value, the max height. A forced break is the only way to change the initial 1037 1042 // height of an auto-height region besides content ending. 1038 ASSERT(regionComputedAutoHeight <= region->maxPageLogicalHeight());1039 1040 region->setComputedAutoHeight(regionComputedAutoHeight);1043 ASSERT(regionComputedAutoHeight <= namedFlowFragment->maxPageLogicalHeight()); 1044 1045 namedFlowFragment->setComputedAutoHeight(regionComputedAutoHeight); 1041 1046 1042 1047 currentRegionOffsetInFlowThread += regionComputedAutoHeight; -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.h
r159609 r161553 110 110 // FIXME: This will change once we have column sets constrained by enclosing pages, etc. 111 111 virtual LayoutUnit logicalHeightOfAllFlowThreadContent() const OVERRIDE { return m_computedColumnHeight; } 112 113 // FIXME: For now we return false, but it's likely we will leverage the auto height region code to do column114 // balancing. That's why we have an override of this function that is distinct from RenderRegionSet's override.115 virtual bool shouldHaveAutoLogicalHeight() const OVERRIDE { return false; }116 112 117 113 virtual void repaintFlowThreadContent(const LayoutRect& repaintRect, bool immediate) OVERRIDE; -
trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp
r160905 r161553 39 39 #include "StyleResolver.h" 40 40 41 #include <wtf/StackStats.h> 42 41 43 namespace WebCore { 42 44 … … 44 46 : RenderRegion(document, std::move(style), nullptr) 45 47 , m_hasCustomRegionStyle(false) 48 , m_hasAutoLogicalHeight(false) 49 , m_hasComputedAutoHeight(false) 50 , m_computedAutoHeight(0) 46 51 { 47 52 } … … 79 84 } 80 85 86 updateRegionHasAutoLogicalHeightFlag(); 87 81 88 checkRegionStyle(); 82 89 … … 95 102 } 96 103 104 void RenderNamedFlowFragment::incrementAutoLogicalHeightCount() 105 { 106 ASSERT(isValid()); 107 ASSERT(m_hasAutoLogicalHeight); 108 109 m_flowThread->incrementAutoLogicalHeightRegions(); 110 } 111 112 void RenderNamedFlowFragment::decrementAutoLogicalHeightCount() 113 { 114 ASSERT(isValid()); 115 116 m_flowThread->decrementAutoLogicalHeightRegions(); 117 } 118 119 void RenderNamedFlowFragment::updateRegionHasAutoLogicalHeightFlag() 120 { 121 ASSERT(m_flowThread); 122 123 if (!isValid()) 124 return; 125 126 bool didHaveAutoLogicalHeight = m_hasAutoLogicalHeight; 127 m_hasAutoLogicalHeight = shouldHaveAutoLogicalHeight(); 128 if (m_hasAutoLogicalHeight != didHaveAutoLogicalHeight) { 129 if (m_hasAutoLogicalHeight) 130 incrementAutoLogicalHeightCount(); 131 else { 132 clearComputedAutoHeight(); 133 decrementAutoLogicalHeightCount(); 134 } 135 } 136 } 137 138 void RenderNamedFlowFragment::updateLogicalHeight() 139 { 140 RenderRegion::updateLogicalHeight(); 141 142 if (!hasAutoLogicalHeight()) 143 return; 144 145 // We want to update the logical height based on the computed auto-height 146 // only after the measure cotnent layout phase when all the 147 // auto logical height regions have a computed auto-height. 148 if (m_flowThread->inMeasureContentLayoutPhase()) 149 return; 150 151 // There may be regions with auto logical height that during the prerequisite layout phase 152 // did not have the chance to layout flow thread content. Because of that, these regions do not 153 // have a computedAutoHeight and they will not be able to fragment any flow 154 // thread content. 155 if (!hasComputedAutoHeight()) 156 return; 157 158 LayoutUnit newLogicalHeight = computedAutoHeight() + borderAndPaddingLogicalHeight(); 159 ASSERT(newLogicalHeight < RenderFlowThread::maxLogicalHeight()); 160 if (newLogicalHeight > logicalHeight()) { 161 setLogicalHeight(newLogicalHeight); 162 // Recalculate position of the render block after new logical height is set. 163 // (needed in absolute positioning case with bottom alignment for example) 164 RenderRegion::updateLogicalHeight(); 165 } 166 } 167 168 LayoutUnit RenderNamedFlowFragment::pageLogicalHeight() const 169 { 170 ASSERT(m_flowThread); 171 if (hasComputedAutoHeight() && m_flowThread->inMeasureContentLayoutPhase()) { 172 ASSERT(hasAutoLogicalHeight()); 173 return computedAutoHeight(); 174 } 175 return m_flowThread->isHorizontalWritingMode() ? contentHeight() : contentWidth(); 176 } 177 178 // This method returns the maximum page size of a region with auto-height. This is the initial 179 // height value for auto-height regions in the first layout phase of the parent named flow. 97 180 LayoutUnit RenderNamedFlowFragment::maxPageLogicalHeight() const 98 181 { … … 104 187 const RenderStyle& styleToUse = parent()->style(); 105 188 return styleToUse.logicalMaxHeight().isUndefined() ? RenderFlowThread::maxLogicalHeight() : toRenderBlock(parent())->computeReplacedLogicalHeightUsing(styleToUse.logicalMaxHeight()); 189 } 190 191 void RenderNamedFlowFragment::layoutBlock(bool relayoutChildren, LayoutUnit) 192 { 193 StackStats::LayoutCheckPoint layoutCheckPoint; 194 RenderRegion::layoutBlock(relayoutChildren); 195 196 if (isValid()) { 197 LayoutRect oldRegionRect(flowThreadPortionRect()); 198 if (!isHorizontalWritingMode()) 199 oldRegionRect = oldRegionRect.transposedRect(); 200 201 if (m_flowThread->inOverflowLayoutPhase() || m_flowThread->inFinalLayoutPhase()) 202 computeOverflowFromFlowThread(); 203 204 if (hasAutoLogicalHeight() && m_flowThread->inMeasureContentLayoutPhase()) { 205 m_flowThread->invalidateRegions(); 206 clearComputedAutoHeight(); 207 return; 208 } 209 210 if ((oldRegionRect.width() != pageLogicalWidth() || oldRegionRect.height() != pageLogicalHeight()) && !m_flowThread->inFinalLayoutPhase()) 211 // This can happen even if we are in the inConstrainedLayoutPhase and it will trigger a pathological layout of the flow thread. 212 m_flowThread->invalidateRegions(); 213 } 106 214 } 107 215 … … 278 386 } 279 387 388 void RenderNamedFlowFragment::attachRegion() 389 { 390 RenderRegion::attachRegion(); 391 392 if (documentBeingDestroyed() || !m_flowThread) 393 return; 394 395 // The region just got attached to the flow thread, lets check whether 396 // it has region styling rules associated. 397 checkRegionStyle(); 398 399 if (!isValid()) 400 return; 401 402 m_hasAutoLogicalHeight = shouldHaveAutoLogicalHeight(); 403 if (hasAutoLogicalHeight()) 404 incrementAutoLogicalHeightCount(); 405 } 406 407 void RenderNamedFlowFragment::detachRegion() 408 { 409 if (m_flowThread && hasAutoLogicalHeight()) 410 decrementAutoLogicalHeightCount(); 411 412 RenderRegion::detachRegion(); 413 } 414 280 415 } // namespace WebCore -
trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h
r160905 r161553 58 58 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OVERRIDE; 59 59 60 virtual LayoutUnit maxPageLogicalHeight() const; 60 virtual LayoutUnit pageLogicalHeight() const; 61 LayoutUnit maxPageLogicalHeight() const; 61 62 62 63 bool isPseudoElementRegion() const { return parent() && parent()->isPseudoElement(); } … … 80 81 RenderNamedFlowThread* namedFlowThread() const; 81 82 83 virtual bool hasAutoLogicalHeight() const OVERRIDE { return m_hasAutoLogicalHeight; } 84 85 LayoutUnit computedAutoHeight() const { return m_computedAutoHeight; } 86 87 void setComputedAutoHeight(LayoutUnit computedAutoHeight) 88 { 89 m_hasComputedAutoHeight = true; 90 m_computedAutoHeight = computedAutoHeight; 91 } 92 93 void clearComputedAutoHeight() 94 { 95 m_hasComputedAutoHeight = false; 96 m_computedAutoHeight = 0; 97 } 98 99 bool hasComputedAutoHeight() const { return m_hasComputedAutoHeight; } 100 101 virtual void attachRegion() OVERRIDE; 102 virtual void detachRegion() OVERRIDE; 103 104 virtual void updateLogicalHeight() OVERRIDE; 105 82 106 // FIXME: Temporarily public until we move all the CSSRegions functionality from RenderRegion to here. 83 107 public: … … 85 109 86 110 private: 87 virtual bool shouldHaveAutoLogicalHeight() const OVERRIDE;88 111 virtual const char* renderName() const OVERRIDE { return "RenderNamedFlowFragment"; } 89 112 … … 91 114 void computeChildrenStyleInRegion(const RenderElement*); 92 115 void setObjectStyleInRegion(RenderObject*, PassRefPtr<RenderStyle>, bool objectRegionStyleCached); 116 117 void updateRegionHasAutoLogicalHeightFlag(); 118 119 void incrementAutoLogicalHeightCount(); 120 void decrementAutoLogicalHeightCount(); 121 122 bool shouldHaveAutoLogicalHeight() const; 123 124 virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) OVERRIDE; 93 125 94 126 struct ObjectRegionStyleInfo { … … 107 139 108 140 bool m_hasCustomRegionStyle : 1; 141 bool m_hasAutoLogicalHeight : 1; 142 bool m_hasComputedAutoHeight : 1; 143 144 LayoutUnit m_computedAutoHeight; 109 145 }; 110 146 -
trunk/Source/WebCore/rendering/RenderRegion.cpp
r160979 r161553 45 45 #include "RenderView.h" 46 46 #include "StyleResolver.h" 47 #include <wtf/StackStats.h>48 47 49 48 namespace WebCore { … … 54 53 , m_parentNamedFlowThread(0) 55 54 , m_isValid(false) 56 , m_hasAutoLogicalHeight(false)57 , m_hasComputedAutoHeight(false)58 , m_computedAutoHeight(0)59 55 { 60 56 } … … 65 61 , m_parentNamedFlowThread(0) 66 62 , m_isValid(false) 67 , m_hasAutoLogicalHeight(false)68 , m_hasComputedAutoHeight(false)69 , m_computedAutoHeight(0)70 63 { 71 64 } … … 129 122 { 130 123 ASSERT(m_flowThread); 131 if (hasComputedAutoHeight() && m_flowThread->inMeasureContentLayoutPhase()) {132 ASSERT(hasAutoLogicalHeight());133 return computedAutoHeight();134 }135 124 return m_flowThread->isHorizontalWritingMode() ? contentHeight() : contentWidth(); 136 125 } 137 126 138 // This method returns the maximum page size of a region with auto-height. This is the initial139 // height value for auto-height regions in the first layout phase of the parent named flow.140 LayoutUnit RenderRegion::maxPageLogicalHeight() const141 {142 ASSERT(m_flowThread);143 ASSERT(hasAutoLogicalHeight() && m_flowThread->inMeasureContentLayoutPhase());144 return style().logicalMaxHeight().isUndefined() ? RenderFlowThread::maxLogicalHeight() : computeReplacedLogicalHeightUsing(style().logicalMaxHeight());145 }146 147 127 LayoutUnit RenderRegion::logicalHeightOfAllFlowThreadContent() const 148 128 { 149 ASSERT(m_flowThread); 150 if (hasComputedAutoHeight() && m_flowThread->inMeasureContentLayoutPhase()) { 151 ASSERT(hasAutoLogicalHeight()); 152 return computedAutoHeight(); 153 } 154 return m_flowThread->isHorizontalWritingMode() ? contentHeight() : contentWidth(); 129 return pageLogicalHeight(); 155 130 } 156 131 … … 248 223 return m_flowThread->lastRegion() == this; 249 224 } 250 251 void RenderRegion::incrementAutoLogicalHeightCount()252 {253 ASSERT(isValid());254 ASSERT(m_hasAutoLogicalHeight);255 256 m_flowThread->incrementAutoLogicalHeightRegions();257 }258 259 void RenderRegion::decrementAutoLogicalHeightCount()260 {261 ASSERT(isValid());262 263 m_flowThread->decrementAutoLogicalHeightRegions();264 }265 266 void RenderRegion::updateRegionHasAutoLogicalHeightFlag()267 {268 ASSERT(m_flowThread);269 270 if (!isValid())271 return;272 273 bool didHaveAutoLogicalHeight = m_hasAutoLogicalHeight;274 m_hasAutoLogicalHeight = shouldHaveAutoLogicalHeight();275 if (m_hasAutoLogicalHeight != didHaveAutoLogicalHeight) {276 if (m_hasAutoLogicalHeight)277 incrementAutoLogicalHeightCount();278 else {279 clearComputedAutoHeight();280 decrementAutoLogicalHeightCount();281 }282 }283 }284 285 bool RenderRegion::shouldHaveAutoLogicalHeight() const286 {287 bool hasSpecifiedEndpointsForHeight = style().logicalTop().isSpecified() && style().logicalBottom().isSpecified();288 bool hasAnchoredEndpointsForHeight = isOutOfFlowPositioned() && hasSpecifiedEndpointsForHeight;289 return style().logicalHeight().isAuto() && !hasAnchoredEndpointsForHeight;290 }291 225 292 226 void RenderRegion::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) … … 296 230 if (!m_flowThread) 297 231 return; 298 299 updateRegionHasAutoLogicalHeightFlag();300 232 301 233 if (oldStyle && oldStyle->writingMode() != style().writingMode()) 302 234 m_flowThread->regionChangedWritingMode(this); 303 }304 305 void RenderRegion::layoutBlock(bool relayoutChildren, LayoutUnit)306 {307 StackStats::LayoutCheckPoint layoutCheckPoint;308 RenderBlockFlow::layoutBlock(relayoutChildren);309 310 if (isValid()) {311 LayoutRect oldRegionRect(flowThreadPortionRect());312 if (!isHorizontalWritingMode())313 oldRegionRect = oldRegionRect.transposedRect();314 315 if (m_flowThread->inOverflowLayoutPhase() || m_flowThread->inFinalLayoutPhase())316 computeOverflowFromFlowThread();317 318 if (hasAutoLogicalHeight() && m_flowThread->inMeasureContentLayoutPhase()) {319 m_flowThread->invalidateRegions();320 clearComputedAutoHeight();321 return;322 }323 324 if (!isRenderRegionSet() && (oldRegionRect.width() != pageLogicalWidth() || oldRegionRect.height() != pageLogicalHeight()) && !m_flowThread->inFinalLayoutPhase())325 // This can happen even if we are in the inConstrainedLayoutPhase and it will trigger a pathological layout of the flow thread.326 m_flowThread->invalidateRegions();327 }328 235 } 329 236 … … 426 333 // Only after adding the region to the thread, the region is marked to be valid. 427 334 m_flowThread->addRegionToThread(this); 428 429 // The region just got attached to the flow thread, lets check whether430 // it has region styling rules associated.431 // FIXME: Remove cast once attachRegion is moved to RenderNamedFlowFragment.432 if (isRenderNamedFlowFragment())433 toRenderNamedFlowFragment(this)->checkRegionStyle();434 435 if (!isValid())436 return;437 438 m_hasAutoLogicalHeight = shouldHaveAutoLogicalHeight();439 if (hasAutoLogicalHeight())440 incrementAutoLogicalHeightCount();441 335 } 442 336 443 337 void RenderRegion::detachRegion() 444 338 { 445 if (m_flowThread) {339 if (m_flowThread) 446 340 m_flowThread->removeRegionFromThread(this); 447 if (hasAutoLogicalHeight())448 decrementAutoLogicalHeightCount();449 }450 341 m_flowThread = 0; 451 342 } … … 557 448 const RenderNamedFlowThread& namedFlow = view().flowThreadController().ensureRenderFlowThreadWithName(style().regionThread()); 558 449 namedFlow.getRanges(rangeObjects, this); 559 }560 561 void RenderRegion::updateLogicalHeight()562 {563 RenderBlockFlow::updateLogicalHeight();564 565 if (!hasAutoLogicalHeight())566 return;567 568 // We want to update the logical height based on the computed auto-height569 // only after the measure cotnent layout phase when all the570 // auto logical height regions have a computed auto-height.571 if (m_flowThread->inMeasureContentLayoutPhase())572 return;573 574 // There may be regions with auto logical height that during the prerequisite layout phase575 // did not have the chance to layout flow thread content. Because of that, these regions do not576 // have a computedAutoHeight and they will not be able to fragment any flow577 // thread content.578 if (!hasComputedAutoHeight())579 return;580 581 LayoutUnit newLogicalHeight = computedAutoHeight() + borderAndPaddingLogicalHeight();582 ASSERT(newLogicalHeight < LayoutUnit::max() / 2);583 if (newLogicalHeight > logicalHeight()) {584 setLogicalHeight(newLogicalHeight);585 // Recalculate position of the render block after new logical height is set.586 // (needed in absolute positioning case with bottom alignment for example)587 RenderBlockFlow::updateLogicalHeight();588 }589 450 } 590 451 -
trunk/Source/WebCore/rendering/RenderRegion.h
r159609 r161553 60 60 RenderLayer* regionContainerLayer() const; 61 61 62 v oid attachRegion();63 v oid detachRegion();62 virtual void attachRegion(); 63 virtual void detachRegion(); 64 64 65 65 RenderNamedFlowThread* parentNamedFlowThread() const { return m_parentNamedFlowThread; } … … 89 89 virtual LayoutUnit pageLogicalWidth() const; 90 90 virtual LayoutUnit pageLogicalHeight() const; 91 virtual LayoutUnit maxPageLogicalHeight() const;92 91 93 92 LayoutUnit logicalTopOfFlowThreadContentRect(const LayoutRect&) const; … … 102 101 // or columns added together. 103 102 virtual LayoutUnit logicalHeightOfAllFlowThreadContent() const; 104 105 bool hasAutoLogicalHeight() const { return m_hasAutoLogicalHeight; }106 107 LayoutUnit computedAutoHeight() const { return m_computedAutoHeight; }108 109 void setComputedAutoHeight(LayoutUnit computedAutoHeight)110 {111 m_hasComputedAutoHeight = true;112 m_computedAutoHeight = computedAutoHeight;113 }114 115 void clearComputedAutoHeight()116 {117 m_hasComputedAutoHeight = false;118 m_computedAutoHeight = 0;119 }120 121 bool hasComputedAutoHeight() const { return m_hasComputedAutoHeight; }122 123 virtual void updateLogicalHeight() OVERRIDE;124 103 125 104 // The top of the nearest page inside the region. For RenderRegions, this is just the logical top of the … … 155 134 virtual VisiblePosition positionForPoint(const LayoutPoint&) OVERRIDE; 156 135 136 virtual bool hasAutoLogicalHeight() const { return false; } 137 157 138 protected: 158 139 RenderRegion(Element&, PassRef<RenderStyle>, RenderFlowThread*); … … 171 152 LayoutRect overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPortionRect, bool isFirstPortion, bool isLastPortion, OverflowType); 172 153 void repaintFlowThreadContentRectangle(const LayoutRect& repaintRect, bool immediate, const LayoutRect& flowThreadPortionRect, const LayoutPoint& regionLocation, const LayoutRect* flowThreadPortionClipRect = 0); 173 virtual bool shouldHaveAutoLogicalHeight() const;174 154 175 155 void computeOverflowFromFlowThread(); … … 181 161 virtual void willBeRemovedFromTree() OVERRIDE; 182 162 183 virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) OVERRIDE;184 185 163 virtual void installFlowThread(); 186 187 void updateRegionHasAutoLogicalHeightFlag();188 189 void incrementAutoLogicalHeightCount();190 void decrementAutoLogicalHeightCount();191 164 192 165 LayoutPoint mapRegionPointIntoFlowThreadCoordinates(const LayoutPoint&); … … 210 183 211 184 bool m_isValid : 1; 212 bool m_hasAutoLogicalHeight : 1;213 bool m_hasComputedAutoHeight : 1;214 215 LayoutUnit m_computedAutoHeight;216 185 }; 217 186 -
trunk/Source/WebCore/rendering/RenderRegionSet.h
r158097 r161553 49 49 protected: 50 50 RenderRegionSet(Document&, PassRef<RenderStyle>, RenderFlowThread&); 51 virtual bool shouldHaveAutoLogicalHeight() const OVERRIDE { return false; }52 51 53 52 private:
Note: See TracChangeset
for help on using the changeset viewer.