Closed Bug 1527175 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 15325 - Don't skip past auto-height flexboxes in quirks mode.

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 15325 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/15325
Details from upstream follow.

Morten Stenshorne <mstensho@chromium.org> wrote:

Don't skip past auto-height flexboxes in quirks mode.

This is essentially a reland of
https://chromium-review.googlesource.com/c/chromium/src/+/1052768/

Quirky flexbox behavior really shouldn't be necessary, since flexbox was
invented over a decade after quirky browsers were on the street.

Replace css3/flexbox/percentage-sizes-quirks.html with a copy of
percentage-sizes.html, except that it's in quirks mode.

Need to remove
external/wpt/css/css-flexbox/percentage-heights-quirks-node.html now,
since that test expects special behavior in quirks mode, which is
exactly what this CL is removing. This makes us behave like Edge and
Firefox.

The root problem, as far as the DCHECK failure in bug 841276 is
concerned, though, is that LayoutVideo is a very unsuitable container
for pretty much anything (because it's not a LayoutBlock, let alone
LayoutBlockFlow). By default we end up with the following layout tree
for a VIDEO element:

LayoutVideo VIDEO
LayoutFlexibleBox (relative positioned) DIV
LayoutBlockFlow DIV
LayoutFlexibleBox DIV

See the testcase. The VIDEO there is fixed-positioned, and it also has
another fixed-positioned ancestor (regular block otherwise). When
attempting to locate the right ancestor (descendant of VIDEO) in the
testcase to register a percentage height descendant, we don't see the
LayoutVideo object at all on our way up the tree (because it's not
LayoutBlock). So the percentage height descendant is incorrectly
registered with the outer fixed positioned block. This confuses the
layout machinery, so that when re-laying out the outer fixed positioned
block (see the testcase), we mark the inner flexbox for layout, since
it's a percentage height descendant. But we never get down there, since
the containing VIDEO element isn't going to require layout. Thus we'll
fail DCHECKs that require the entire tree to be clean after layout.

Bug: 841276, 531783
Change-Id: If7d62ff37d3176b8ee51cdf9b7d2e02d75c3dc02

Reviewed-on: https://chromium-review.googlesource.com/1459643
WPT-Export-Revision: 7b898e87fb8cd040781dec2f69d7ea76c5fe3fe7

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Ran 1 tests and 1 subtests OK : 1 PASS : 1
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/b05ca53d777d [wpt PR 15325] - Don't skip past auto-height flexboxes in quirks mode., a=testonly https://hg.mozilla.org/integration/mozilla-inbound/rev/14bf3c080058 [wpt PR 15325] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

This test apparently intermittently fails; see bug 1540829.

Blocks: 1540829

Actually, it looks like we encountered one instance of the intermittent failure in the preliminary try push from comment 2, but it may not have been noticed at the time.

You need to log in before you can comment on or make changes to this bug.