Changeset 208586 in webkit
- Timestamp:
- Nov 11, 2016 3:08:39 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r208585 r208586 1 2016-11-11 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] ASSERTION FAILED: !m_gridIsDirty in WebCore::RenderGrid::gridRowCount 4 https://bugs.webkit.org/show_bug.cgi?id=163450 5 6 Reviewed by Darin Adler. 7 8 The tests shouldn't crash in debug to verify that the bug is fixed. 9 On top of that the positioned grid items should appear in the right position too. 10 11 * fast/css-grid-layout/grid-positioned-item-dynamic-change-expected.html: Added. 12 * fast/css-grid-layout/grid-positioned-item-dynamic-change.html: Added. 13 * fast/css-grid-layout/grid-simplified-layout-positioned-expected.html: Added. 14 * fast/css-grid-layout/grid-simplified-layout-positioned.html: Added. 15 1 16 2016-11-11 Antoine Quint <graouts@apple.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r208585 r208586 1 2016-11-11 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] ASSERTION FAILED: !m_gridIsDirty in WebCore::RenderGrid::gridRowCount 4 https://bugs.webkit.org/show_bug.cgi?id=163450 5 6 Reviewed by Darin Adler. 7 8 The issue is that in the test case a simplifiedLayout() is performed. 9 So in RenderGrid::layoutBlock() we early return and the grid is not populated, 10 so the m_gridIsDirty flag is not cleared when we try to check the size of the grid 11 in RenderGrid::layoutPositionedObject(). 12 13 We should avoid to do a simplified layout if we have to layout 14 some positioned grid items and the grid is dirty. 15 16 The problem was not only the ASSERT, but the current behavior was wrong too. 17 As we didn't do a proper layout of the grid container, the positioned item 18 won't be placed on the expected position. Added tests verifying this. 19 20 Tests: fast/css-grid-layout/grid-positioned-item-dynamic-change.html 21 fast/css-grid-layout/grid-simplified-layout-positioned.html 22 23 * rendering/RenderBlock.cpp: 24 (WebCore::RenderBlock::canPerformSimplifiedLayout): Check if we can perform or not 25 a simplified layout. 26 (WebCore::RenderBlock::simplifiedLayout): Extract initial check 27 into canPerformSimplifiedLayout(). 28 * rendering/RenderBlock.h: Add new header for canPerformSimplifiedLayout(). 29 * rendering/RenderGrid.cpp: Implement our own version of canPerformSimplifiedLayout() 30 to verify that the grid is not dirty if we have to layout some positioned items. 31 (WebCore::RenderGrid::canPerformSimplifiedLayout): 32 * rendering/RenderGrid.h: Add canPerformSimplifiedLayout() header. 33 1 34 2016-11-11 Antoine Quint <graouts@apple.com> 2 35 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r208555 r208586 1337 1337 } 1338 1338 1339 bool RenderBlock::canPerformSimplifiedLayout() const 1340 { 1341 return (posChildNeedsLayout() || needsSimplifiedNormalFlowLayout()) && !normalChildNeedsLayout() && !selfNeedsLayout(); 1342 } 1343 1339 1344 bool RenderBlock::simplifiedLayout() 1340 1345 { 1341 if ( (!posChildNeedsLayout() && !needsSimplifiedNormalFlowLayout()) || normalChildNeedsLayout() || selfNeedsLayout())1346 if (!canPerformSimplifiedLayout()) 1342 1347 return false; 1343 1348 -
trunk/Source/WebCore/rendering/RenderBlock.h
r208555 r208586 361 361 virtual bool hasLineIfEmpty() const; 362 362 363 virtual bool canPerformSimplifiedLayout() const; 363 364 bool simplifiedLayout(); 364 365 virtual void simplifiedNormalFlowLayout(); -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r208531 r208586 445 445 computeTrackSizesForDirection(ForRows, sizingData, availableSpaceForRows); 446 446 } 447 } 448 449 bool RenderGrid::canPerformSimplifiedLayout() const 450 { 451 // We cannot perform a simplified layout if the grid is dirty and we have 452 // some positioned items to be laid out. 453 if (m_gridIsDirty && posChildNeedsLayout()) 454 return false; 455 456 return RenderBlock::canPerformSimplifiedLayout(); 447 457 } 448 458 -
trunk/Source/WebCore/rendering/RenderGrid.h
r208531 r208586 111 111 GridTrackSizingDirection autoPlacementMinorAxisDirection() const; 112 112 113 bool canPerformSimplifiedLayout() const final; 113 114 void prepareChildForPositionedLayout(RenderBox&); 114 115 void layoutPositionedObject(RenderBox&, bool relayoutChildren, bool fixedPositionObjectsOnly) override;
Note: See TracChangeset
for help on using the changeset viewer.