Title: [245242] trunk
Revision
245242
Author
an...@apple.com
Date
2019-05-13 11:13:40 -0700 (Mon, 13 May 2019)

Log Message

REGRESSION (r245208): compositing/shared-backing/sharing-bounds-non-clipping-shared-layer.html asserts
https://bugs.webkit.org/show_bug.cgi?id=197818
<rdar://problem/50705762>

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/scrolling/ios/event-region-scale-transform-shared.html
       fast/scrolling/ios/event-region-translate-transform-shared.html

This fixes the assert. However the added tests demonstrate that transform is not taken into account
when computing the event region, https://bugs.webkit.org/show_bug.cgi?id=197836.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateEventRegion):

LayoutTests:

* fast/scrolling/ios/event-region-scale-transform-shared-expected.txt: Added.
* fast/scrolling/ios/event-region-scale-transform-shared.html: Added.
* fast/scrolling/ios/event-region-translate-transform-shared-expected.txt: Added.
* fast/scrolling/ios/event-region-translate-transform-shared.html: Added.
* platform/ios-wk2/TestExpectations:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (245241 => 245242)


--- trunk/LayoutTests/ChangeLog	2019-05-13 18:04:51 UTC (rev 245241)
+++ trunk/LayoutTests/ChangeLog	2019-05-13 18:13:40 UTC (rev 245242)
@@ -1,3 +1,17 @@
+2019-05-13  Antti Koivisto  <an...@apple.com>
+
+        REGRESSION (r245208): compositing/shared-backing/sharing-bounds-non-clipping-shared-layer.html asserts
+        https://bugs.webkit.org/show_bug.cgi?id=197818
+        <rdar://problem/50705762>
+
+        Reviewed by Simon Fraser.
+
+        * fast/scrolling/ios/event-region-scale-transform-shared-expected.txt: Added.
+        * fast/scrolling/ios/event-region-scale-transform-shared.html: Added.
+        * fast/scrolling/ios/event-region-translate-transform-shared-expected.txt: Added.
+        * fast/scrolling/ios/event-region-translate-transform-shared.html: Added.
+        * platform/ios-wk2/TestExpectations:
+
 2019-05-13  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [macOS] Font formatting options don't work when composing a message in Yahoo mail

Added: trunk/LayoutTests/fast/scrolling/ios/event-region-scale-transform-shared-expected.txt (0 => 245242)


--- trunk/LayoutTests/fast/scrolling/ios/event-region-scale-transform-shared-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/event-region-scale-transform-shared-expected.txt	2019-05-13 18:13:40 UTC (rev 245242)
@@ -0,0 +1,30 @@
+(GraphicsLayer
+  (anchor 0.00 0.00)
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (children 2
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 500.00 500.00)
+          (contentsOpaque 1)
+          (event region
+            (rect (0,0) width=500 height=500)
+          )
+        )
+        (GraphicsLayer
+          (position 30.00 30.00)
+          (bounds 201.00 201.00)
+          (drawsContent 1)
+          (event region
+            (rect (0,0) width=200 height=200)
+            (rect (200,200) width=100 height=100)
+          )
+        )
+      )
+    )
+  )
+)
+

Added: trunk/LayoutTests/fast/scrolling/ios/event-region-scale-transform-shared.html (0 => 245242)


--- trunk/LayoutTests/fast/scrolling/ios/event-region-scale-transform-shared.html	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/event-region-scale-transform-shared.html	2019-05-13 18:13:40 UTC (rev 245242)
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+        .relative {
+            position: absolute;
+            top: 20px;
+            left: 20px;
+            height: 10px;
+            width: 10px;
+            margin: 10px;
+            border: 1px solid black;
+        }
+        
+        .sharing {
+			position: relative;
+			top: 50px;
+			left: 50px;
+            width: 200px;
+            height: 200px;
+            background-color: green;
+            transform: scale(0.5);
+            transform-origin: top left;
+        }
+        
+        .inner {
+            position: absolute;
+            left: 200px;
+            top: 200px;
+            width: 100px;
+            height: 100px;
+            background-color: blue;
+        }
+
+        .trigger {
+            transform: translateZ(0);
+            width: 500px;
+            height: 500px;
+            background-color: silver;
+        }
+    </style>
+    <script>
+        if (window.testRunner)
+            testRunner.dumpAsText();
+
+        window.addEventListener('load', () => {
+            if (window.internals)
+                document.getElementById('layers').textContent = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_EVENT_REGION);
+        }, false);
+    </script>
+</head>
+<body>
+    <div class="trigger"></div>
+    <div class="relative">
+        <div class="sharing">
+            <div class="inner">
+            </div>
+        </div>
+    </div>
+<pre id="layers"></pre>
+</body>
+</html>

Added: trunk/LayoutTests/fast/scrolling/ios/event-region-translate-transform-shared-expected.txt (0 => 245242)


--- trunk/LayoutTests/fast/scrolling/ios/event-region-translate-transform-shared-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/event-region-translate-transform-shared-expected.txt	2019-05-13 18:13:40 UTC (rev 245242)
@@ -0,0 +1,30 @@
+(GraphicsLayer
+  (anchor 0.00 0.00)
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (children 2
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 500.00 500.00)
+          (contentsOpaque 1)
+          (event region
+            (rect (0,0) width=500 height=500)
+          )
+        )
+        (GraphicsLayer
+          (position 30.00 30.00)
+          (bounds 451.00 451.00)
+          (drawsContent 1)
+          (event region
+            (rect (0,0) width=200 height=200)
+            (rect (200,200) width=100 height=100)
+          )
+        )
+      )
+    )
+  )
+)
+

Added: trunk/LayoutTests/fast/scrolling/ios/event-region-translate-transform-shared.html (0 => 245242)


--- trunk/LayoutTests/fast/scrolling/ios/event-region-translate-transform-shared.html	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/event-region-translate-transform-shared.html	2019-05-13 18:13:40 UTC (rev 245242)
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+        .relative {
+            position: absolute;
+            top: 20px;
+            left: 20px;
+            height: 10px;
+            width: 10px;
+            margin: 10px;
+            border: 1px solid black;
+        }
+        
+        .sharing {
+			position: relative;
+			top: 50px;
+			left: 50px;
+            width: 200px;
+            height: 200px;
+            background-color: green;
+            transform: translate(100px, 100px);
+            transform-origin: top left;
+        }
+        
+        .inner {
+            position: absolute;
+            left: 200px;
+            top: 200px;
+            width: 100px;
+            height: 100px;
+            background-color: blue;
+        }
+
+        .trigger {
+            transform: translateZ(0);
+            width: 500px;
+            height: 500px;
+            background-color: silver;
+        }
+    </style>
+    <script>
+        if (window.testRunner)
+            testRunner.dumpAsText();
+
+        window.addEventListener('load', () => {
+            if (window.internals)
+                document.getElementById('layers').textContent = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_EVENT_REGION);
+        }, false);
+    </script>
+</head>
+<body>
+    <div class="trigger"></div>
+    <div class="relative">
+        <div class="sharing">
+            <div class="inner">
+            </div>
+        </div>
+    </div>
+<pre id="layers"></pre>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (245241 => 245242)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2019-05-13 18:04:51 UTC (rev 245241)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2019-05-13 18:13:40 UTC (rev 245242)
@@ -1315,8 +1315,6 @@
 webkit.org/b/196013 fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html [ ImageOnlyFailure ]
 webkit.org/b/196013 fast/scrolling/rubber-band-shows-background.html [ ImageOnlyFailure ]
 
-webkit.org/b/197818 compositing/shared-backing/sharing-bounds-non-clipping-shared-layer.html [ Skip ]
-
 webkit.org/b/196269 http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource.html [ Pass Timeout ]
 webkit.org/b/196269 http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource.html [ Pass Timeout ]
 webkit.org/b/196269 http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-from-prevalent-resource.html [ Pass Timeout ]

Modified: trunk/Source/WebCore/ChangeLog (245241 => 245242)


--- trunk/Source/WebCore/ChangeLog	2019-05-13 18:04:51 UTC (rev 245241)
+++ trunk/Source/WebCore/ChangeLog	2019-05-13 18:13:40 UTC (rev 245242)
@@ -1,3 +1,20 @@
+2019-05-13  Antti Koivisto  <an...@apple.com>
+
+        REGRESSION (r245208): compositing/shared-backing/sharing-bounds-non-clipping-shared-layer.html asserts
+        https://bugs.webkit.org/show_bug.cgi?id=197818
+        <rdar://problem/50705762>
+
+        Reviewed by Simon Fraser.
+
+        Tests: fast/scrolling/ios/event-region-scale-transform-shared.html
+               fast/scrolling/ios/event-region-translate-transform-shared.html
+
+        This fixes the assert. However the added tests demonstrate that transform is not taken into account
+        when computing the event region, https://bugs.webkit.org/show_bug.cgi?id=197836.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateEventRegion):
+
 2019-05-13  Wenson Hsieh  <wenson_hs...@apple.com>
 
         [macOS] Font formatting options don't work when composing a message in Yahoo mail

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (245241 => 245242)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2019-05-13 18:04:51 UTC (rev 245241)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2019-05-13 18:13:40 UTC (rev 245242)
@@ -1489,8 +1489,8 @@
     auto paintFlags = RenderLayer::paintLayerPaintingCompositingAllPhasesFlags() | RenderLayer::PaintLayerCollectingEventRegion;
     m_owningLayer.paintLayerContents(nullContext, paintingInfo, paintFlags);
 
-    for (auto& layerWeakPtr : m_backingSharingLayers)
-        layerWeakPtr->paintLayerContents(nullContext, paintingInfo, paintFlags);
+    for (auto& layer : m_backingSharingLayers)
+        layer->paintLayerWithEffects(nullContext, paintingInfo, paintFlags);
 
     auto contentOffset = roundedIntSize(contentOffsetInCompositingLayer());
     eventRegion.translate(contentOffset);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to