This is a tracking bug for the implementation of Image Element Timing. Spec explainer: https://docs.google.com/document/d/1blFeMVdqxB0V3BAJh60ptOBFY7cJSXnf7VyW3wspbZ8/ Implementation proposal: https://docs.google.com/document/d/1BvHknbj3T-fUuj4RxHF8qGRNxbswtBqUjKiPx7iLXCc
Issue 758726 has been merged into this issue.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/150777e35b60955ba32a7848f97934efc71dbef2 commit 150777e35b60955ba32a7848f97934efc71dbef2 Author: Nicolas Pena <npm@chromium.org> Date: Fri Sep 07 23:13:47 2018 [Element Timing] Implement Image Element Timing This CL adds support to observe the first time an <img> element paints via the PerformanceObserver (no support for performance timeline yet) and under a flag that is disabled by default. Implementation proposal: https://docs.google.com/document/d/1BvHknbj3T-fUuj4RxHF8qGRNxbswtBqUjKiPx7iLXCc Intent to Implement: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/2twP4Xdd1VI Bug: 879270 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I715bd71be088f8055ece493db208caa9b97d736b Reviewed-on: https://chromium-review.googlesource.com/1197349 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Reviewed-by: Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/master@{#589712} [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/WebKit/LayoutTests/http/tests/performance-timing/element-timing/image-not-fully-visible.html [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/WebKit/LayoutTests/http/tests/performance-timing/element-timing/observe-elementtiming.html [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/WebKit/LayoutTests/http/tests/performance-timing/element-timing/observe-large-image.html [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/WebKit/LayoutTests/http/tests/performance-timing/element-timing/observe-multiple-images.html [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/WebKit/LayoutTests/http/tests/performance-timing/element-timing/resources/element-timing-helpers.js [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/WebKit/LayoutTests/http/tests/resources/circle.svg [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/core_idl_files.gni [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/html/html_attribute_names.json5 [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/layout/layout_image.cc [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/paint/BUILD.gn [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/paint/image_element_timing.cc [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/paint/image_element_timing.h [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/paint/image_painter.cc [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/paint/image_painter.h [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/paint/video_painter.cc [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/BUILD.gn [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/event_timing.cc [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/performance.cc [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/performance.h [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/performance_element_timing.cc [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/performance_element_timing.h [add] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/performance_element_timing.idl [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/performance_entry.cc [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/performance_entry.h [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/performance_entry_names.json5 [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/window_performance.cc [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/core/timing/window_performance.h [modify] https://crrev.com/150777e35b60955ba32a7848f97934efc71dbef2/third_party/blink/renderer/platform/runtime_enabled_features.json5
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c19a2a37c95be5cc17a1e1828f33c035dfb2d7a5 commit c19a2a37c95be5cc17a1e1828f33c035dfb2d7a5 Author: Nicolas Pena <npm@chromium.org> Date: Tue Oct 16 08:14:42 2018 Plumb ElementTiming entries to the correct frames Currently, the element timing is provided to the frame that owns the <img> element. In particular, no origin checks are being made. This CL fixes this by doing the following: * Checking the image origin matches the hosting frame's origin before performing the computations in ImageElementTiming::NotifyImagePainted. * Plumbing the information to parent frames for as long as they exist and are same origin as the current frame. Bug: 879270 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: If744dbc0448e3024ca5d16b59b2b1dc0f436ee58 Reviewed-on: https://chromium-review.googlesource.com/c/1277675 Reviewed-by: Timothy Dresser <tdresser@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#599908} [add] https://crrev.com/c19a2a37c95be5cc17a1e1828f33c035dfb2d7a5/third_party/WebKit/LayoutTests/http/tests/performance-timing/element-timing/cross-origin-element.html [add] https://crrev.com/c19a2a37c95be5cc17a1e1828f33c035dfb2d7a5/third_party/WebKit/LayoutTests/http/tests/performance-timing/element-timing/cross-origin-iframe-element.html [add] https://crrev.com/c19a2a37c95be5cc17a1e1828f33c035dfb2d7a5/third_party/WebKit/LayoutTests/http/tests/performance-timing/element-timing/observe-child-element.html [add] https://crrev.com/c19a2a37c95be5cc17a1e1828f33c035dfb2d7a5/third_party/WebKit/LayoutTests/http/tests/performance-timing/element-timing/resources/iframe-with-square.html [modify] https://crrev.com/c19a2a37c95be5cc17a1e1828f33c035dfb2d7a5/third_party/blink/renderer/core/paint/image_element_timing.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/045dade49416490cc8910a3a08dc7aa70340e0fb commit 045dade49416490cc8910a3a08dc7aa70340e0fb Author: Nicolas Pena <npm@chromium.org> Date: Fri Dec 07 18:29:14 2018 [ElementTiming] Fix flaky observe-child-element.html The timeout used to bail out early is causing flakiness, so this change removes that timeout since it is not needed for the test. It also increases the timeout used in cross-origin-iframe-element.html to give chance for the entry to be dispatched. Since this test passes when such entry is NOT dispatched, that test is not currently flaky. Bug: 879270, 896765 Change-Id: Ie02a9787d721e6c0d1f347b0d08dd9dbd985ca79 Reviewed-on: https://chromium-review.googlesource.com/c/1363960 Reviewed-by: Timothy Dresser <tdresser@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#614753} [modify] https://crrev.com/045dade49416490cc8910a3a08dc7aa70340e0fb/third_party/blink/web_tests/TestExpectations [modify] https://crrev.com/045dade49416490cc8910a3a08dc7aa70340e0fb/third_party/blink/web_tests/http/tests/performance-timing/element-timing/cross-origin-iframe-element.html [modify] https://crrev.com/045dade49416490cc8910a3a08dc7aa70340e0fb/third_party/blink/web_tests/http/tests/performance-timing/element-timing/observe-child-element.html
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1a56774e02eaab1c1e477b7a37838672ec3c86f5 commit 1a56774e02eaab1c1e477b7a37838672ec3c86f5 Author: Nicolas Pena <npm@chromium.org> Date: Thu Jan 10 20:37:40 2019 [ElementTiming] Buffer entries before onload This CL adds a buffer for element timing entries before onload. This intends to be a temporary measure to provide early entries before the buffered flag is supported. This CL also adds a UseCounter to track explicit usage of ElementTiming. These will be needed for an Element Timing origin trial. Bug: 879270 Change-Id: Ie341ea3ef528b996d6571546ba28a41992acc6c5 Reviewed-on: https://chromium-review.googlesource.com/c/1378809 Reviewed-by: Yoav Weiss <yoavweiss@chromium.org> Reviewed-by: Yoav Weiss <yoav@yoav.ws> Reviewed-by: Timothy Dresser <tdresser@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#621731} [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/public/platform/web_feature.mojom [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/renderer/core/events/event_type_names.json5 [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/renderer/core/paint/image_element_timing.cc [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/renderer/core/timing/event_timing.cc [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/renderer/core/timing/performance.cc [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/renderer/core/timing/performance.h [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/renderer/core/timing/performance.idl [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/renderer/core/timing/window_performance.cc [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/renderer/core/timing/window_performance.h [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/fast/dom/Window/property-access-on-cached-properties-after-frame-navigated-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/fast/dom/Window/window-properties-performance-expected.txt [add] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/http/tests/performance-timing/element-timing/buffer-before-onload.html [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/virtual/user-activation-v2/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/virtual/user-activation-v2/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/1a56774e02eaab1c1e477b7a37838672ec3c86f5/tools/metrics/histograms/enums.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f03056c8db759fe7d8d7d61dec707015a8417040 commit f03056c8db759fe7d8d7d61dec707015a8417040 Author: Nicolas Pena <npm@chromium.org> Date: Tue Jan 15 04:23:52 2019 [ElementTiming] Add an Origin Trial flag This CL changes ElementTiming from a test flag to an Origin Trial flag. Intent to Experiment: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/9LV2L8sDgPY Bug: 879270 Change-Id: I3b2183ce2fe4268965e8dacc379849c593126b5c Reviewed-on: https://chromium-review.googlesource.com/c/1409814 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Timothy Dresser <tdresser@chromium.org> Reviewed-by: Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/master@{#622727} [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/renderer/core/layout/layout_image.cc [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/renderer/core/paint/image_element_timing.cc [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/renderer/core/paint/image_painter.cc [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/renderer/core/timing/performance.idl [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/renderer/core/timing/performance_element_timing.idl [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/renderer/core/timing/performance_observer.cc [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/renderer/core/timing/window_performance.cc [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/renderer/platform/runtime_enabled_features.json5 [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/web_tests/TestExpectations [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/web_tests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt [modify] https://crrev.com/f03056c8db759fe7d8d7d61dec707015a8417040/third_party/blink/web_tests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt
Comment 1 by npm@chromium.org
, Sep 4