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
CONTRIBUTING.md
Grant of License
----------------
By contributing to this repository, you and the company you represent, if the
company holds any copyrights in the contribution, grant to the W3C a perpetual,
non-exclusive, royalty-free, world-wide right and license under all of your
copyrights in this contribution to copy, publish, use, and modify the
contribution and to distribute the contribution under a BSD License or one with
more restrictive terms, as well as a right and license of the same scope to any
derivative works prepared by the W3C and based on or incorporating all or part
of the contribution. You further agree that any derivative works of this
contribution prepared by the W3C shall be solely owned by the W3C.
You state, to the best of your knowledge, that you, or the company you
represent, have all rights necessary to contribute the materials.
W3C will retain attribution of initial authorship to you. The W3C makes no
a-priori commitment to support or distribute contributions.
Disclaimer
----------
All content from this repository is provided as is, and W3C makes no
representations or warranties, express or implied, including, but not limited
to, warranties of merchantability, fitness for a particular purpose,
non-infringement, or title; nor that the contents of this repository are
suitable for any purpose. We make no representations, express or implied, that
the content of this repository or the use thereof indicates conformance to a
specification. All content is provided as-is to help reach interoperability.
Documentation
-------------
See [web-platform-tests.org](http://web-platform-tests.org/).
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...