Skip to content

merge_pr_57373

Choose a tag to compare

@github-actions github-actions released this 28 Jan 07:30

Revert "Implement the CSS image-animation property"

This reverts commit 0383d249f4843bcc19dbb6d201cc76d169c60cd7.

Reason for revert: suspect causing blink_unittests failure on Linux UBSan Test.

blink_unittests failed because of:

  • LayoutSelectionTest.TraverseLayoutObjectListStyleImage
  • LayoutTextCombineTest.ListItemStyleToImage
  • StyleResolverTest.CSSMarkerPseudoElement
  • UseCounterImplTest.CSSMarkerPseudoElementUA

First build failure:
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20UBSan%20Tests/13361/

Original change's description:

Implement the CSS image-animation property

Add support for the CSS image-animation property, which controls the
animated image playback. The property accepts three values:

  • normal: Default browser behavior
  • running: Per-element timeline
  • paused(tentative): Stop animated image

Currently, image animations are managed by ImageAnimationController in
the CC layer. The controller manages the animation information,
including the next frame index and length, ...etc, via PaintImage's
stable_id as a key.

The paint image has been created by BitmapImage::Draw and the image
shared the resource and paint image across the layout and styles if it
has same absolute URL by the WHATWG standard [1].

To pause, we should create new PaintImage with different paint id per
each style.

Therefore, pass the image animation information to the
BitmapImage::Draw() to create different PaintImage by the style. The
BitmapImage class now caches multiple PaintImage instances, which are
keyed by DOM node ID and the animation state. This enables per-element
animation.

Another approach is to duplicate the image resource manually. However,
this approach introduces another caching complexity on several layers.
Therefore, we will not pursue this approach.

Removing "reftest-wait" does not capture the pixels at the exact time on the Mac and it will cause flakiness. Therefore, the exception of -running test suites on Mac has been added to TestExpectations.

[1] https://html.spec.whatwg.org/multipage/rendering.html#images-3

Explainer: https://github.com/webplatformco/project-image-animation/tree/main/image-animation-property
Unofficial Draft: https://webplatform.design/projects/image-animation/image-animation-property/spec/overview
Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/0kUk5-6TAfM/m/7YVGLKzEBwAJ
Chromestatus Entry: https://chromestatus.com/feature/5078177326170112

Bug: 429459566
Change-Id: I6e5b6d6cccf6419c7c7c817a7082409e69a9c406
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7458159
Reviewed-by: Anders Hartvoll Ruud andruud@chromium.org
Commit-Queue: Seokho Song seokho@chromium.org
Reviewed-by: Florin Malita fmalita@chromium.org
Cr-Commit-Position: refs/heads/main@{#1575651}

Bug: 429459566
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ia26f9cef7a639659c289c50fae761fc412839e7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7526465
Owners-Override: Takashi Sakamoto tasak@google.com
Commit-Queue: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com
Auto-Submit: Takashi Sakamoto tasak@google.com
Bot-Commit: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com
Cr-Commit-Position: refs/heads/main@{#1575715}