[anchor] Support anchor-scope property
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}