Bug 1610547 [wpt PR 21308] - [FlexNG] Use previous constraint space for layout roots...
commitec7c6e8a40e836f1dec07fd73d88fa4c639ce97d
authorIan Kilpatrick <ikilpatrick@chromium.org>
Thu, 23 Jan 2020 22:56:20 +0000 (23 22:56 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 27 Jan 2020 15:35:55 +0000 (27 15:35 +0000)
treea364d6db87f89816d2cd58785c735f18765aa37a
parent8239cc35d466c3d7db513fa4f99a219f53d2ebdc
Bug 1610547 [wpt PR 21308] - [FlexNG] Use previous constraint space for layout roots., a=testonly

Automatic update from web-platform-tests
[FlexNG] Use previous constraint space for layout roots.

Devtools had an issue where elements were sized at 0px height.
This was caused by the relayout boundary logic not working correctly.

In Devtools these elements had layout and size containment triggering
ObjectIsRelayoutBoundary() to return true.

The call to NGConstraintSpace::CreateFromLayoutObject for this flex-item
was incorrect as it wasn't using the stretched size (as we don't
set HasOverrideLogicalWidth(), etc).

This refactors the various callers of
NGConstraintSpace::CreateFromLayoutObject and create a new method
UpdateInFlowBlockLayout which contains the previously (duplicated)
logic.

This new method will try and use the previous constraint space (if
it is a layout root), instead of creating it.

Bug: 845235
Change-Id: I52ddb9d58ae010305b980657bb434a30d5b7fbbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2010983
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: David Grogan <dgrogan@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734420}

--

wpt-commits: fb09ccb613400a3a0327967063cb1117cea96468
wpt-pr: 21308
testing/web-platform/tests/css/css-flexbox/dynamic-change-simplified-layout-002.html [new file with mode: 0644]