[LayoutNG] Floats are not propagated to BFC ancestor LayoutBlockFlow |
||
Issue description
From the investigation for:
fast/block/float/overlapping-floats-paint-hittest-order-1.html
This test fails because for a minimized HTML like this (attached):
<body>
<float id="f1"></float>
<div>
<float id="f2"></float>
</div>
</body>
In legacy:
1. #f2 is added to the div by InsertFloatingObject
2. Both #f1 and #f2 are propagated to root by AddOverhangingFloats
3. #f1 and #f2 are in the ordered list of the root, and painted in that order when painting the root.
In NG:
1. #f1 is InsertFloatingObject'ed, but #f2 is not.
2. NG doesn't propagate any floats to its BFC ancestor.
3. NGPaint paints #f2 when painting <div>, then legacy paints #f1.
https://crrev.com/c/1177297 can InsertFloatingObject floats that appear in inline formatting contexts, but it still doesn't fix the problem because FloatingObject are not propagated to their BFC ancestor.
From the paint/hit test perspective, it'd be easy if we can put them into BFC's FloatingObject. Do we prefer other way to solve this?
,
Aug 17
Thank you for the info, can't wait for it!
,
Aug 17
Restarting working on Floats today. Outline unexpectedly kicked my butt this week, I think I finally have a solution for outline. Float patch looks promising: Legacy has 1 regression: compositing/iframes/floating-self-painting-frame.html NG has 2 regressions fast/block/float-avoids-padding-inline-ancestors.html fast/block/float/relative-painted-twice.html and 2 fixes fast/block/float/nopaint-after-layer-destruction.html fast/block/float/overlapping-floats-paint-hittest-order-1.html Will try landing nong patch after I fix the single failure. Current code is at: https://chromium-review.googlesource.com/c/chromium/src/+/1139395 |
||
►
Sign in to add a comment |
||
Comment 1 by ikilpatrick@chromium.org
, Aug 17