Reland "LCP: Use largest painted image for web-exposed entry"#57666
Open
chromium-wpt-export-bot wants to merge 1 commit intomasterfrom
Open
Reland "LCP: Use largest painted image for web-exposed entry"#57666chromium-wpt-export-bot wants to merge 1 commit intomasterfrom
chromium-wpt-export-bot wants to merge 1 commit intomasterfrom
Conversation
This is a reland of commit ec442fbb8bd40671c7094470747c870468191800. The reland updates the html for the failing tests to wrap each image in a div to prevent <body> from being an LCP candidate due to aggregated whitespace (crbug.com/466437443), which breaks test assumptions. Original change's description: > LCP: Use largest painted image for web-exposed entry > > We track both a largest painted image and largest pending image for LCP. > The largest painted image corresponds to the largest image we have > presentation time for. The largest pending image is the largest image > we've encountered but don't yet have presentation time for, i.e. because > it's still loading. > > The pending/painted distinction is used to prevent recording metrics for > pages that haven't finished loaded, but it also determines what gets > emitted to performance timeline (we test largest based on pending, not > painted). This causes us to suppress emitting new LCP candidates that > are smaller than the largest pending image, but larger than anything > presented so far, which is not specced behavior. > > This CL changes it so that we emit candidates based on the largest > painted image instead of largest pending image. This does not affect > UKM/metrics. This matches the behavior agreed upon by the WebPerf > Working Group at TPAC '25. > > Note: more changes are required for soft navs to match this behavior > since candidates can be overwritten during rendering/paint. This isn't > a problem for hard LCP since candidates are updated during presentation > callbacks, which are based on frame index. > > Chromestatus: https://chromestatus.com/feature/5167930847395840 > > Bug: 454067883 > Change-Id: I5275906769b07aca6c671c846756070333f2b09c > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7269039 > Reviewed-by: Michal Mocny <mmocny@chromium.org> > Commit-Queue: Scott Haseley <shaseley@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1581252} Bug: 454067883 Change-Id: Ib49860a2578c070a4ecd504b677d4c7ba02c847b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7558997 Reviewed-by: Michal Mocny <mmocny@chromium.org> Commit-Queue: Scott Haseley <shaseley@chromium.org> Cr-Commit-Position: refs/heads/main@{#1582017}
2d4c9b4 to
29b3c67
Compare
wpt-pr-bot
approved these changes
Feb 9, 2026
Collaborator
wpt-pr-bot
left a comment
There was a problem hiding this comment.
The review process for this patch is being conducted in the Chromium project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a reland of commit ec442fbb8bd40671c7094470747c870468191800.
The reland updates the html for the failing tests to wrap each image in
a div to prevent <body> from being an LCP candidate due to aggregated
whitespace (crbug.com/466437443), which breaks test assumptions.
Original change's description:
Bug: 454067883
Change-Id: Ib49860a2578c070a4ecd504b677d4c7ba02c847b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7558997
Reviewed-by: Michal Mocny <mmocny@chromium.org>
Commit-Queue: Scott Haseley <shaseley@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1582017}