Changeset 143322 in webkit
- Timestamp:
- Feb 19, 2013 5:44:42 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r143321 r143322 1 2013-02-19 Andrei Bucur <abucur@adobe.com> 2 3 [CSS Regions] Assertion in RenderFlowThread::removeRenderBoxRegionInfo 4 https://bugs.webkit.org/show_bug.cgi?id=109914 5 6 Reviewed by David Hyatt. 7 8 The test creates a flow thread with two regions and a content node. We remove the region and the node from the flow thread 9 at the same time. When the style is updated, the region is first removed from the chain and range information for boxes 10 is cleared from the flow thread. When the node is removed from the flow thread it tries to delete its region box information. 11 The range information on the flow thread is gone so the range for the node's box is zero - nothing gets deleted. Afterwards, 12 an ASSERT is triggered because there's leftover box information inside the region chain. 13 14 * fast/regions/remove-box-info-assert-expected.txt: Added. 15 * fast/regions/remove-box-info-assert.html: Added. 16 1 17 2013-02-19 Stephen White <senorblanco@chromium.org> 2 18 -
trunk/Source/WebCore/ChangeLog
r143320 r143322 1 2013-02-19 Andrei Bucur <abucur@adobe.com> 2 3 [CSS Regions] Assertion in RenderFlowThread::removeRenderBoxRegionInfo 4 https://bugs.webkit.org/show_bug.cgi?id=109914 5 6 Reviewed by David Hyatt. 7 8 This patch moves a part of the invalidation operations inside the RenderFlowThread::invalidateRegions call. The maps 9 are cleared anyway at layout time but doing this earlier makes sure the flow thread is in a more consistent state 10 (the RenderFlowThread object has both the region chain invalidated and the regions information cleared). 11 12 RenderFlowThread::removeRenderBoxRegionInfo will check if the region chain is invalidated. If true, it means the 13 flow thread has a layout scheduled and the regions information is not yet reliable. In this case we just return from the 14 function and wait for the layout to cleanup the box information. 15 16 Test: fast/regions/remove-box-info-assert.html 17 18 * rendering/RenderFlowThread.cpp: 19 (WebCore::RenderFlowThread::removeRegionFromThread): 20 (WebCore::RenderFlowThread::invalidateRegions): 21 (WebCore): 22 (WebCore::RenderFlowThread::layout): 23 (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): 24 * rendering/RenderFlowThread.h: 25 * rendering/RenderNamedFlowThread.cpp: 26 (WebCore::RenderNamedFlowThread::removeRegionFromThread): 27 1 28 2013-02-19 Alberto Garcia <agarcia@igalia.com> 2 29 -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r142982 r143322 106 106 { 107 107 ASSERT(renderRegion); 108 m_regionRangeMap.clear();109 108 m_regionList.remove(renderRegion); 110 109 invalidateRegions(); 111 110 checkRegionsWithStyling(); 111 } 112 113 void RenderFlowThread::invalidateRegions() 114 { 115 if (m_regionsInvalidated) { 116 ASSERT(selfNeedsLayout()); 117 return; 118 } 119 120 m_regionRangeMap.clear(); 121 m_breakBeforeToRegionMap.clear(); 122 m_breakAfterToRegionMap.clear(); 123 setNeedsLayout(true); 124 125 m_regionsInvalidated = true; 112 126 } 113 127 … … 142 156 m_regionsHaveUniformLogicalWidth = true; 143 157 m_regionsHaveUniformLogicalHeight = true; 144 m_regionRangeMap.clear();145 m_breakBeforeToRegionMap.clear();146 m_breakAfterToRegionMap.clear();147 158 148 159 LayoutUnit previousRegionLogicalWidth = 0; … … 153 164 RenderRegion* region = *iter; 154 165 ASSERT(!region->needsLayout()); 155 166 156 167 region->deleteAllRenderBoxRegionInfo(); 157 168 … … 436 447 if (!hasRegions()) 437 448 return; 449 450 // If the region chain was invalidated the next layout will clear the box information from all the regions. 451 if (m_regionsInvalidated) { 452 ASSERT(selfNeedsLayout()); 453 return; 454 } 438 455 439 456 RenderRegion* startRegion; -
trunk/Source/WebCore/rendering/RenderFlowThread.h
r142982 r143322 85 85 void checkRegionsWithStyling(); 86 86 87 void invalidateRegions() { m_regionsInvalidated = true; setNeedsLayout(true); }87 void invalidateRegions(); 88 88 bool hasValidRegionInfo() const { return !m_regionsInvalidated && !m_regionList.isEmpty(); } 89 89 -
trunk/Source/WebCore/rendering/RenderNamedFlowThread.cpp
r142271 r143322 251 251 { 252 252 ASSERT(renderRegion); 253 m_regionRangeMap.clear();254 253 255 254 if (renderRegion->parentNamedFlowThread()) {
Note: See TracChangeset
for help on using the changeset viewer.