Changeset 168363 in webkit
- Timestamp:
- May 6, 2014 10:30:40 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r168360 r168363 1 2014-05-06 Andrei Bucur <abucur@adobe.com> 2 3 [CSS Regions] Optimize the number of regions invalidations 4 https://bugs.webkit.org/show_bug.cgi?id=132611 5 6 Reviewed by David Hyatt. 7 8 Because there are less region invalidations there are less repaints 9 of the flow threads. 10 11 * fast/regions/repaint/repaint-regions-overflow-expected.txt: 12 1 13 2014-05-06 Chris Fleizach <cfleizach@apple.com> 2 14 -
trunk/LayoutTests/fast/regions/repaint/repaint-regions-overflow-expected.txt
r163021 r168363 7 7 (repaint rects 8 8 (rect 106 306 300 160) 9 (rect 14 72 300 210)10 (rect 106 122 300 210)11 (rect 14 298 300 18)12 (rect 106 348 300 18)13 9 (rect 14 56 300 260) 14 10 (rect 106 106 300 260) … … 17 13 (rect 14 56 300 260) 18 14 (rect 106 106 300 260) 19 (rect 14 56 300 260)20 (rect 106 106 300 260)21 15 ) 22 16 -
trunk/Source/WebCore/ChangeLog
r168362 r168363 1 2014-05-06 Andrei Bucur <abucur@adobe.com> 2 3 [CSS Regions] Optimize the number of regions invalidations 4 https://bugs.webkit.org/show_bug.cgi?id=132611 5 6 Reviewed by David Hyatt. 7 8 It is possible to invalidate the region chain of a flow thread 9 during the layout of the region when its height is not final. 10 11 This patch places the check after the height of the region 12 is determined, reducing the number of invalidations. 13 14 Tests: Less invalidations and repaints in the repaint tests for 15 the flow threads. 16 17 * rendering/RenderBlockFlow.cpp: 18 (WebCore::RenderBlockFlow::updateLogicalHeight): 19 * rendering/RenderNamedFlowFragment.cpp: 20 (WebCore::RenderNamedFlowFragment::layoutBlock): 21 (WebCore::RenderNamedFlowFragment::invalidateRegionIfNeeded): 22 * rendering/RenderNamedFlowFragment.h: 23 1 24 2014-05-03 Sam Weinig <sam@webkit.org> 2 25 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r167870 r168363 2926 2926 RenderBlock::updateLogicalHeight(); 2927 2927 2928 if (renderNamedFlowFragment()) 2928 if (renderNamedFlowFragment()) { 2929 2929 renderNamedFlowFragment()->setLogicalHeight(std::max<LayoutUnit>(0, logicalHeight() - borderAndPaddingLogicalHeight())); 2930 renderNamedFlowFragment()->invalidateRegionIfNeeded(); 2931 } 2930 2932 } 2931 2933 -
trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp
r168306 r168363 263 263 264 264 if (isValid()) { 265 LayoutRect oldRegionRect(flowThreadPortionRect());266 if (!isHorizontalWritingMode())267 oldRegionRect = oldRegionRect.transposedRect();268 269 265 if (m_flowThread->inOverflowLayoutPhase() || m_flowThread->inFinalLayoutPhase()) { 270 266 computeOverflowFromFlowThread(); … … 277 273 return; 278 274 } 279 280 if ((oldRegionRect.width() != pageLogicalWidth() || oldRegionRect.height() != pageLogicalHeight()) && !m_flowThread->inFinalLayoutPhase()) { 281 // This can happen even if we are in the inConstrainedLayoutPhase and it will trigger a pathological layout of the flow thread. 282 m_flowThread->invalidateRegions(); 283 } 275 } 276 } 277 278 void RenderNamedFlowFragment::invalidateRegionIfNeeded() 279 { 280 if (!isValid()) 281 return; 282 283 LayoutRect oldRegionRect(flowThreadPortionRect()); 284 if (!isHorizontalWritingMode()) 285 oldRegionRect = oldRegionRect.transposedRect(); 286 287 if ((oldRegionRect.width() != pageLogicalWidth() || oldRegionRect.height() != pageLogicalHeight()) && !m_flowThread->inFinalLayoutPhase()) { 288 // This can happen even if we are in the inConstrainedLayoutPhase and it will trigger a pathological layout of the flow thread. 289 m_flowThread->invalidateRegions(); 284 290 } 285 291 } -
trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h
r167930 r168363 119 119 virtual void absoluteQuadsForBoxInRegion(Vector<FloatQuad>&, bool*, const RenderBox*, float, float) override; 120 120 121 void invalidateRegionIfNeeded(); 122 121 123 private: 122 124 virtual const char* renderName() const override { return "RenderNamedFlowFragment"; }
Note: See TracChangeset
for help on using the changeset viewer.