Closed Bug 1685071 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 27043 - Keep offset for composite background color animation

Categories

(Core :: Layout: Images, Video, and HTML Frames, task, P4)

task

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 27043 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/27043
Details from upstream follow.

b'Xida Chen <xidachen@chromium.org>' wrote:

Keep offset for composite background color animation

At this moment, our implementation only keeps the first and the
last keyframes for composite background color animation. This is
wrong, for example, we can having multiple keyframes like:
0%: { background-color: red }
10%: { background-color: green}
100% { background-color: blue}

This CL fixes the issue. The idea is to keep the offset which
we stored in CompositorKeyframeValues. In the above case, the
offsets would be [0, 0.1, 1].

Once we have that, here is how we do interpolation. Say that
the current progress is 0.4, then we know that it falls in to
the range of [0.1, 1], which means we need to interpolate from
green to blue. We need to adjust the progress (0.4) based on the
offsets. Basically scale [0.1, 1] to [0, 1], then the adjusted
progress should be (0.4-0.1) / (1-0.1). Layout tests are added
to ensure correctness.

Bug: 1153671
Change-Id: I6dffc82b5821fdf418f2b94331f567a239079730
Reviewed-on: https://chromium-review.googlesource.com/2597844
WPT-Export-Revision: 905c074ffd439f5db66ced87c49c319ee4eb3a18

Component: web-platform-tests → Layout: Images, Video, and HTML Frames
Product: Testing → Core

CI Results

Ran 14 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 3 tests

Status Summary

Firefox

PASS: 3

Chrome

PASS: 3

Safari

PASS: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f4b613935d4a [wpt PR 27043] - Keep offset for composite background color animation, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.