Commit f54c89c
[layout] Fix OOF-positioned margin under-invalidation.
In crrev.com/c/7812714 we simplified the OOF layout code by making the
constraint-space construction the same for the two places where we
invoke layout on a non-replaced element.
This introduced an under-invaldation bug when margins change.
Previously when a margin changed, we'd calculate a new fixed-block size,
which would cause the cache-miss. Importantly for OOF-positioned we
don't mark the layout-object as dirty when a margin changes.
With the new code we would potentially just compare the
constraint-spaces directly (without computing the block-size), causes
the incorrect cache-hit.
Skipping the margin layout invalidation likely isn't important for
real-world use-cases so just mark a layout object as needing layout for
this case.
Additionally remove the two bespoke field-diffs:
- "margin" just becomes "layout" for OOF.
- "out-of-flow" switches to "inset", and now we just check if we have
non-static position.
Bug: 539404705
Change-Id: If54326af096c8cb30308e7274c515e859760ea9f1 parent 5a53ac9 commit f54c89c
1 file changed
Lines changed: 11 additions & 0 deletions
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments