Reset image animation when off from layout and prevent store normal [chromium/src : main]

0 views
Skip to first unread message

Seokho Song (Gerrit)

unread,
Apr 27, 2026, 9:51:45 AMApr 27
to Florin Malita, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Olga Gerchikov, Stephen Chenney, Menard, Alexis, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, drott+bl...@chromium.org, blink-re...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, apavlo...@chromium.org, fmalit...@chromium.org, blink-rev...@chromium.org
Attention needed from Florin Malita

Seokho Song voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Florin Malita
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iff5306cafb4a13ab46783fe29cd56838ee3789f0
Gerrit-Change-Number: 7771511
Gerrit-PatchSet: 9
Gerrit-Owner: Seokho Song <seo...@chromium.org>
Gerrit-Reviewer: Florin Malita <fma...@chromium.org>
Gerrit-Reviewer: Seokho Song <seo...@chromium.org>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-Attention: Florin Malita <fma...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Apr 2026 13:51:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Florin Malita (Gerrit)

unread,
May 1, 2026, 11:33:59 AM (14 days ago) May 1
to Seokho Song, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Olga Gerchikov, Stephen Chenney, Menard, Alexis, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, drott+bl...@chromium.org, blink-re...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, apavlo...@chromium.org, fmalit...@chromium.org, blink-rev...@chromium.org
Attention needed from Seokho Song

Florin Malita added 3 comments

File third_party/blink/renderer/core/css/resolver/style_adjuster.cc
Line 1146, Patchset 9 (Latest): builder.SetPreviousImageAnimation(state.OldStyle()->ImageAnimation());
Florin Malita . unresolved

Would this be problematic if style recalc is triggered by other properties?

E.g.

initial: normal, update: running -> prev normal, current running
(some other property update) -> prev running, current running

If we only care about state transitions, we should prolly check that the old style value is different before updating.

Also should we guard this on the runtime feature?

File third_party/blink/renderer/platform/graphics/image_node_animation_info.h
Line 50, Patchset 9 (Latest): bool is_image_animation_shared_timeline_ = false;
bool has_previous_image_animation_ = false;
Florin Malita . unresolved

I would prefer to keep the struct simple, and have the shared timeline deduction code close to the other image-animation logic in PaintImageForCurrentFrameWithInfo. Maybe just store a `std::optional<ImageAnimationEnum> previous_image_animation here`?

Line 34, Patchset 9 (Latest): if (prev != image_animation) {
is_image_animation_shared_timeline_ =
image_animation == ImageAnimationEnum::kNormal ||
(image_animation == ImageAnimationEnum::kRunning &&
prev == ImageAnimationEnum::kNormal);
} else {
is_image_animation_shared_timeline_ =
image_animation == ImageAnimationEnum::kNormal;
}
Florin Malita . unresolved
I think we can simplify this to just
```
is_image_animation_shared_timeline_ =
image_animation == ImageAnimationEnum::kNormal ||
(image_animation == ImageAnimationEnum::kRunning &&
prev == ImageAnimationEnum::kNormal);
```
Open in Gerrit

Related details

