[anchor] Support anchor()/anchor-size() in CSS Animations
The CSS Animations machinery does not use the StyleCascade/CSSProperty
code paths which handle CSSValue resolution and the AnchorScope
setup. Without an AnchorScope, any anchor query will fail to evaluate,
causing the fallback to be taken instead. If the fallback is not
present, however, we'll hit a CHECK, because that situation was
supposed to be already handled by StyleCascade::Resolve at an earlier
stage.
To take care of the IACVT issue, CSSMathFunction values are now resolved
through CSSInterpolationEnvironment::Resolve, which in turns calls
StyleCascade::Resolve). In addition, we need an AnchorScope
before ApplyStandardPropertyValue, which is where calls to ComputeLength
(and thus anchor query evaluation) take place.
It's possible that we're invalidating conversions a bit too much
(ResolvedValueChecker), but investigating whether or not that
is even avoidable will be treated as a separate issue.
Bug: 347031399
Change-Id: I44193862978e13af106f80fe0696f23cb94a9239
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5676550
Commit-Queue: Anders Hartvoll Ruud andruud@chromium.org
Reviewed-by: Rune Lillesveen futhark@chromium.org
Cr-Commit-Position: refs/heads/main@{#1323591}