commit d6ee96558a24bf5753a5b5fc3506f9e5cfa200ea
parent 71e95460481aa5596059e56aa631e8cb37c93d1f
Author: Scott Haseley <shaseley@chromium.org>
Date: Fri, 19 Dec 2025 09:31:57 +0000
Bug 2007041 [wpt PR 56874] - Revert "[soft navs] Refactor pending ICP entry buffering", a=testonly
Automatic update from web-platform-tests
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 <mmocny@chromium.org>
> Commit-Queue: Scott Haseley <shaseley@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1559386}
Bug: 454082771, 454082773
Change-Id: I2067245e984a90b0046f9f41f6ddbd02a748e653
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7278708
Reviewed-by: Johannes Henkel <johannes@chromium.org>
Commit-Queue: Scott Haseley <shaseley@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1560971}
--
wpt-commits: cdff174df0f5c15673f50c5b87b19e2d4ae6d439
wpt-pr: 56874
Diffstat:
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/testing/web-platform/tests/soft-navigation-heuristics/smoke/tentative/late-url-change.html b/testing/web-platform/tests/soft-navigation-heuristics/smoke/tentative/late-url-change.html
@@ -14,7 +14,7 @@
const URL = '/late-url-change';
navigateButton.addEventListener("click", async () => {
- content.innerHTML = '<img id="target" src="/images/lcp-256x256.png" elementtiming="test-image"></img>';
+ content.innerHTML = '<img src="/images/lcp-256x256.png" elementtiming="test-image"></img>';
const entries = await new Promise(resolve => {
new PerformanceObserver((list, observer) => {
@@ -31,8 +31,6 @@
const softNavPromise =
SoftNavigationTestHelper.getPerformanceEntries("soft-navigation");
- const icpPromise =
- SoftNavigationTestHelper.getPerformanceEntries("interaction-contentful-paint");
if (test_driver) {
test_driver.click(navigateButton);
@@ -45,10 +43,5 @@
assert_true(
entries[0].name.endsWith(URL),
'Unexpected Soft Navigation URL.');
-
- const icps = await helper.withTimeoutMessage(
- icpPromise, 'ICP not detected.', /*timeout=*/ 3000);
- assert_equals(icps.length, 1, 'Expected exactly one ICP entry.');
- assert_equals(icps[0].id, 'target', 'Expected ICP candidate to be "target"');
}, 'Soft Navigation Detection supports setting URL after paint');
</script>