Revision b5b3c1f0c2c224e863e50ad3f78ed5af0d73981e authored by Morten Stenshorne on 13 March 2018, 11:29:55 UTC, committed by Blink WPT Bot on 13 March 2018, 11:37:14 UTC
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 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#542769}
1 parent c7a4bd8
File | Mode | Size |
---|---|---|
resources | ||
OWNERS | -rw-r--r-- | 44 bytes |
body-basic-manual.html | -rw-r--r-- | 981 bytes |
body-empty-manual.html | -rw-r--r-- | 1.2 KB |
common.js | -rw-r--r-- | 1.5 KB |
constructor-basic.html | -rw-r--r-- | 824 bytes |
constructor-invalid.html | -rw-r--r-- | 718 bytes |
event-onclick-manual.html | -rw-r--r-- | 870 bytes |
event-onclose.html | -rw-r--r-- | 1019 bytes |
event-onerror-default-manual.html | -rw-r--r-- | 1.0 KB |
event-onerror-denied-manual.html | -rw-r--r-- | 970 bytes |
event-onshow.html | -rw-r--r-- | 1014 bytes |
icon-basic-manual.html | -rw-r--r-- | 1006 bytes |
icon-empty-manual.html | -rw-r--r-- | 939 bytes |
instance.html | -rw-r--r-- | 2.0 KB |
interfaces.html | -rw-r--r-- | 3.1 KB |
lang.html | -rw-r--r-- | 2.3 KB |
permission.html | -rw-r--r-- | 535 bytes |
requestPermission-denied-manual.html | -rw-r--r-- | 773 bytes |
requestPermission-granted-manual.html | -rw-r--r-- | 566 bytes |
shownotification-resolve-manual.https.html | -rw-r--r-- | 1.7 KB |
tag-different-manual.html | -rw-r--r-- | 1.4 KB |
tag-same-manual.html | -rw-r--r-- | 1.4 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...