Closed
Bug 1445064
Opened 6 years ago
Closed 6 years ago
[wpt-sync] Sync PR 9984 - [LayoutNG] Need parent's clearance offset when positioning child.
Categories
(Core :: CSS Parsing and Computation, enhancement, P4)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 9984 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/w3c/web-platform-tests/pull/9984 Details from upstream follow. Morten Stenshorne wrote: > [LayoutNG] Need parent's clearance offset when positioning child. > > If clear is specified on an element whose first piece of content is > inside a child (so that the element's BFC offset cannot be determined at > the beginning of layout), we need this child to know about the clearance > offset on the parent, or it will not be pushed below adjacent floats as > it should. Just pushing the parent, but leaving the children unaffected > by clearance won't do. We need this in order to be able to lay out in a > single pass (and apply clearance when we detect it, rather than doing > it on the element with 'clear' and relayout the children if something > moved). > > Since a constraint space's clearance offset is now "inherited" down the > tree, as long as we're within the same block formatting context, we now > also need to propagate the "is pushed by floats" flag upwards, or we > won't detect class C break points correctly. Without this the unit test > ClassCBreakPointBeforeBlockMarginCollapsing in > NGColumnLayoutAlgorithmTest would regress, because it would incorrectly > detect a class C break point before the break-inside:avoid block. > We must make sure that class C break points are only detected on the > outermost block that got pushed by floats, because it's there that > we'll get the gap between the inner edge of the container and the outer > edge of the child. > > Added some tests. One of them fails in legacy (but not in NG). One of > the tests, clear-on-child-with-margins.html, passes both with and > without this code change, but I started to wonder if we'd suddenly > could end up pulling the parent of the box with 'clear' downwards, so > thought I better add it, to make sure we don't regress in this regard. > > The test NoClassCBreakPointBeforeBfc in > NGColumnLayoutAlgorithmTest no longer needs its workaround, > because the display:flow-root child of #container now sets its > position correctly (past the float) right away. > > Acid2 also looks slightly better now! > > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng > Change-Id: I732b19398bd43b9874f6bb8c57ce435d1c510754 > > Reviewed-on: https://chromium-review.googlesource.com/957045 > WPT-Export-Revision: 2e710bc2656e2d7590816c97686300c37d3e63fc
Reporter | ||
Updated•6 years ago
|
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Reporter | ||
Comment 1•6 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=fa6b04ea11c557bbc19ea567583283284529c268
Reporter | ||
Comment 2•6 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=f42bca9ad18026a4a57e4d45de8d8336e4c64127
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/6e7ec7be3b52 [wpt PR 9984] - [LayoutNG] Need parent's clearance offset when positioning child., a=testonly
Comment 4•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6e7ec7be3b52
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6e7ec7be3b52
You need to log in
before you can comment on or make changes to this bug.
Description
•