Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LargestContentfulPaint] Fix loadTime for background images #18404

Merged
merged 1 commit into from Aug 15, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Aug 13, 2019

This CL fixes the loadTime of background images for the LargestContentfulPaint
web API. The StyleFetchedImage is now needed in the OnImageLoaded() method.
Instead of computing the timestamp again, we query it from the
ImageElementTiming class. This should be populated whenever ElementTiming is
enabled. While it is still behind a flag, it is set to 'stable' so it should be
on by default. A test is added to ensure that the loadTime is populated properly
in a case where it wouldn't be previously.

Bug: 965505, 986891
Change-Id: I7c3421006cec0dbd79c50a21ae055f11b7ce3ce2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1752295
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687242}

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.

Already reviewed downstream.

This CL fixes the loadTime of background images for the LargestContentfulPaint
web API. The StyleFetchedImage is now needed in the OnImageLoaded() method.
Instead of computing the timestamp again, we query it from the
ImageElementTiming class. This should be populated whenever ElementTiming is
enabled. While it is still behind a flag, it is set to 'stable' so it should be
on by default. A test is added to ensure that the loadTime is populated properly
in a case where it wouldn't be previously.

Bug: 965505, 986891
Change-Id: I7c3421006cec0dbd79c50a21ae055f11b7ce3ce2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1752295
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#687242}
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.

None yet

3 participants