commit | 80f6578864d46f8545ffbbafa1d6f73478c2e23c | [log] [tgz] |
---|---|---|
author | Chris Harrelson <chrishtr@chromium.org> | Wed Aug 01 01:41:16 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Aug 01 01:41:16 2018 |
tree | 349f06c415f58ee7e546e34078f7d27b195454eb | |
parent | 274bfa5ec8853bfa1232259e8f45a47be4ac206c [diff] |
Account for float under positioned inline when computing offsets. The containing block of a float is the containing *block*, meaning that it is an actual block and therefore does not include inlines. This means that floats and positioned elements can have mutually inconsistent containing block chains. Example: <div id=root> <span style='position: relative'> <div style='float: left'> <span style='position: absolute'></span> </div> </span> </div> In this example, the containing block of the abs-pos span is the rel-pos span. However, the containing block of the float is the root element. Therefore the containing block chains mutually cross each other. Other than floats, containing blocks do not have this behavior. IOW if there are no floats, and ContainingBlock(A) = B, then for any element C between A and B in the DOM parent chain, B is in its containing block chain. Bug: 823748 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I4038aa6db33af53b04721760d6ee32904ac7a727 Reviewed-on: https://chromium-review.googlesource.com/1156136 Reviewed-by: Stephen Chenney <schenney@chromium.org> Commit-Queue: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#579662}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .