Title: [263860] trunk
Revision
263860
Author
[email protected]
Date
2020-07-02 14:08:06 -0700 (Thu, 02 Jul 2020)

Log Message

REGRESSION(r260276): menu items in footer of https://salo.ai are invisible until you hover or resize
https://bugs.webkit.org/show_bug.cgi?id=213712
<rdar://problem/64893190>

Reviewed by Zalan Bujtas.

Source/WebCore:

A negative z-index child triggers a foreground layer inside overflow scroll. This foreground layer
gets the PaintingOverflowContents flag but not the PaintingCompositingScrollingPhase flag, but we still need
to avoid the clip check that happens in RenderBlock::paint(), so change RenderLayer::paintLayerContents()
to just check for isPaintingOverflowContents.

Test: compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):

LayoutTests:

* compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase-expected.html: Added.
* compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (263859 => 263860)


--- trunk/LayoutTests/ChangeLog	2020-07-02 20:35:30 UTC (rev 263859)
+++ trunk/LayoutTests/ChangeLog	2020-07-02 21:08:06 UTC (rev 263860)
@@ -1,3 +1,14 @@
+2020-07-02  Simon Fraser  <[email protected]>
+
+        REGRESSION(r260276): menu items in footer of https://salo.ai are invisible until you hover or resize
+        https://bugs.webkit.org/show_bug.cgi?id=213712
+        <rdar://problem/64893190>
+
+        Reviewed by Zalan Bujtas.
+
+        * compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase-expected.html: Added.
+        * compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase.html: Added.
+
 2020-07-02  Karl Rackler  <[email protected]>
 
         [ macOS wk1 ] imported/w3c/web-platform-tests/css/css-flexbox/overflow-auto-008.html is flaky failing

Added: trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase-expected.html (0 => 263860)


--- trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase-expected.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase-expected.html	2020-07-02 21:08:06 UTC (rev 263860)
@@ -0,0 +1,56 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+<style>
+    #scroller {
+        width: 500px;
+        height: 500px;
+        border: 1px solid black;
+        padding: 10px;
+        overflow-y: scroll;
+        will-change: transform;
+    }
+
+    .filler {
+        height: 1800px;
+    }
+
+    footer {
+        background-color: red;
+        width: 100%;
+        height: 300px;
+    }
+    
+    body.changed footer {
+        background-color: green;
+    }
+</style>
+<script src=""
+<script>
+    if (window.testRunner)
+        testRunner.waitUntilDone();
+
+    window.addEventListener('load', async () => {
+        await UIHelper.animationFrame();
+        scroller.scrollTo(0, 1000);
+
+        await UIHelper.animationFrame();
+        document.body.classList.add('changed');
+
+        await UIHelper.animationFrame();
+        scroller.scrollTo(0, 1500);
+
+        if (window.testRunner)
+            testRunner.notifyDone();
+
+    }, false);
+</script>
+</head>
+<body>
+    <div id="scroller">
+        <div class="filler"></div>
+        <footer>&nbsp;</footer>
+    </div>
+</body>
+</html>
+

Added: trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase.html (0 => 263860)


--- trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase.html	2020-07-02 21:08:06 UTC (rev 263860)
@@ -0,0 +1,66 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+<style>
+    #scroller {
+        width: 500px;
+        height: 500px;
+        border: 1px solid black;
+        padding: 10px;
+        overflow-y: scroll;
+        will-change: transform;
+    }
+
+    .filler {
+        height: 1800px;
+    }
+
+    .behind {
+        position: absolute;
+        top: 10px;
+        width: 50px;
+        height: 50px;
+        z-index: -1;
+    }
+
+    footer {
+        background-color: red;
+        width: 100%;
+        height: 300px;
+    }
+    
+    body.changed footer {
+        background-color: green;
+    }
+    
+</style>
+<script src=""
+<script>
+    if (window.testRunner)
+        testRunner.waitUntilDone();
+
+    window.addEventListener('load', async () => {
+        await UIHelper.animationFrame();
+        scroller.scrollTo(0, 1000);
+
+        await UIHelper.animationFrame();
+        document.body.classList.add('changed');
+
+        await UIHelper.animationFrame();
+        scroller.scrollTo(0, 1500);
+
+        if (window.testRunner)
+            testRunner.notifyDone();
+
+    }, false);
+</script>
+</head>
+<body>
+    <div id="scroller">
+        <div class="behind">&nbsp;</div>
+        <div class="filler"></div>
+        <footer>&nbsp;</footer>
+    </div>
+</body>
+</html>
+

Modified: trunk/Source/WebCore/ChangeLog (263859 => 263860)


--- trunk/Source/WebCore/ChangeLog	2020-07-02 20:35:30 UTC (rev 263859)
+++ trunk/Source/WebCore/ChangeLog	2020-07-02 21:08:06 UTC (rev 263860)
@@ -1,3 +1,21 @@
+2020-07-02  Simon Fraser  <[email protected]>
+
+        REGRESSION(r260276): menu items in footer of https://salo.ai are invisible until you hover or resize
+        https://bugs.webkit.org/show_bug.cgi?id=213712
+        <rdar://problem/64893190>
+
+        Reviewed by Zalan Bujtas.
+
+        A negative z-index child triggers a foreground layer inside overflow scroll. This foreground layer
+        gets the PaintingOverflowContents flag but not the PaintingCompositingScrollingPhase flag, but we still need
+        to avoid the clip check that happens in RenderBlock::paint(), so change RenderLayer::paintLayerContents()
+        to just check for isPaintingOverflowContents.
+
+        Test: compositing/scrolling/async-overflow-scrolling/foreground-layer-paint-phase.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paintLayerContents):
+
 2020-07-02  Antoine Quint  <[email protected]>
 
         visualViewport.addEventListener("scroll"*** fires permanently after zoom or orientation change

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (263859 => 263860)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2020-07-02 20:35:30 UTC (rev 263859)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2020-07-02 21:08:06 UTC (rev 263860)
@@ -4615,7 +4615,7 @@
         if ((paintingInfo.paintBehavior & PaintBehavior::TileFirstPaint) && isRenderViewLayer())
             paintBehavior.add(PaintBehavior::TileFirstPaint);
 
-        if (isPaintingScrollingContent && isPaintingOverflowContents)
+        if (isPaintingOverflowContents)
             paintBehavior.add(PaintBehavior::CompositedOverflowScrollContent);
 
         return paintBehavior;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to