[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}
Showing
Please register or sign in to comment