[ElementTiming] Replace responseEnd with loadTime
This CL replaces responseEnd with loadTime in ElementTiming. Before, responseEnd would be used and would be problematic for memory cached images and for inline images (data scheme). We change it to loadTime, the time at which LayoutObject::ImageNotifyFinished is called. This is the same time as when LargestContentfulPaint computes loadTime. As they are both under runtime flags and the hooks are not unified, for simplicity we compute the timestamp again. This will not be too expensive for ElementTiming, as the timestamp is gated on the existence of the elementtiming attribute. To store the loadTime, we change images_notified_ to be a HashMap which now stores the timestamp corresponding to loadTime and whether the image has painted (after being loaded). Bug: 982046, 879270 Change-Id: I69da42c9250cc36c567df5da285ef1a9a357b554 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1710840 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by:Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/master@{#680117}
Showing
Please register or sign in to comment