Changeset 174946 in webkit
- Timestamp:
- Oct 21, 2014 5:11:29 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r174922 r174946 1 2014-10-21 Manuel Rego Casasnovas <rego@igalia.com> 2 3 ASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid 4 https://bugs.webkit.org/show_bug.cgi?id=136939 5 6 Reviewed by Darin Adler. 7 8 Added a test case to reproduce the crash in debug mode. 9 10 * fast/css-grid-layout/grid-was-populated-assert-expected.txt: Added. 11 * fast/css-grid-layout/grid-was-populated-assert.html: Added. 12 1 13 2014-10-17 Jeffrey Pfau <jpfau@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r174931 r174946 1 2014-10-21 Manuel Rego Casasnovas <rego@igalia.com> 2 3 ASSERTION FAILED: !gridWasPopulated() in WebCore::RenderGrid::placeItemsOnGrid 4 https://bugs.webkit.org/show_bug.cgi?id=136939 5 6 Reviewed by Darin Adler. 7 8 In some particular situations computeIntrinsicLogicalWidths() is called 9 in the middle of layoutGridItems(). In these cases we do not need to 10 populate the grid again, so we should avoid calling placeItemsOnGrid(). 11 In addition, we do not need to clean the grid either, as that will be 12 done later by layoutGridItems(). 13 14 Test: fast/css-grid-layout/grid-was-populated-assert.html 15 16 * rendering/RenderGrid.cpp: 17 (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Avoid calls to 18 placeItemsOnGrid() and clearGrid() if the grid was already populated. 19 * rendering/RenderGrid.h: Move gridWasPopulated() header out of the 20 debug ifdefs. 21 1 22 2014-10-21 Zan Dobersek <zdobersek@igalia.com> 2 23 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r174643 r174946 243 243 void RenderGrid::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const 244 244 { 245 const_cast<RenderGrid*>(this)->placeItemsOnGrid(); 245 bool wasPopulated = gridWasPopulated(); 246 if (!wasPopulated) 247 const_cast<RenderGrid*>(this)->placeItemsOnGrid(); 246 248 247 249 GridSizingData sizingData(gridColumnCount(), gridRowCount()); … … 260 262 } 261 263 262 const_cast<RenderGrid*>(this)->clearGrid(); 264 if (!wasPopulated) 265 const_cast<RenderGrid*>(this)->clearGrid(); 263 266 } 264 267 -
trunk/Source/WebCore/rendering/RenderGrid.h
r174643 r174946 111 111 #ifndef NDEBUG 112 112 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vector<GridTrack>&); 113 #endif 114 113 115 bool gridWasPopulated() const { return !m_grid.isEmpty() && !m_grid[0].isEmpty(); } 114 #endif115 116 116 117 size_t gridColumnCount() const
Note: See TracChangeset
for help on using the changeset viewer.