Skip to content

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

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

This is a reland of commit abe0507666c40f9ebd93498eaf2a76f4ddabadf5,
which was reverted because its prerequisite CL was reverted. There are
no changes in the reland.

Original change's description:

[soft navs] Refactor pending ICP entry buffering

Currently, SoftNavigationContext tracks the current largest text and
image records, and uses those to emit the ICP performance entry and
update metrics if and when the soft navigation entry is emitted. This CL
changes this flow so that now we track the latest un-emitted
InteractionContentfulPaint object and emit that directly. To do this,
the LCP calculator continuously updates its state and calls the Delegate
EmitPerformanceEntry method, but actual ICP emission is guarded there,
where we either create and emit it synchronously or buffer it for later.

This is being done because:

  1. To unify ICP and LCP and to better control lifetime of
    PaintTimingRecords (in advance of strongifying some of its fields),
    we want to move the largest text and image tracking into the LCP
    calculator. We don't plan to expose these values, as the records
    themselves shouldn't be persisted beyond getting presentation
    feedback, but SNC needs to buffer the latest candidate indefinitely.

  2. We plan to guarantee the Node and MediaObject are alive through this
    callback, which might not be the case now if the node is removed,
    and capturing the state here ensures we have what we need for
    emission.

Bug: 454082771, 454082773
Change-Id: I093d37960f774e5ca8946d8a0aa27cd9d592125f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7120640
Reviewed-by: Michal Mocny <[email protected]>
Commit-Queue: Scott Haseley <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1559386}

Bug: 454082771, 454082773
Change-Id: Id0b6545fa42c92dcb4fd99ffd79e4a2443660c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7397615
Commit-Queue: Scott Haseley <[email protected]>
Reviewed-by: Michal Mocny <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1564631}

This is a reland of commit abe0507666c40f9ebd93498eaf2a76f4ddabadf5,
which was reverted because its prerequisite CL was reverted. There are
no changes in the reland.

Original change's description:
> [soft navs] Refactor pending ICP entry buffering
>
> Currently, SoftNavigationContext tracks the current largest text and
> image records, and uses those to emit the ICP performance entry and
> update metrics if and when the soft navigation entry is emitted. This CL
> changes this flow so that now we track the latest un-emitted
> InteractionContentfulPaint object and emit that directly. To do this,
> the LCP calculator continuously updates its state and calls the Delegate
> EmitPerformanceEntry method, but actual ICP emission is guarded there,
> where we either create and emit it synchronously or buffer it for later.
>
> This is being done because:
>  1. To unify ICP and LCP and to better control lifetime of
>     PaintTimingRecords (in advance of strongifying some of its fields),
>     we want to move the largest text and image tracking into the LCP
>     calculator. We don't plan to expose these values, as the records
>     themselves shouldn't be persisted beyond getting presentation
>     feedback, but SNC needs to buffer the latest candidate indefinitely.
>
>  2. We plan to guarantee the Node and MediaObject are alive through this
>     callback, which might not be the case now if the node is removed,
>     and capturing the state here ensures we have what we need for
>     emission.
>
> Bug: 454082771, 454082773
> Change-Id: I093d37960f774e5ca8946d8a0aa27cd9d592125f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7120640
> Reviewed-by: Michal Mocny <[email protected]>
> Commit-Queue: Scott Haseley <[email protected]>
> Cr-Commit-Position: refs/heads/main@{#1559386}

Bug: 454082771, 454082773
Change-Id: Id0b6545fa42c92dcb4fd99ffd79e4a2443660c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7397615
Commit-Queue: Scott Haseley <[email protected]>
Reviewed-by: Michal Mocny <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1564631}
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 bff636b into master Jan 5, 2026
17 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-7397615 branch January 5, 2026 23:08
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.

4 participants