Bug 1655184 [wpt PR 24743] - [LCP] Ignore paints with opacity 0, a=testonly
authorNicolás Peña Moreno <npm@chromium.org>
Fri, 07 Aug 2020 12:43:43 +0000
changeset 544820 b1ad4ba756ad1ccfd2dd534f1e38f17097e3be35
parent 544819 57e86fee309c083701b4de7ea11c58f9a6f99d12
child 544821 a7b246370f32a76a2510db6f7a7088e194edf92d
push id37701
push userrmaries@mozilla.com
push dateSat, 15 Aug 2020 21:17:39 +0000
treeherdermozilla-central@ffc01c0f13a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1655184, 24743, 1092473, 2316788, 794689
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1655184 [wpt PR 24743] - [LCP] Ignore paints with opacity 0, a=testonly Automatic update from web-platform-tests [LCP] Ignore paints with opacity 0 This changes the opacity 0 paints that are ignored by the LCP algorithm. Before, paints that would later be composited were not ignored, which resulted in an inaccurate metric due to detecting LCP too early. After this change, even will-change opacity paints are ignored, which could result in elements not becoming candidates because they are never repainted. In the special case where documentElement changes its opacity, we consider the largest content that becomes visible as a valid LCP candidate. In other words this CL does the following 3 changes: 1) Ignores all LCP signals under style.opacity: 0, as before styles with 'will-change: opacity' were not ignored. 2) Saves off the LCP for ignored LCP signals if they are under non-nested style.opacity = 0. 3.) If the document opacity style changes from opacity: 0 to non-zero, we record the saved off LCP signal. Bug: 1092473 Change-Id: I2a970a34fdb1db6c7c746060c286077553b816a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316788 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/master@{#794689} -- wpt-commits: a8f5298fb676a2c33a1fe60a18fd2ba627788872 wpt-pr: 24743
--- a/testing/web-platform/tests/largest-contentful-paint/invisible-images-composited-1.html
+++ b/testing/web-platform/tests/largest-contentful-paint/invisible-images-composited-1.html
@@ -8,18 +8,22 @@
     opacity: 0;
   .visibilityHidden {
     visibility: hidden;
   .displayNone {
     display: none;
-  .composited {
+  .willChangeTransform {
     will-change: transform;
+  .willChangeOpacity {
+    will-change: opacity;
+  }
-<img src='/images/blue.png' class='opacity0 composited' id='opacity0'/>
-<img src='/images/green.png' class='visibilityHidden composited' id='visibilityHidden'/>
-<img src='/images/red.png' class='displayNone composited' id='displayNone'/>
+<img src='/images/blue.png' class='opacity0 willChangeTransform' id='opacity0-willChangeTransform'/>
+<img src='/images/green.png' class='visibilityHidden willChangeTransform' id='visibilityHidden'/>
+<img src='/images/red.png' class='displayNone willChangeTransform' id='displayNone'/>
+<img src='/images/blue.png' class='opacity0 willChangeOpacity' id='opacity0-willChangeOpacity'/>
 <div class='opacity0 composited'><img src='/images/yellow.png' id='divOpacity0'/></div>
 <div class='visibilityHidden composited'><img src='/images/yellow.png' id='divVisibilityHidden'/></div>
 <div class='displayNone composited'><img src='/images/yellow.png' id='divDisplayNone'/></div>