[anchor] Support anchor-scope property #46173
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The behavior of anchor-scope is similar to the previous behavior
we had for contain:style, and therefore this CL is based on that
code from futhark@. (Added in CL:5237173, and removed again
in CL:5378414).
We have to remove the optimizations that try to traverse/propagate
only the last item seen in tree order for a given name, since
anchor-scope effectively allows reaching past that last seen item.
For invalidation, we appear to already "aggressively" layout
out-of-flow elements whenever an element is marked for layout,
at least when anchor references are involved. Hence, we just need
to mark anchor-scope as invalidate:layout, and dependencies should
invalidate from that (covered by anchor-scope-dynamic.html).
Bug: 40281992
Change-Id: Ib8007cae39cc2e2481dc819b2608469d1f474350
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526614
Auto-Submit: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1303666}