[css-grid] Crash on debug changing the style of a positioned element
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2018 08:17:10 +0000 (08:17 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2018 08:17:10 +0000 (08:17 +0000)
commit908734f9895cb5be4e4c7edd4e03589e08ed7d9a
tree4308385e7b2cc93f0243455eccfa157cf4205de0
parentb7a0b23c26623f8760e11b96e8ffa64b6d7cd5de
[css-grid] Crash on debug changing the style of a positioned element
https://bugs.webkit.org/show_bug.cgi?id=191473

Reviewed by Dean Jackson and Zalan Bujtas.

Source/WebCore:

When an box becomes {out-of,in}-flow, it may be re-parented and it may become a grid
item. In that case, we must mark the RenderGrid as dirty, so that the grid items
placement logic is executed again.

Test: fast/css-grid-layout/grid-crash-out-of-flow-positioned-element.html

* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::childFlowStateChangesAndAffectsParentBlock): Consider the case of a box's new parent being a grid container.

LayoutTests:

Regression test to ensure that the grid placement logic is executed
when a positioned item becomes a grid item.

* fast/css-grid-layout/grid-crash-out-of-flow-positioned-element-expected.txt:
* fast/css-grid-layout/grid-crash-out-of-flow-positioned-element.html:
* TestExpectations: Remove a Skip entry, since the test doesn't crash anymore.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/css-grid-layout/grid-crash-out-of-flow-positioned-element-expected.txt
LayoutTests/fast/css-grid-layout/grid-crash-out-of-flow-positioned-element.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/updating/RenderTreeBuilder.cpp