Closed Bug 1572780 Opened 3 months ago Closed 3 months ago

[wpt-sync] Sync PR 18345 - [ElementTiming] Fix background image loadTime

Categories

(Core :: Performance, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 18345 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/18345
Details from upstream follow.

Nicolás Peña Moreno <npm@chromium.org> wrote:

[ElementTiming] Fix background image loadTime

This change adds a map |background_image_timestamps_| of load timestamps of
background images tracked by StyleFetchedImage, which are the background images
with url. The map only tracks the load time, as |images_notified_| must still be
used to track the background image paints. Otherwise we'd only report an entry
per background image even when applied to multiple elements.

This change also makes computations a bit more efficient by only calling
base::TimeTicks::Now() on the first time we load an entry. It also fixes a
problem of calling Set() in between usages of an iterator, which is not allowed.
Before this change, the added test would crash due to this problem.

Bug: 879270, 986891
Change-Id: I86640f5587f69f94e13c429f3e55b3d5d6978cc0

Reviewed-on: https://chromium-review.googlesource.com/1745497
WPT-Export-Revision: fa48d2df82e5e80d9b8dee1b36bab16da8cb56a8

Component: web-platform-tests → Performance
Product: Testing → Core
Ran 1 tests and 1 subtests
OK     : 1
FAIL   : 1

New tests that have failures or other problems:
/element-timing/first-letter-background.html
    Element with elementtiming attribute and background image in first-letter is observable.: FAIL
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7982193408a5
[wpt PR 18345] - [ElementTiming] Fix background image loadTime, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b6dcecddad6
[wpt PR 18345] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.