Commit 5317966
ScopedVT: Preserve pseudo layout tree when scope is reattached.
Transition pseudos are special - their layout trees are constructed in
a separate step (StyleEngine::RebuildTransitionPseudoLayoutTrees) that
runs after the "normal" Element::RebuildLayoutTree descent.
That meant that if the scope was rebuilt due to a style change, its
pseudos would lose their existing layout objects during the scope's
Node::DetachLayoutTree, and RebuildTransitionPseudoLayoutTrees didn't
fix it because the pseudos are not marked NeedsReattachLayoutTree().
With this change, the transition pseudos hold on to their layout objects
while the scope is running Element::RebuildLayoutTree.
Bug: 432502908
Change-Id: I5ce8aa5dc5975eddf63c66124e4374552cfe27b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6777357
Commit-Queue: Steve Kobes <skobes@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1491622}1 parent 8c8776e commit 5317966
1 file changed
Lines changed: 53 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 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments