[wpt-sync] Sync PR 15140 - [Animation Worklet] Do not allow undefined/NaN local time
Categories
(Testing :: web-platform-tests, defect, P4)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream error])
Sync web-platform-tests PR 15140 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/15140
Details from upstream follow.
Majid Valipour <majidvp@chromium.org> wrote:
[Animation Worklet] Do not allow undefined/NaN local time
Restrict localTime type so that NaN is considered invalid which brings us
in line with web-animation.Our implementation was previously incorrect as it would accept NaN and then
convert it into an unexpected base::TimeDelta.This patch restricts accepted input by switching EffectProxy.localTime from
'unrestricted double?' -> 'double?' and brings us in line with
ComputedEffectTiming.localTime as defined in Web-Animation. [1,2]As a side effect the attribute no longer accepts 'undefined'. Per webidl
'double?' is a nullable type which accepts a valid double, or null. So
anywhere we are setting local time to 'undefined' we should use 'null'
instead.Other changes:
- WorkletAnimation blink/cc are updated to never send NaN
- Update tests to not expect NaN and remove relevant checks
- Add DCHECKS in Animator to ensure local and current times are never NaN
- Update expectations to reflect now working tests
[1] https://drafts.csswg.org/web-animations-1/#dom-computedeffecttiming-localtime
[2] https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/animation/computed_effect_timing.idl?l=10Bug: 937456
Change-Id: I9a72e4023608980c8a64743bc6737202e4f70538
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1443864
Reviewed-by: Majid Valipour \<majidvp@chromium.org>
Reviewed-by: Stephen McGruer \<smcgruer@chromium.org>
Commit-Queue: Majid Valipour \<majidvp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658579}
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/4d9fd0880abb [wpt PR 15140] - [Animation Worklet] Do not allow undefined/NaN local time, a=testonly
Comment 2•5 years ago
|
||
bugherder |
Comment 3•5 years ago
|
||
bugherder |
Description
•