Bug 1673349 [wpt PR 26284] - [scroll-animations] Handle element-based offsets with...
commitcb87d1b6ebec1e35c04073f8a2709dda042a2162
authorAnders Hartvoll Ruud <andruud@chromium.org>
Mon, 2 Nov 2020 20:23:47 +0000 (2 20:23 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 4 Nov 2020 10:10:01 +0000 (4 10:10 +0000)
tree272ae98a3f6a7223df3635be8e958c1b57fe2f9a
parent05c9d7ed3f4b99b640327e1e3def0b8b368d3c70
Bug 1673349 [wpt PR 26284] - [scroll-animations] Handle element-based offsets with null targets, a=testonly

Automatic update from web-platform-tests
[scroll-animations] Handle element-based offsets with null targets

Currently we assume that element-based offsets always have non-null
targets ResolveOffset-time, since we enforce this during the creation
of the (non-CSS) ScrollTimelines.

However, for CSSScrollTimelines, we can't invalidate the rule this way,
since we're referring to an element indirectly via an ID, not with a
pointer to a specific element.

Checking whether or not the target is null during ResolveOffset fixes
this, and it's also what we're supposed to be doing per spec.

This fixes a crash when using @scroll-timelines with element-based
offsets that reference non-existent IDs.

Also removed a nearby comment that's outdated (but not strictly
related to the change in this CL).

Bug: 10740521102788
Change-Id: I4e138b55c3ef8cb122c58755a72a586e94c97e69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2498463
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821682}

--

wpt-commits: 305dadc1abc586626e8605a3f9301b46f8baa4bb
wpt-pr: 26284
testing/web-platform/tests/scroll-animations/css/at-scroll-timeline-element-offsets.html