Attention is currently required from:
  • Seokho Song
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Iff5306cafb4a13ab46783fe29cd56838ee3789f0
    Gerrit-Change-Number: 7771511
    Gerrit-PatchSet: 9
    Gerrit-Owner: Seokho Song <seo...@chromium.org>
    Gerrit-Reviewer: Florin Malita <fma...@chromium.org>
    Gerrit-Reviewer: Seokho Song <seo...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-Attention: Seokho Song <seo...@chromium.org>
    Gerrit-Comment-Date: Fri, 01 May 2026 15:33:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Seokho Song (Gerrit)

    unread,
    May 4, 2026, 5:19:52 AM (11 days ago) May 4
    to Florin Malita, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Olga Gerchikov, Stephen Chenney, Menard, Alexis, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, drott+bl...@chromium.org, blink-re...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, apavlo...@chromium.org, fmalit...@chromium.org, blink-rev...@chromium.org
    Attention needed from Florin Malita

    Seokho Song added 3 comments

    File third_party/blink/renderer/core/css/resolver/style_adjuster.cc
    Line 1146, Patchset 9: builder.SetPreviousImageAnimation(state.OldStyle()->ImageAnimation());
    Florin Malita . resolved

    Would this be problematic if style recalc is triggered by other properties?

    E.g.

    initial: normal, update: running -> prev normal, current running
    (some other property update) -> prev running, current running

    If we only care about state transitions, we should prolly check that the old style value is different before updating.

    Also should we guard this on the runtime feature?

    Seokho Song

    First, the previous implementation was incorrect because this function is never called when cached. Therefore, I moved it to `RunUncacheableStyleAdjustment`.

    Second, while setting the value itself might not be problematic from a behavioral perspective, I agree that we should add an explicit check.

    I've also added the flag!

    File third_party/blink/renderer/platform/graphics/image_node_animation_info.h
    Line 50, Patchset 9: bool is_image_animation_shared_timeline_ = false;
    bool has_previous_image_animation_ = false;
    Florin Malita . resolved

    I would prefer to keep the struct simple, and have the shared timeline deduction code close to the other image-animation logic in PaintImageForCurrentFrameWithInfo. Maybe just store a `std::optional<ImageAnimationEnum> previous_image_animation here`?

    Seokho Song

    Ah yes. That's good idea.

    Line 34, Patchset 9: if (prev != image_animation) {

    is_image_animation_shared_timeline_ =
    image_animation == ImageAnimationEnum::kNormal ||
    (image_animation == ImageAnimationEnum::kRunning &&
    prev == ImageAnimationEnum::kNormal);
    } else {
    is_image_animation_shared_timeline_ =
    image_animation == ImageAnimationEnum::kNormal;
    }
    Florin Malita . resolved
    I think we can simplify this to just
    ```
    is_image_animation_shared_timeline_ =
    image_animation == ImageAnimationEnum::kNormal ||
    (image_animation == ImageAnimationEnum::kRunning &&
    prev == ImageAnimationEnum::kNormal);
    ```
    Seokho Song

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Florin Malita
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Iff5306cafb4a13ab46783fe29cd56838ee3789f0
      Gerrit-Change-Number: 7771511
      Gerrit-PatchSet: 12
      Gerrit-Owner: Seokho Song <seo...@chromium.org>
      Gerrit-Reviewer: Florin Malita <fma...@chromium.org>
      Gerrit-Reviewer: Seokho Song <seo...@chromium.org>
      Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-CC: Stephen Chenney <sche...@chromium.org>
      Gerrit-Attention: Florin Malita <fma...@chromium.org>
      Gerrit-Comment-Date: Mon, 04 May 2026 09:19:21 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Florin Malita <fma...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Seokho Song (Gerrit)

      unread,
      May 5, 2026, 5:39:31 AM (10 days ago) May 5
      to Anders Hartvoll Ruud, Florin Malita, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Olga Gerchikov, Stephen Chenney, Menard, Alexis, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, drott+bl...@chromium.org, blink-re...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, apavlo...@chromium.org, fmalit...@chromium.org, blink-rev...@chromium.org
      Attention needed from Anders Hartvoll Ruud and Florin Malita

      Seokho Song added 1 comment

      Patchset-level comments
      File-level comment, Patchset 12 (Latest):
      Seokho Song . resolved

      +Anders for core/css :)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Anders Hartvoll Ruud
      • Florin Malita
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Iff5306cafb4a13ab46783fe29cd56838ee3789f0
      Gerrit-Change-Number: 7771511
      Gerrit-PatchSet: 12
      Gerrit-Owner: Seokho Song <seo...@chromium.org>
      Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
      Gerrit-Reviewer: Florin Malita <fma...@chromium.org>
      Gerrit-Reviewer: Seokho Song <seo...@chromium.org>
      Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-CC: Stephen Chenney <sche...@chromium.org>
      Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
      Gerrit-Attention: Florin Malita <fma...@chromium.org>
      Gerrit-Comment-Date: Tue, 05 May 2026 09:39:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Rune Lillesveen (Gerrit)

      unread,
      May 6, 2026, 5:27:22 AM (9 days ago) May 6
      to Seokho Song, Rune Lillesveen, Florin Malita, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Olga Gerchikov, Stephen Chenney, Menard, Alexis, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, drott+bl...@chromium.org, blink-re...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, apavlo...@chromium.org, fmalit...@chromium.org, blink-rev...@chromium.org
      Attention needed from Florin Malita and Seokho Song

      Rune Lillesveen added 1 comment

      Commit Message
      Line 25, Patchset 12 (Latest):`BitmapImage` via the `ImageNodeAnimationInfo` struct.
      Rune Lillesveen . unresolved

      It don't think it makes sense to track this on ComputedStyle. Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Florin Malita
      • Seokho Song
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Iff5306cafb4a13ab46783fe29cd56838ee3789f0
        Gerrit-Change-Number: 7771511
        Gerrit-PatchSet: 12
        Gerrit-Owner: Seokho Song <seo...@chromium.org>
        Gerrit-Reviewer: Florin Malita <fma...@chromium.org>
        Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
        Gerrit-Reviewer: Seokho Song <seo...@chromium.org>
        Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
        Gerrit-CC: Stephen Chenney <sche...@chromium.org>
        Gerrit-Attention: Florin Malita <fma...@chromium.org>
        Gerrit-Attention: Seokho Song <seo...@chromium.org>
        Gerrit-Comment-Date: Wed, 06 May 2026 09:27:09 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Seokho Song (Gerrit)

        unread,
        May 6, 2026, 9:13:46 AM (9 days ago) May 6
        to Rune Lillesveen, Florin Malita, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Olga Gerchikov, Stephen Chenney, Menard, Alexis, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, drott+bl...@chromium.org, blink-re...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, apavlo...@chromium.org, fmalit...@chromium.org, blink-rev...@chromium.org
        Attention needed from Florin Malita and Rune Lillesveen

        Seokho Song added 1 comment

        Commit Message
        Line 25, Patchset 12 (Latest):`BitmapImage` via the `ImageNodeAnimationInfo` struct.
        Rune Lillesveen . unresolved

        It don't think it makes sense to track this on ComputedStyle. Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

        Seokho Song

        Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

        Hmm, IIUC, does this mean the old style might not exist for various reasons other than DOM tree reattachment? If so, we can't use this approach here for [the same reason here](https://chromium-review.googlesource.com/c/chromium/src/+/7727509/comment/ebcaa4e3_53468901/)...

        We might need to find the right place to store this information, perhaps in `ElementRareData` (similar to [this one](https://chromium-review.googlesource.com/c/chromium/src/+/7692355)) to explicitly track the previous style and reattachment.

        WDYT @fma...@chromium.org?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Florin Malita
        • Rune Lillesveen
        Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
        Gerrit-Attention: Florin Malita <fma...@chromium.org>
        Gerrit-Comment-Date: Wed, 06 May 2026 13:13:21 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Rune Lillesveen <fut...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Florin Malita (Gerrit)

        unread,
        May 6, 2026, 10:57:54 AM (9 days ago) May 6
        to Seokho Song, Rune Lillesveen, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Olga Gerchikov, Stephen Chenney, Menard, Alexis, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, drott+bl...@chromium.org, blink-re...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, apavlo...@chromium.org, fmalit...@chromium.org, blink-rev...@chromium.org
        Attention needed from Rune Lillesveen and Seokho Song

        Florin Malita added 1 comment

        Commit Message
        Line 25, Patchset 12 (Latest):`BitmapImage` via the `ImageNodeAnimationInfo` struct.
        Rune Lillesveen . unresolved

        It don't think it makes sense to track this on ComputedStyle. Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

        Seokho Song

        Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

        Hmm, IIUC, does this mean the old style might not exist for various reasons other than DOM tree reattachment? If so, we can't use this approach here for [the same reason here](https://chromium-review.googlesource.com/c/chromium/src/+/7727509/comment/ebcaa4e3_53468901/)...

        We might need to find the right place to store this information, perhaps in `ElementRareData` (similar to [this one](https://chromium-review.googlesource.com/c/chromium/src/+/7692355)) to explicitly track the previous style and reattachment.

        WDYT @fma...@chromium.org?

        Florin Malita

        Storing in `ElementRareData` makes sense to me.

        I think Ian also suggested something similar at some point, and one of the issues I ran into was I could not easily locate a good place to update the value (no `StyleDidChange` equivalent for `Element`/`Node`). But I didn't look too hard, I'm sure there's a way.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Rune Lillesveen
        • Seokho Song
        Gerrit-Attention: Seokho Song <seo...@chromium.org>
        Gerrit-Comment-Date: Wed, 06 May 2026 14:57:43 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Rune Lillesveen <fut...@chromium.org>
        Comment-In-Reply-To: Seokho Song <seo...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Rune Lillesveen (Gerrit)

        unread,
        May 7, 2026, 2:57:54 AM (8 days ago) May 7
        to Seokho Song, Rune Lillesveen, Florin Malita, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Olga Gerchikov, Stephen Chenney, Menard, Alexis, android-bu...@system.gserviceaccount.com, blink-revie...@chromium.org, drott+bl...@chromium.org, blink-re...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, apavlo...@chromium.org, fmalit...@chromium.org, blink-rev...@chromium.org
        Attention needed from Seokho Song

        Rune Lillesveen added 2 comments

        Commit Message
        Line 25, Patchset 12:`BitmapImage` via the `ImageNodeAnimationInfo` struct.
        Rune Lillesveen . unresolved

        It don't think it makes sense to track this on ComputedStyle. Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

        Seokho Song

        Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

        Hmm, IIUC, does this mean the old style might not exist for various reasons other than DOM tree reattachment? If so, we can't use this approach here for [the same reason here](https://chromium-review.googlesource.com/c/chromium/src/+/7727509/comment/ebcaa4e3_53468901/)...

        We might need to find the right place to store this information, perhaps in `ElementRareData` (similar to [this one](https://chromium-review.googlesource.com/c/chromium/src/+/7692355)) to explicitly track the previous style and reattachment.

        WDYT @fma...@chromium.org?

        Rune Lillesveen

        Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

        Hmm, IIUC, does this mean the old style might not exist for various reasons other than DOM tree reattachment?

        There will be an old style, but there might be intermediate style changes which are never passed on to the paint code. I've suggested a way this can be observed in the test you're adding.

        File third_party/blink/web_tests/external/wpt/css/css-image-animation/image-animation-display-none-reset.tentative.html
        Line 36, Patchset 12: img1.style.imageAnimation = 'paused';
        Rune Lillesveen . unresolved

        I think you would see the multiple style-change events issue with storing the old value on ComputedStyle if you add these two lines here:

        ```
        getComputedStyle(img1).color;
        img1.style.color = 'red';
        ```

        which should set both the new and old value to 'paused' for the next paint.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Seokho Song
        Gerrit-Attention: Seokho Song <seo...@chromium.org>
        Gerrit-Comment-Date: Thu, 07 May 2026 06:57:39 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Seokho Song (Gerrit)

        unread,
        May 7, 2026, 11:17:52 AM (8 days ago) May 7
        to Rune Lillesveen, Florin Malita, Chromium LUCI CQ, chromium...@chromium.org, Dirk Schulze, Olga Gerchikov, Stephen Chenney, Menard, Alexis, android-bu...@system.gserviceaccount.com, blink-re...@chromium.org, blink-revie...@chromium.org, drott+bl...@chromium.org, blink-re...@chromium.org, fserb...@chromium.org, kinuko...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, blink-revie...@chromium.org, blink-rev...@chromium.org, apavlo...@chromium.org, fmalit...@chromium.org, blink-rev...@chromium.org
        Attention needed from Florin Malita and Rune Lillesveen

        Seokho Song voted and added 3 comments

        Votes added by Seokho Song

        Commit-Queue+0

        3 comments

        Patchset-level comments
        File-level comment, Patchset 14:
        Seokho Song . resolved

        PTAL at the high-level approach. I'll polish the details tomorrow...

        Commit Message
        Line 25, Patchset 12:`BitmapImage` via the `ImageNodeAnimationInfo` struct.
        Rune Lillesveen . unresolved

        It don't think it makes sense to track this on ComputedStyle. Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

        Seokho Song

        Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

        Hmm, IIUC, does this mean the old style might not exist for various reasons other than DOM tree reattachment? If so, we can't use this approach here for [the same reason here](https://chromium-review.googlesource.com/c/chromium/src/+/7727509/comment/ebcaa4e3_53468901/)...

        We might need to find the right place to store this information, perhaps in `ElementRareData` (similar to [this one](https://chromium-review.googlesource.com/c/chromium/src/+/7692355)) to explicitly track the previous style and reattachment.

        WDYT @fma...@chromium.org?

        Rune Lillesveen

        Also, you may have an arbitrary number of style change events between paints, so the old image animation may be lost.

        Hmm, IIUC, does this mean the old style might not exist for various reasons other than DOM tree reattachment?

        There will be an old style, but there might be intermediate style changes which are never passed on to the paint code. I've suggested a way this can be observed in the test you're adding.

        Seokho Song

        Ah got it. Thanks! I've changed the approach to update/store previous image animation.

        File third_party/blink/web_tests/external/wpt/css/css-image-animation/image-animation-display-none-reset.tentative.html
        Line 36, Patchset 12: img1.style.imageAnimation = 'paused';
        Rune Lillesveen . resolved

        I think you would see the multiple style-change events issue with storing the old value on ComputedStyle if you add these two lines here:

        ```
        getComputedStyle(img1).color;
        img1.style.color = 'red';
        ```

        which should set both the new and old value to 'paused' for the next paint.

        Seokho Song

        Thanks, I added this to the test.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Florin Malita
        • Rune Lillesveen
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Iff5306cafb4a13ab46783fe29cd56838ee3789f0
        Gerrit-Change-Number: 7771511
        Gerrit-PatchSet: 16
        Gerrit-Owner: Seokho Song <seo...@chromium.org>
        Gerrit-Reviewer: Florin Malita <fma...@chromium.org>
        Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
        Gerrit-Reviewer: Seokho Song <seo...@chromium.org>
        Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
        Gerrit-CC: Stephen Chenney <sche...@chromium.org>
        Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
        Gerrit-Attention: Florin Malita <fma...@chromium.org>
        Gerrit-Comment-Date: Thu, 07 May 2026 15:17:20 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages