Change information
Commit message:
Revert "[soft navs] Refactor pending ICP entry buffering"
This reverts commit abe0507666c40f9ebd93498eaf2a76f4ddabadf5.
Reason for revert: The prerequisite for this patch was speculatively
reverted for crbug.com/469686890. It's very unlikely that reverting
that will fix the issue, but since this depends on the reverted patch,
this should be reverted to rule out this causing a problem.
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 <mmo...@chromium.org>
> Commit-Queue: Scott Haseley <shas...@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1559386}
Bug: 454082771, 454082773
Change-Id: I2067245e984a90b0046f9f41f6ddbd02a748e653
Cr-Commit-Position: refs/heads/main@{#1560971}
Files:
- M third_party/blink/renderer/core/timing/soft_navigation_context.cc
- M third_party/blink/renderer/core/timing/soft_navigation_context.h
- M third_party/blink/renderer/core/timing/soft_navigation_heuristics.cc
- M third_party/blink/renderer/core/timing/soft_navigation_heuristics.h
- M third_party/blink/renderer/core/timing/window_performance.cc
- M third_party/blink/renderer/core/timing/window_performance.h
- M third_party/blink/web_tests/external/wpt/soft-navigation-heuristics/smoke/tentative/late-url-change.html
Change size: L
Delta: 7 files changed, 103 insertions(+), 151 deletions(-)
Branch: refs/heads/main
Submit Requirements:
Code-Review: +1 by Johannes Henkel