Skip to content

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jan 5, 2026

This patch address a few issues that affected the linked bug:

  1. For a triggered animation, when a related property, such as
    timeline-trigger, changes on a different element, we might fail to
    queue the animation up for a trigger attachment update, because, as
    far as it knows, the animating element's style didn't change.
  2. It can happen that we run style and note that we have a pending
    layout update (due to a timeline-trigger change) but we then skip[1]
    the layout update. Performing the trigger attachments updates in
    this scenario causes us to attach animations to triggers based on
    stale information.

To address 1., this patch has DocumentAnimations::triggered_animations_
consistently track animations whose styles declare trigger attachments
per the most recent style update.

To address 2., this patch avoids the trigger attachment update if we
know that we have a pending layout.

[1]
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/document.cc;l=2627?q=document::updatestyleandlayouttree&ss=chromium%2Fchromium%2Fsrc

Bug: 467869217
Change-Id: I3c94efb90e7a9338afe2173f0aa57e81016ed8d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7265794
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Reviewed-by: David Awogbemila <[email protected]>
Commit-Queue: David Awogbemila <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1564397}

This patch address a few issues that affected the linked bug:

1. For a triggered animation, when a related property, such as
   timeline-trigger, changes on a different element, we might fail to
   queue the animation up for a trigger attachment update, because, as
   far as it knows, the animating element's style didn't change.
2. It can happen that we run style and note that we have a pending
   layout update (due to a timeline-trigger change) but we then skip[1]
   the layout update. Performing the trigger attachments updates in
   this scenario causes us to attach animations to triggers based on
   stale information.

To address 1., this patch has DocumentAnimations::triggered_animations_
consistently track animations whose styles declare trigger attachments
per the most recent style update.

To address 2., this patch avoids the trigger attachment update if we
know that we have a pending layout.

[1]
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/document.cc;l=2627?q=document::updatestyleandlayouttree&ss=chromium%2Fchromium%2Fsrc

Bug: 467869217
Change-Id: I3c94efb90e7a9338afe2173f0aa57e81016ed8d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7265794
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Reviewed-by: David Awogbemila <[email protected]>
Commit-Queue: David Awogbemila <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1564397}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit c5cdba7 into master Jan 5, 2026
17 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-7265794 branch January 5, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants