New issue
Advanced search Search tips

Issue 875160 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocked on:
issue 864398



Sign in to add a comment

[LayoutNG] Floats are not propagated to BFC ancestor LayoutBlockFlow

Project Member Reported by kojii@chromium.org, Aug 17

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?
 
float-overlap.html
293 bytes View Download
Cc: atotic@chromium.org
atotic@ at the moment is working on a new way of painting floats at the moment, which means we don't need to do this float propagation up. 
Thank you for the info, can't wait for it!
Blockedon: 864398
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