Changeset 142982 in webkit
- Timestamp:
- Feb 15, 2013 4:28:19 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142981 r142982 1 2013-02-15 Andrei Bucur <abucur@adobe.com> 2 3 [CSS Regions][Mac] fast/regions/full-screen-video-from-region.html hits an assertion in RenderFlowThread::removeRenderBoxRegionInfo 4 https://bugs.webkit.org/show_bug.cgi?id=106075 5 6 Reviewed by Tony Chang. 7 8 Removed the crash/fail expectation for fast/regions/full-screen-video-from-region.html. 9 10 * platform/mac/TestExpectations: 11 1 12 2013-02-15 Andrew Wilson <atwilson@chromium.org> 2 13 -
trunk/LayoutTests/platform/mac/TestExpectations
r142979 r142982 1351 1351 webkit.org/b/105999 [ Lion ] fast/canvas/canvas-composite-image.html [ Failure ] 1352 1352 1353 webkit.org/b/106075 [ Debug ] fast/regions/full-screen-video-from-region.html [ Crash ]1354 1355 1353 webkit.org/b/106151 [ Lion ] http/tests/misc/link-rel-icon-beforeload.html [ Pass Failure ] 1356 1354 -
trunk/Source/WebCore/ChangeLog
r142979 r142982 1 2013-02-15 Andrei Bucur <abucur@adobe.com> 2 3 [CSS Regions][Mac] fast/regions/full-screen-video-from-region.html hits an assertion in RenderFlowThread::removeRenderBoxRegionInfo 4 https://bugs.webkit.org/show_bug.cgi?id=106075 5 6 Reviewed by Tony Chang. 7 8 The crash is caused by two issues. 9 10 The first problem is how a block inside a flow thread determines if the children needs relayout or not. 11 When the region chain is invalidated, the information is lost so we need to return true, even for the 12 enclosing RenderFlowThread. Because the video renderer is the first child of the flow thread this doesn't 13 happen. 14 15 The patch implements this behaviour by inspecting both if the region chain has changed and 16 if the block has no range computed yet. 17 18 The second problem is RenderMedia not inheriting from RenderBlock. The logic of child relayout doesn't apply 19 to it. In the test case, when the full screen button is pressed, the region changes width to fill the viewport, 20 the chain is invalidated and the box info hash map is cleared. When the video is laid out again (after fixing 21 the first issue) it has the same size so the controls don't do a layout. They remain without box info inside 22 the flow thread, thus causing the assertion. 23 24 The patch forces the controls to relayout if the region chain was invalidated. We can't use the 25 logicalWidthChangedInRegions method because it is block specific. This will be fixed in a later patch. 26 27 Tests: No new tests. fast/regions/full-screen-video-from-region.html no longer crashes. 28 29 * rendering/RenderBlock.cpp: 30 (WebCore::RenderBlock::checkForPaginationLogicalHeightChange): 31 * rendering/RenderFlowThread.cpp: 32 (WebCore::RenderFlowThread::RenderFlowThread): 33 (WebCore::RenderFlowThread::layout): 34 (WebCore::RenderFlowThread::logicalWidthChangedInRegions): 35 * rendering/RenderFlowThread.h: Renamed pageLogicalHeightChanged to pageLogicalSizeChanged. 36 * rendering/RenderMedia.cpp: 37 (WebCore::RenderMedia::layout): 38 1 39 2013-02-13 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 40 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r142974 r142982 1474 1474 } else if (isRenderFlowThread()) { 1475 1475 pageLogicalHeight = 1; // This is just a hack to always make sure we have a page logical height. 1476 pageLogicalHeightChanged = toRenderFlowThread(this)->pageLogical HeightChanged();1476 pageLogicalHeightChanged = toRenderFlowThread(this)->pageLogicalSizeChanged(); 1477 1477 } 1478 1478 } -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r140948 r142982 57 57 , m_hasRegionsWithStyling(false) 58 58 , m_dispatchRegionLayoutUpdateEvent(false) 59 , m_pageLogical HeightChanged(false)59 , m_pageLogicalSizeChanged(false) 60 60 { 61 61 ASSERT(document->cssRegionsEnabled()); … … 137 137 StackStats::LayoutCheckPoint layoutCheckPoint; 138 138 139 m_pageLogical HeightChanged = m_regionsInvalidated && everHadLayout();139 m_pageLogicalSizeChanged = m_regionsInvalidated && everHadLayout(); 140 140 if (m_regionsInvalidated) { 141 141 m_regionsInvalidated = false; … … 188 188 RenderBlock::layout(); 189 189 190 m_pageLogical HeightChanged = false;190 m_pageLogicalSizeChanged = false; 191 191 192 192 if (lastRegion()) … … 461 461 bool RenderFlowThread::logicalWidthChangedInRegions(const RenderBlock* block, LayoutUnit offsetFromLogicalTopOfFirstPage) 462 462 { 463 if (!hasRegions() || block == this) // Not necessary, since if any region changes, we do a full pagination relayout anyway.463 if (!hasRegions()) 464 464 return false; 465 465 … … 468 468 getRegionRangeForBox(block, startRegion, endRegion); 469 469 470 // If the block doesn't have a startRegion (and implicitly a region range) it's safe to assume the width in regions has changed (e.g. the region chain was invalidated).471 if ( !startRegion)470 // When the region chain is invalidated the box information is discarded so we must assume the width has changed. 471 if (m_pageLogicalSizeChanged && !startRegion) 472 472 return true; 473 474 // Not necessary for the flow thread, since we already computed the correct info for it. 475 if (block == this) 476 return false; 473 477 474 478 for (RenderRegionList::iterator iter = m_regionList.find(startRegion); iter != m_regionList.end(); ++iter) { -
trunk/Source/WebCore/rendering/RenderFlowThread.h
r140948 r142982 134 134 bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0); 135 135 136 bool pageLogical HeightChanged() const { return m_pageLogicalHeightChanged; }136 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; } 137 137 138 138 bool hasAutoLogicalHeightRegions() const { ASSERT(isAutoLogicalHeightRegionsCountConsistent()); return m_autoLogicalHeightRegionsCount; } … … 205 205 bool m_hasRegionsWithStyling : 1; 206 206 bool m_dispatchRegionLayoutUpdateEvent : 1; 207 bool m_pageLogical HeightChanged : 1;207 bool m_pageLogicalSizeChanged : 1; 208 208 }; 209 209 -
trunk/Source/WebCore/rendering/RenderMedia.cpp
r131938 r142982 30 30 31 31 #include "HTMLMediaElement.h" 32 #include "RenderFlowThread.h" 32 33 #include "RenderView.h" 33 34 … … 67 68 return; 68 69 70 bool controlsNeedLayout = controlsRenderer->needsLayout(); 71 // If the region chain has changed we also need to relayout the controls to update the region box info. 72 // FIXME: We can do better once we compute region box info for RenderReplaced, not only for RenderBlock. 73 if (inRenderFlowThread() && !controlsNeedLayout) { 74 const RenderFlowThread* flowThread = enclosingRenderFlowThread(); 75 ASSERT(flowThread); 76 if (flowThread->pageLogicalSizeChanged()) 77 controlsNeedLayout = true; 78 } 79 69 80 LayoutSize newSize = contentBoxRect().size(); 70 if (newSize == oldSize && !controls Renderer->needsLayout())81 if (newSize == oldSize && !controlsNeedLayout) 71 82 return; 72 83
Note: See TracChangeset
for help on using the changeset viewer.