Allow tracking of child iframes that don't meet page load tracking criteria |
|||
Issue descriptionPage load metrics currently only tracks child frames that meet page load metrics tracking criteria. See MetricsRenderFrameObserver::DidCommitProvisionalLoad which calls ShouldSendMetrics which unconditionally applies filtering checks on all frames. We should relax these constraints for child frames.
,
Aug 29 2017
,
Aug 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1d51d85bfb91069759f21f8b059d9a6810d838b7 commit 1d51d85bfb91069759f21f8b059d9a6810d838b7 Author: Bryan McQuade <bmcquade@chromium.org> Date: Tue Aug 29 22:36:00 2017 Unconditionally track and send page load metrics from the render process. In the current page load metrics implementation, we allow tracking of metrics in child frames on the page. This is used to collect and compute first contentful paint and other metrics at the whole page level (across all frames), among other things. We have some page-level metric tracking policy in place for deciding whether a page load is eligible for page load metrics tracking. For instance, we only track if the main page in an http or https URL, if the mime type is html or xhtml, etc. This policy should only be applied for the top-level frame, and then any child frames on a page should use the policy of the topmost frame when deciding whether to track metrics. So if for example a page with an https URL contains a frame with a non http/https scheme (e.g. a frame created via javascript, which is common for ads), we should track paint updates in that child towards the page-level first paint, even though its URL is not http or https. To address this, this change unconditionally tracks and sends metrics for all render frames, and policy about whether a given page load should be tracked is only enforced in the browser process. This both addresses the bug where metrics aren't tracked in some child frames of pages eligible for tracking, and makes it easier for us to be more flexible in allowing other page load metrics observers to track metrics in pages that don't meet the PLM tracking policy, for example, the NTP, or an extension page. This change also adds a histogram error code counter to count cases where we receive timing from a child frame but aren't tracking a page load. Bug: 759394 Change-Id: I9cf3378b194b689bc0ab7dd35e00472471e41a91 Reviewed-on: https://chromium-review.googlesource.com/641633 Commit-Queue: Bryan McQuade <bmcquade@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#498261} [modify] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc [modify] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc [modify] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/chrome/browser/page_load_metrics/page_load_metrics_update_dispatcher.cc [modify] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/chrome/browser/page_load_metrics/page_load_metrics_update_dispatcher.h [modify] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/chrome/browser/page_load_metrics/page_load_tracker.h [modify] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/chrome/renderer/BUILD.gn [modify] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/chrome/renderer/page_load_metrics/metrics_render_frame_observer.cc [modify] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/chrome/renderer/page_load_metrics/metrics_render_frame_observer.h [modify] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/chrome/renderer/page_load_metrics/metrics_render_frame_observer_unittest.cc [delete] https://crrev.com/86069cb27b8cd46700f1d7a3e78f4e82df1b8c2b/chrome/renderer/page_load_metrics/renderer_page_track_decider.cc [delete] https://crrev.com/86069cb27b8cd46700f1d7a3e78f4e82df1b8c2b/chrome/renderer/page_load_metrics/renderer_page_track_decider.h [add] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/chrome/test/data/page_load_metrics/dynamic_iframe.html [modify] https://crrev.com/1d51d85bfb91069759f21f8b059d9a6810d838b7/tools/metrics/histograms/enums.xml
,
Aug 29 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by rbyers@chromium.org
, Aug 28 2017Cc: loonyb...@chromium.org rbyers@chromium.org