[scroll-animations] Create DeferredTimelines lazily [chromium/src : main]

0 views
Skip to first unread message

Anders Hartvoll Ruud (Gerrit)

unread,
Jan 13, 2026, 11:28:18 AM (yesterday) Jan 13
to David Awogbemila, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from David Awogbemila

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • David Awogbemila
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I166127fef1a68cb7939a8bcab859a8a4b0a29f27
Gerrit-Change-Number: 7415341
Gerrit-PatchSet: 3
Gerrit-Owner: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
Gerrit-Reviewer: David Awogbemila <awogb...@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: Tue, 13 Jan 2026 16:28:05 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Awogbemila (Gerrit)

unread,
12:00 AM (16 hours ago) 12:00 AM
to Anders Hartvoll Ruud, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Anders Hartvoll Ruud

David Awogbemila voted and added 2 comments

Votes added by David Awogbemila

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
David Awogbemila . resolved

LGTM

File third_party/blink/renderer/core/animation/deferred_timeline.h
Open in Gerrit

Related details

Attention is currently required from:
  • Anders Hartvoll Ruud
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: I166127fef1a68cb7939a8bcab859a8a4b0a29f27
    Gerrit-Change-Number: 7415341
    Gerrit-PatchSet: 3
    Gerrit-Owner: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Comment-Date: Wed, 14 Jan 2026 05:00:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Anders Hartvoll Ruud (Gerrit)

    unread,
    5:03 AM (11 hours ago) 5:03 AM
    to David Awogbemila, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-...@chromium.org

    Anders Hartvoll Ruud voted and added 1 comment

    Votes added by Anders Hartvoll Ruud

    Commit-Queue+2

    1 comment

    File third_party/blink/renderer/core/animation/deferred_timeline.h
    David Awogbemila . resolved

    `timeline-scope`?

    Anders Hartvoll Ruud

    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: I166127fef1a68cb7939a8bcab859a8a4b0a29f27
    Gerrit-Change-Number: 7415341
    Gerrit-PatchSet: 4
    Gerrit-Owner: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Comment-Date: Wed, 14 Jan 2026 10:03:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: David Awogbemila <awogb...@chromium.org>
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    5:59 AM (10 hours ago) 5:59 AM
    to Anders Hartvoll Ruud, David Awogbemila, Menard, Alexis, chromium...@chromium.org, Olga Gerchikov, blink-revie...@chromium.org, blink-...@chromium.org

    Chromium LUCI CQ submitted the change with unreviewed changes

    Unreviewed changes

    3 is the latest approved patch-set.
    The change was submitted with unreviewed changes in the following files:

    ```
    The name of the file: third_party/blink/renderer/core/animation/deferred_timeline.h
    Insertions: 1, Deletions: 1.

    @@ -22,7 +22,7 @@
    // their state from) are later attached by the animation update of a descendant
    // element (see CSSAnimations::CalculateTimelineAttachmentUpdate()).
    //
    -// https://drafts.csswg.org/scroll-animations-1/#timeline-name-scope
    +// https://drafts.csswg.org/scroll-animations-1/#timeline-scope
    class CORE_EXPORT DeferredTimeline : public ScrollSnapshotTimeline {
    public:
    explicit DeferredTimeline(Document*);
    ```

    Change information

    Commit message:
    [scroll-animations] Create DeferredTimelines lazily

    The timeline-scope property currently accepts a list of names,
    and each such name results in a DeferredTimeline being eagerly created
    on the relevant element. This approach does not work for
    timeline-scope:all; eagerly creating all possible timelines
    on an element isn't viable.

    Instead, each element now holds a CSSDeferredTimelineMap, which
    logically contains all possible DeferredTimelines by default
    (but doesn't really), and timeline-scope merely *filters* the subset
    of DeferredTimelines that are reachable.

    When looking for a DeferredTimeline to attach to in the ancestor chain
    (CalculateTimelineAttachmentUpdate()), the act of looking for it will
    now *create* it (if needed) behind the scenes---provided that
    the lookup matches the specified filter. This makes it obvious how
    to implement 'all': just use a CSSDeferredTimelineMap with no filter.

    Note that CSSDeferredTimelineMap holds DeferredTimelines internally
    using weak references. This means that "unused" DeferredTimelines will
    disappear from the CSSDeferredTimelineMap during GC. This is assumed
    to be fine; a non-retained DeferredTimeline implies that no scroll/view
    timeline is attached to it, *and* that no animations are playing on it.
    Note also that DeferredTimelines cannot be held (directly) by JS,
    and they are generally not exposed through APIs; see DeferredTimeline::
    ExposedTimeline().
    Bug: 41488030
    Change-Id: I166127fef1a68cb7939a8bcab859a8a4b0a29f27
    Commit-Queue: Anders Hartvoll Ruud <and...@chromium.org>
    Reviewed-by: David Awogbemila <awogb...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1569013}
    Files:
    • M third_party/blink/renderer/core/animation/BUILD.gn
    • M third_party/blink/renderer/core/animation/css/css_animation_update.cc
    • M third_party/blink/renderer/core/animation/css/css_animation_update.h
    • M third_party/blink/renderer/core/animation/css/css_animations.cc
    • M third_party/blink/renderer/core/animation/css/css_animations.h
    • M third_party/blink/renderer/core/animation/css/css_animations_test.cc
    • A third_party/blink/renderer/core/animation/css/css_timeline_map.cc
    • M third_party/blink/renderer/core/animation/css/css_timeline_map.h
    • M third_party/blink/renderer/core/animation/deferred_timeline.h
    Change size: L
    Delta: 9 files changed, 198 insertions(+), 99 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +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: I166127fef1a68cb7939a8bcab859a8a4b0a29f27
    Gerrit-Change-Number: 7415341
    Gerrit-PatchSet: 5
    Gerrit-Owner: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Anders Hartvoll Ruud <and...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: David Awogbemila <awogb...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages