From a7b88cb7b8ba75a5399aee54540f03bb88924672 Mon Sep 17 00:00:00 2001 From: Steve Kobes Date: Fri, 24 Apr 2020 13:00:20 -0700 Subject: [PATCH] Create LayoutShiftAttribution objects in LayoutShiftTracker. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also mark the REF "experimental", so that it is tested, and add a test. Bug: 1053510 Change-Id: I8bac9c8002d20991599a1bf396f28dd9101b0f63 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2157988 Reviewed-by: Nicolás Peña Moreno Commit-Queue: Steve Kobes Cr-Commit-Position: refs/heads/master@{#762442} --- layout-instability/resources/util.js | 1 + layout-instability/sources.html | 38 ++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 layout-instability/sources.html diff --git a/layout-instability/resources/util.js b/layout-instability/resources/util.js index 515914e11fadc9..2ef971ddb79166 100644 --- a/layout-instability/resources/util.js +++ b/layout-instability/resources/util.js @@ -59,6 +59,7 @@ ScoreWatcher = function() { resetPromise(); const observer = new PerformanceObserver(list => { list.getEntries().forEach(entry => { + this.lastEntry = entry; this.score += entry.value; if (!entry.hadRecentInput) this.scoreWithInputExclusion += entry.value; diff --git a/layout-instability/sources.html b/layout-instability/sources.html new file mode 100644 index 00000000000000..599a5c471b38d5 --- /dev/null +++ b/layout-instability/sources.html @@ -0,0 +1,38 @@ + +Layout Instability: sources attribute + + +
+ + + +