[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/c/chromium/src/+/1745497Reviewed-by:Steve Kobes <skobes@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#686176}
Showing
Please register or sign in to comment