[animation-trigger] Ensure first frame reflects triggered animation [chromium/src : main]

0 views
Skip to first unread message

David Awogbemila (Gerrit)

unread,
Jan 8, 2026, 5:32:09 PM (5 days ago) Jan 8
to Kevin Ellis, Chromium LUCI CQ, Menard, Alexis, David Bokan, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Kevin Ellis

David Awogbemila voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Kevin Ellis
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: I2343bcad42ceb248eff20e175109b4042902b175
Gerrit-Change-Number: 7303389
Gerrit-PatchSet: 5
Gerrit-Owner: David Awogbemila <awogb...@chromium.org>
Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
Gerrit-CC: David Bokan <bo...@chromium.org>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
Gerrit-Attention: Kevin Ellis <kev...@chromium.org>
Gerrit-Comment-Date: Thu, 08 Jan 2026 22:32:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Kevin Ellis (Gerrit)

unread,
Jan 9, 2026, 12:31:39 PM (4 days ago) Jan 9
to David Awogbemila, Chromium LUCI CQ, Menard, Alexis, David Bokan, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from David Awogbemila

Kevin Ellis added 2 comments

File third_party/blink/renderer/core/animation/animation.cc
Line 2873, Patchset 6 (Latest): if (timeline_->IsMonotonicallyIncreasing()) {
Kevin Ellis . unresolved

Worth adding a comment here. Historically, OnValidateSnapshot was for scroll timelines, and now we have separate logic for scroll triggering with a monotonic timeline (though most of the logic is consistent).

Documentation for this method in the header file only mentions scroll timelines. Suggesting that we update the comment in the header file, and add a note here where we have the branching logic.

File third_party/blink/renderer/core/animation/scroll_snapshot_timeline.cc
Line 218, Patchset 6 (Latest): animations.erase(animation);
Kevin Ellis . unresolved

We are effectively forcing the hashset to be copied just so we can remove elements from the map. AnimationTimeline::GetAnimations returns a const ref.

An SDA animation will be doing extra work here. because of the potential for animation triggers. Instead can we do the following:

```
const HeapHashSet<WeakMember<Animation>>& animations = GetAnimations();
if (Runtime...) {
...
for (auto& [animation, behaviors] : trigger-BehaviorMap()) {
DCHECK(...);
// Avoid superfluous snapshot validation, by skipping the call if it will
// be invoked in the loop below.
if (!animations.Contains(animation)) {
animation->OnValidateSnapshot(true);
}
}
}
```
Open in Gerrit

Related details

Attention is currently required from:
  • David Awogbemila
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: I2343bcad42ceb248eff20e175109b4042902b175
    Gerrit-Change-Number: 7303389
    Gerrit-PatchSet: 6
    Gerrit-Owner: David Awogbemila <awogb...@chromium.org>
    Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
    Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
    Gerrit-CC: David Bokan <bo...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: David Awogbemila <awogb...@chromium.org>
    Gerrit-Comment-Date: Fri, 09 Jan 2026 17:31:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Awogbemila (Gerrit)

    unread,
    Jan 12, 2026, 11:00:08 AM (19 hours ago) Jan 12
    to Kevin Ellis, Chromium LUCI CQ, Menard, Alexis, David Bokan, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

    David Awogbemila voted Commit-Queue+1

    Commit-Queue+1
    Open in Gerrit

    Related details

    Attention set is empty
    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: I2343bcad42ceb248eff20e175109b4042902b175
    Gerrit-Change-Number: 7303389
    Gerrit-PatchSet: 7
    Gerrit-Owner: David Awogbemila <awogb...@chromium.org>
    Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
    Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
    Gerrit-CC: David Bokan <bo...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Comment-Date: Mon, 12 Jan 2026 15:59:58 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Awogbemila (Gerrit)

    unread,
    Jan 12, 2026, 11:00:47 AM (19 hours ago) Jan 12
    to Kevin Ellis, Chromium LUCI CQ, Menard, Alexis, David Bokan, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Kevin Ellis

    David Awogbemila added 2 comments

    File third_party/blink/renderer/core/animation/animation.cc
    Line 2873, Patchset 6: if (timeline_->IsMonotonicallyIncreasing()) {
    Kevin Ellis . unresolved

    Worth adding a comment here. Historically, OnValidateSnapshot was for scroll timelines, and now we have separate logic for scroll triggering with a monotonic timeline (though most of the logic is consistent).

    Documentation for this method in the header file only mentions scroll timelines. Suggesting that we update the comment in the header file, and add a note here where we have the branching logic.

    David Awogbemila

    Done

    File third_party/blink/renderer/core/animation/scroll_snapshot_timeline.cc
    Line 218, Patchset 6: animations.erase(animation);
    Kevin Ellis . unresolved

    We are effectively forcing the hashset to be copied just so we can remove elements from the map. AnimationTimeline::GetAnimations returns a const ref.

    An SDA animation will be doing extra work here. because of the potential for animation triggers. Instead can we do the following:

    ```
    const HeapHashSet<WeakMember<Animation>>& animations = GetAnimations();
    if (Runtime...) {
    ...
    for (auto& [animation, behaviors] : trigger-BehaviorMap()) {
    DCHECK(...);
    // Avoid superfluous snapshot validation, by skipping the call if it will
    // be invoked in the loop below.
    if (!animations.Contains(animation)) {
    animation->OnValidateSnapshot(true);
    }
    }
    }
    ```
    David Awogbemila

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Kevin Ellis
    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: I2343bcad42ceb248eff20e175109b4042902b175
    Gerrit-Change-Number: 7303389
    Gerrit-PatchSet: 7
    Gerrit-Owner: David Awogbemila <awogb...@chromium.org>
    Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
    Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
    Gerrit-CC: David Bokan <bo...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: Kevin Ellis <kev...@chromium.org>
    Gerrit-Comment-Date: Mon, 12 Jan 2026 16:00:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Kevin Ellis <kev...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kevin Ellis (Gerrit)

    unread,
    Jan 12, 2026, 12:43:45 PM (17 hours ago) Jan 12
    to David Awogbemila, Chromium LUCI CQ, Menard, Alexis, David Bokan, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from David Awogbemila

    Kevin Ellis voted and added 1 comment

    Votes added by Kevin Ellis

    Code-Review+1

    1 comment

    Patchset-level comments
    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Awogbemila
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement 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: I2343bcad42ceb248eff20e175109b4042902b175
    Gerrit-Change-Number: 7303389
    Gerrit-PatchSet: 7
    Gerrit-Owner: David Awogbemila <awogb...@chromium.org>
    Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
    Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
    Gerrit-CC: David Bokan <bo...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: David Awogbemila <awogb...@chromium.org>
    Gerrit-Comment-Date: Mon, 12 Jan 2026 17:43:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Awogbemila (Gerrit)

    unread,
    Jan 12, 2026, 12:44:28 PM (17 hours ago) Jan 12
    to Kevin Ellis, Chromium LUCI CQ, Menard, Alexis, David Bokan, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

    David Awogbemila voted and added 2 comments

    Votes added by David Awogbemila

    Code-Review+1
    Commit-Queue+2

    2 comments

    File third_party/blink/renderer/core/animation/animation.cc
    Line 2873, Patchset 6: if (timeline_->IsMonotonicallyIncreasing()) {
    Kevin Ellis . resolved

    Worth adding a comment here. Historically, OnValidateSnapshot was for scroll timelines, and now we have separate logic for scroll triggering with a monotonic timeline (though most of the logic is consistent).

    Documentation for this method in the header file only mentions scroll timelines. Suggesting that we update the comment in the header file, and add a note here where we have the branching logic.

    David Awogbemila

    Done

    David Awogbemila

    Done

    File third_party/blink/renderer/core/animation/scroll_snapshot_timeline.cc
    Line 218, Patchset 6: animations.erase(animation);
    Kevin Ellis . resolved

    We are effectively forcing the hashset to be copied just so we can remove elements from the map. AnimationTimeline::GetAnimations returns a const ref.

    An SDA animation will be doing extra work here. because of the potential for animation triggers. Instead can we do the following:

    ```
    const HeapHashSet<WeakMember<Animation>>& animations = GetAnimations();
    if (Runtime...) {
    ...
    for (auto& [animation, behaviors] : trigger-BehaviorMap()) {
    DCHECK(...);
    // Avoid superfluous snapshot validation, by skipping the call if it will
    // be invoked in the loop below.
    if (!animations.Contains(animation)) {
    animation->OnValidateSnapshot(true);
    }
    }
    }
    ```
    David Awogbemila

    Done

    David Awogbemila

    Done

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement 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: I2343bcad42ceb248eff20e175109b4042902b175
      Gerrit-Change-Number: 7303389
      Gerrit-PatchSet: 7
      Gerrit-Owner: David Awogbemila <awogb...@chromium.org>
      Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
      Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
      Gerrit-CC: David Bokan <bo...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Comment-Date: Mon, 12 Jan 2026 17:44:16 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Kevin Ellis <kev...@chromium.org>
      Comment-In-Reply-To: David Awogbemila <awogb...@chromium.org>
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Jan 12, 2026, 12:49:20 PM (17 hours ago) Jan 12
      to David Awogbemila, Kevin Ellis, Menard, Alexis, David Bokan, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [animation-trigger] Ensure first frame reflects triggered animation

      This change allows Blink to not only detect that an animation is
      triggered based on the output of the style and layout phases but also
      ensure that the triggered animation is reflected in the computed style
      of the animating element in the same frame as the trigger detection.

      As the trigger state update and the animations update are now done at
      the same time, there is no need to separate the UpdateState and
      UpdateAnimation functions, so they are combined.
      Bug: 469286970
      Change-Id: I2343bcad42ceb248eff20e175109b4042902b175
      Commit-Queue: David Awogbemila <awogb...@chromium.org>
      Reviewed-by: David Awogbemila <awogb...@chromium.org>
      Reviewed-by: Kevin Ellis <kev...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1567860}
      Files:
      • M third_party/blink/renderer/core/animation/animation.cc
      • M third_party/blink/renderer/core/animation/animation.h
      • M third_party/blink/renderer/core/animation/animation_timeline.cc
      • M third_party/blink/renderer/core/animation/animation_timeline.h
      • M third_party/blink/renderer/core/animation/animation_trigger.h
      • M third_party/blink/renderer/core/animation/document_animations.cc
      • M third_party/blink/renderer/core/animation/scroll_snapshot_timeline.cc
      • M third_party/blink/renderer/core/animation/timeline_trigger.cc
      • M third_party/blink/renderer/core/animation/timeline_trigger.h
      • M third_party/blink/web_tests/external/wpt/scroll-animations/animation-trigger/timeline-trigger-source-starts-in-trigger-range.tentative.html
      Change size: M
      Delta: 10 files changed, 58 insertions(+), 68 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Kevin Ellis, +1 by David Awogbemila
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I2343bcad42ceb248eff20e175109b4042902b175
      Gerrit-Change-Number: 7303389
      Gerrit-PatchSet: 8
      Gerrit-Owner: David Awogbemila <awogb...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
      Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
      open
      diffy
      satisfied_requirement

      Blink W3C Test Autoroller (Gerrit)

      unread,
      Jan 12, 2026, 3:01:59 PM (15 hours ago) Jan 12
      to David Awogbemila, Chromium LUCI CQ, Kevin Ellis, Menard, Alexis, David Bokan, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

      Message from Blink W3C Test Autoroller

      The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/57126

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement 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: I2343bcad42ceb248eff20e175109b4042902b175
      Gerrit-Change-Number: 7303389
      Gerrit-PatchSet: 8
      Gerrit-Owner: David Awogbemila <awogb...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
      Gerrit-Reviewer: Kevin Ellis <kev...@chromium.org>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-CC: David Bokan <bo...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Comment-Date: Mon, 12 Jan 2026 20:01:52 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages