Commit 89f0524
[anchor] Fix under-invalidation of position-try-fallbacks.
*** Duplicate of: https://chromium-review.googlesource.com/c/chromium/src/+/7819103
(as other patch wouldn't trigger CQ).
When we use a different fallback style, we recalc the style, then set it
on the element, but with ApplyStyleChanges::kNo set.
This results in no invalidation from the style changing.
If we have two fallback options which both invoke layout (within
ComputeOofBlockDimensions) with different constraints, they may end up
hitting each other's layout cache resulting in incorrect layout.
For the moment fix this by manually invalidating layout when the style
changes on the layout object.
The downside of this approach is that if we revisit the same OOF
multiple times, we need to relayout multiple times. Conceptually we
could have a smarter measure cache which also takes a style so that we
could do a deep equality check on it.
Bug: 486806596
Change-Id: I22dd5c28d784b5886a61eb8ad40aa006de54a6cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7828781
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Auto-Submit: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1627027}1 parent a68014e commit 89f0524
1 file changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments