Changeset 95740 in webkit
- Timestamp:
- Sep 22, 2011 11:12:20 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r95738 r95740 1 2011-09-22 David Hyatt <hyatt@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=68638 4 5 Make RenderFlowThread cache whether or not it has regions of varying widths. This will 6 be relevant for performance as we begin adding code to do custom block painting and 7 layout based off regions not having the same width. 8 9 Reviewed by Dan Bernstein and Adam Roben. 10 11 * rendering/RenderFlowThread.cpp: 12 (WebCore::RenderFlowThread::RenderFlowThread): 13 (WebCore::RenderFlowThread::layout): 14 * rendering/RenderFlowThread.h: 15 1 16 2011-09-22 Anders Carlsson <andersca@apple.com> 2 17 -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r95648 r95740 48 48 , m_hasValidRegions(false) 49 49 , m_regionsInvalidated(false) 50 , m_regionsHaveUniformLogicalWidth(true) 50 51 , m_regionFittingDisableCount(0) 51 52 { … … 304 305 if (m_regionsInvalidated) { 305 306 m_regionsInvalidated = false; 307 m_hasValidRegions = false; 308 m_regionsHaveUniformLogicalWidth = true; 309 LayoutUnit previousRegionLogicalWidth = 0; 306 310 if (hasRegions()) { 307 311 int logicalHeight = 0; … … 314 318 ASSERT(!region->needsLayout()); 315 319 316 m_hasValidRegions = true;320 LayoutUnit regionLogicalWidth; 317 321 318 322 IntRect regionRect; … … 320 324 regionRect = IntRect(0, logicalHeight, region->contentWidth(), region->contentHeight()); 321 325 logicalHeight += regionRect.height(); 326 regionLogicalWidth = region->contentWidth(); 322 327 } else { 323 328 regionRect = IntRect(logicalHeight, 0, region->contentWidth(), region->contentHeight()); 324 329 logicalHeight += regionRect.width(); 330 regionLogicalWidth = region->contentHeight(); 325 331 } 332 333 if (!m_hasValidRegions) 334 m_hasValidRegions = true; 335 else if (m_regionsHaveUniformLogicalWidth && previousRegionLogicalWidth != regionLogicalWidth) 336 m_regionsHaveUniformLogicalWidth = false; 337 338 previousRegionLogicalWidth = regionLogicalWidth; 326 339 327 340 region->setRegionRect(regionRect); -
trunk/Source/WebCore/rendering/RenderFlowThread.h
r95264 r95740 106 106 void enableRegionFitting() { ASSERT(m_regionFittingDisableCount > 0); m_regionFittingDisableCount--; } 107 107 108 bool regionsHaveUniformLogicalWidth() const { return m_regionsHaveUniformLogicalWidth; } 109 108 110 RenderRegion* mapFromFlowToRegion(TransformState&) const; 109 111 … … 138 140 bool m_hasValidRegions; 139 141 bool m_regionsInvalidated; 142 bool m_regionsHaveUniformLogicalWidth; 140 143 unsigned m_regionFittingDisableCount; 141 144 };
Note: See TracChangeset
for help on using the changeset viewer.