Fix TimelineOffset crash with certain calc() expressions.
The scroll animation code assumed that all expressions were either
possible to evaluate at parse time (e.g. 10px
), or that were marked
as having to wait until layout (e.g. calc(10px + 10%)
). However,
there's a third case, namely calc() expressions that can be evaluated
but only when an element's style is being calculated (such as
calc(sign(1em - 1px) * 1px)
). Treat all calc() expressions the same
as those that have to wait until layout, in order to avoid crashes when
they occur; the standard generally doesn't distinguish between “trivial”
calc()s and other calc()s except in a few very specific cases.
Change-Id: Ie152723a934d43a2b8614c7d7644d486df4b59ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6054580
Commit-Queue: Kevin Ellis kevers@chromium.org
Auto-Submit: Steinar H Gunderson sesse@chromium.org
Reviewed-by: Kevin Ellis kevers@chromium.org
Cr-Commit-Position: refs/heads/main@{#1388895}