Changeset 214039 in webkit
- Timestamp:
- Mar 16, 2017 6:13:01 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r214038 r214039 1 2017-03-16 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Crash on debug removing a positioned child 4 https://bugs.webkit.org/show_bug.cgi?id=169739 5 6 Reviewed by Sergio Villar Senin. 7 8 Add new test that checks that adding and removing a positioned grid item 9 doesn't cause any crashes. 10 11 * fast/css-grid-layout/grid-crash-remove-positioned-item-expected.txt: Added. 12 * fast/css-grid-layout/grid-crash-remove-positioned-item.html: Added. 13 1 14 2017-03-16 Caio Lima <ticaiolima@gmail.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r214037 r214039 1 2017-03-16 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Crash on debug removing a positioned child 4 https://bugs.webkit.org/show_bug.cgi?id=169739 5 6 Reviewed by Sergio Villar Senin. 7 8 When we add or remove a positioned item we don't need to mark 9 the grid as dirty, because positioned items do not affect the layout 10 of the grid at all. 11 12 This was causing a crash when a positioned item was removed 13 after a layout. As after the positioned item was removed, 14 the method RenderGrid::layoutBlock() was not called, 15 so when the grid was repainted we got a crash. 16 17 Test: fast/css-grid-layout/grid-crash-remove-positioned-item.html 18 19 * rendering/RenderGrid.cpp: 20 (WebCore::RenderGrid::addChild): Add early return to avoid marking 21 the grid as dirty for positioned grid items. 22 (WebCore::RenderGrid::removeChild): Ditto. 23 1 24 2017-03-16 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 25 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r213480 r214039 70 70 RenderBlock::addChild(newChild, beforeChild); 71 71 72 // Positioned grid items do not take up space or otherwise participate in the layout of the grid, 73 // for that reason we don't need to mark the grid as dirty when they are added. 74 if (newChild->isOutOfFlowPositioned()) 75 return; 76 72 77 // The grid needs to be recomputed as it might contain auto-placed items that 73 78 // will change their position. … … 78 83 { 79 84 RenderBlock::removeChild(child); 85 86 // Positioned grid items do not take up space or otherwise participate in the layout of the grid, 87 // for that reason we don't need to mark the grid as dirty when they are removed. 88 if (child.isOutOfFlowPositioned()) 89 return; 80 90 81 91 // The grid needs to be recomputed as it might contain auto-placed items that
Note: See TracChangeset
for help on using the changeset viewer.