Closed Bug 1436558 Opened 6 years ago Closed 6 years ago

[wpt-sync] PR 9430 - [LayoutNG] Mild cleanup and bugfixing of end margin strut handling.

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: mozilla.org, Assigned: jgraham)

Details

(Whiteboard: [wptsync upstream error])

Also some more documentation.

Tried to make the various situations a bit clearer, with documentation
and code. And shared code for layout abortion.

The code used to call MaybeUpdateFragmentBfcOffset() quite
unconditionally based on an *end* offset inside the block. I found it
confusing to use an end offset as a BFC start offset. The code was
correct, though, since MaybeUpdateFragmentBfcOffset() wouldn't do
anything if the BFC offset was already known (which would be the case
if had children with actual size, for instance, making for a strange
BFC offset in that case). We'll now only call
MaybeUpdateFragmentBfcOffset() if BFC offset is unknown.
That's the only time end_bfc_block_offset can actually be used as a BFC
start offset.

Fixed one bug, though: A block with explicit height:0 ate the input
margin, rather than letting it collapse through and propagate to
subsequent layout input nodes. The intention of the code was just to get
rid of the last child margin, since height was non-auto. Now we check if
we have a BFC offset before doing so. If we have BFC offset, it means
that no input margins should collapse through. And if we DON'T have a
BFC offset, leave the margins alone for subsequent layout input nodes.
Otherwise we'd just lose them.

The old layout test that now passes is actually because of this (dog ate
BODY top margin), but that probably wasn't too obvious, so I added a
dedicated WPT test for it.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Iec8cea316015c6d36ef6bab9acbe826513222b1d

Reviewed-on: https://chromium-review.googlesource.com/907549
WPT-Export-Revision: 0723ecc851a60c499cdaefc6eae42b1463fba772
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Ran 1 tests
PASS   : 1
[ Triage 2017/02/20: P3 ]
Priority: -- → P3
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/260c6ce91561
[wpt PR 9430] - [LayoutNG] Mild cleanup and bugfixing of end margin strut handling., a=testonly
Whiteboard: [wptsync downstream] → [wptsync upstream error]
https://hg.mozilla.org/mozilla-central/rev/260c6ce91561
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
After backing out https://bugzilla.mozilla.org/show_bug.cgi?id=1443558#c4 the wpt tests started mass failing as you can see on this push https://goo.gl/Awm6eR  

I decided to backout all the changesets from the original push https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?changeset=5138dcf1eddd750c06e05a784f170b771ba58f60 because of this mass wpt failures.
Status: RESOLVED → REOPENED
Ever confirmed: true
Flags: needinfo?(bugs)
Resolution: FIXED → ---
Target Milestone: mozilla60 → ---
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/86d6195a7936
[wpt PR 9430] - [LayoutNG] Mild cleanup and bugfixing of end margin strut handling., a=testonly
https://hg.mozilla.org/mozilla-central/rev/86d6195a7936
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Assignee: nobody → james
Flags: needinfo?(bugs)
You need to log in before you can comment on or make changes to this bug.