Title: [238725] trunk
Revision
238725
Author
simon.fra...@apple.com
Date
2018-11-29 19:47:59 -0800 (Thu, 29 Nov 2018)

Log Message

Overflow scrolling layers need to be self-painting
https://bugs.webkit.org/show_bug.cgi?id=192201

Reviewed by Dean Jackson.
Source/WebCore:

Overflow scrolling layers paint their contents, so need to be self-painting in the RenderLayer sense.

Without this change, the overflow in the testcase doesn't get any compositing layers.

Test: compositing/scrolling/overflow-scrolling-layers-are-self-painting.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):

LayoutTests:

* compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt: Added.
* compositing/scrolling/overflow-scrolling-layers-are-self-painting.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (238724 => 238725)


--- trunk/LayoutTests/ChangeLog	2018-11-30 03:15:03 UTC (rev 238724)
+++ trunk/LayoutTests/ChangeLog	2018-11-30 03:47:59 UTC (rev 238725)
@@ -1,3 +1,13 @@
+2018-11-29  Simon Fraser  <simon.fra...@apple.com>
+
+        Overflow scrolling layers need to be self-painting
+        https://bugs.webkit.org/show_bug.cgi?id=192201
+
+        Reviewed by Dean Jackson.
+
+        * compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt: Added.
+        * compositing/scrolling/overflow-scrolling-layers-are-self-painting.html: Added.
+
 2018-11-29  Eric Carlson  <eric.carl...@apple.com>
 
         [MediaStream] DeviceIdHashSaltStorage should use iframe and top level documents

Added: trunk/LayoutTests/compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt (0 => 238725)


--- trunk/LayoutTests/compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt	2018-11-30 03:47:59 UTC (rev 238725)
@@ -0,0 +1,31 @@
+(GraphicsLayer
+  (anchor 0.00 0.00)
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (children 1
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 302.00 302.00)
+          (drawsContent 1)
+          (children 1
+            (GraphicsLayer
+              (offsetFromRenderer width=-1 height=-1)
+              (position 1.00 1.00)
+              (bounds 285.00 285.00)
+              (children 1
+                (GraphicsLayer
+                  (offsetFromRenderer width=1 height=1)
+                  (bounds 285.00 2000.00)
+                )
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+

Added: trunk/LayoutTests/compositing/scrolling/overflow-scrolling-layers-are-self-painting.html (0 => 238725)


--- trunk/LayoutTests/compositing/scrolling/overflow-scrolling-layers-are-self-painting.html	                        (rev 0)
+++ trunk/LayoutTests/compositing/scrolling/overflow-scrolling-layers-are-self-painting.html	2018-11-30 03:47:59 UTC (rev 238725)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+        .scroller {
+            overflow: scroll;
+            height: 300px;
+            width: 300px;
+            border: 1px solid black;
+        }
+        .contents {
+            height: 2000px;
+        }
+    </style>
+    <script>
+        if (window.testRunner) {
+            testRunner.dumpAsText();
+            internals.settings.setAsyncOverflowScrollingEnabled(true);            
+        }
+
+        window.addEventListener('load', () => {
+            if (window.internals)
+                document.getElementById('layer-tree').innerText = window.internals.layerTreeAsText(document);
+            
+        }, false);
+    </script>
+</head>
+<body>
+    <div class="scroller">
+        <div class="contents"></div>
+    </div>
+<pre id="layer-tree"></pre>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (238724 => 238725)


--- trunk/Source/WebCore/ChangeLog	2018-11-30 03:15:03 UTC (rev 238724)
+++ trunk/Source/WebCore/ChangeLog	2018-11-30 03:47:59 UTC (rev 238725)
@@ -1,3 +1,19 @@
+2018-11-29  Simon Fraser  <simon.fra...@apple.com>
+
+        Overflow scrolling layers need to be self-painting
+        https://bugs.webkit.org/show_bug.cgi?id=192201
+
+        Reviewed by Dean Jackson.
+        
+        Overflow scrolling layers paint their contents, so need to be self-painting in the RenderLayer sense.
+        
+        Without this change, the overflow in the testcase doesn't get any compositing layers.
+
+        Test: compositing/scrolling/overflow-scrolling-layers-are-self-painting.html
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::calculateClipRects const):
+
 2018-11-29  Christopher Reid  <chris.r...@sony.com>
 
         [Win] listDirectory in FileSystemWin.cpp should not skip all directories

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (238724 => 238725)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2018-11-30 03:15:03 UTC (rev 238724)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2018-11-30 03:47:59 UTC (rev 238725)
@@ -6120,6 +6120,7 @@
         return true;
 
     return hasOverlayScrollbars()
+        || canUseCompositedScrolling()
         || renderer().isTableRow()
         || renderer().isCanvas()
         || renderer().isVideo()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to