Title: [246879] trunk
Revision
246879
Author
[email protected]
Date
2019-06-27 06:32:33 -0700 (Thu, 27 Jun 2019)

Log Message

REGRESSION (touch-action): Can't scroll vertically when touching a horizontally-scrollable element on instagram.com
https://bugs.webkit.org/show_bug.cgi?id=199268
<rdar://problem/52246473>

Reviewed by Antoine Quint.

Source/WebCore:

Test: pointerevents/ios/touch-action-region-manipulation.html

Having a restrictive touch-action value like 'pan-y' on on element and then having a descendant with
'touch-action: manipulation' computes to 'none'.

* css/StyleResolver.cpp:
(WebCore::computeEffectiveTouchActions):

For value 'manipulation' return the current effective value, similar to the reverse case above.
Set intersection should only be computed out of restrictive values (pan-x/pan-y/pinch-zoom/none).

LayoutTests:

* pointerevents/ios/touch-action-region-manipulation-expected.txt: Added.
* pointerevents/ios/touch-action-region-manipulation.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (246878 => 246879)


--- trunk/LayoutTests/ChangeLog	2019-06-27 08:58:52 UTC (rev 246878)
+++ trunk/LayoutTests/ChangeLog	2019-06-27 13:32:33 UTC (rev 246879)
@@ -1,3 +1,14 @@
+2019-06-27  Antti Koivisto  <[email protected]>
+
+        REGRESSION (touch-action): Can't scroll vertically when touching a horizontally-scrollable element on instagram.com
+        https://bugs.webkit.org/show_bug.cgi?id=199268
+        <rdar://problem/52246473>
+
+        Reviewed by Antoine Quint.
+
+        * pointerevents/ios/touch-action-region-manipulation-expected.txt: Added.
+        * pointerevents/ios/touch-action-region-manipulation.html: Added.
+
 2019-06-27  Devin Rousso  <[email protected]>
 
         Web Inspector: throw an error if console.count/console.countReset is called with an object that throws an error from toString

Added: trunk/LayoutTests/pointerevents/ios/touch-action-region-manipulation-expected.txt (0 => 246879)


--- trunk/LayoutTests/pointerevents/ios/touch-action-region-manipulation-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/pointerevents/ios/touch-action-region-manipulation-expected.txt	2019-06-27 13:32:33 UTC (rev 246879)
@@ -0,0 +1,46 @@
+(GraphicsLayer
+  (anchor 0.00 0.00)
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (event region
+        (rect (0,0) width=800 height=600)
+      )
+      (children 2
+        (GraphicsLayer
+          (position 8.00 8.00)
+          (bounds 200.00 200.00)
+          (drawsContent 1)
+          (event region
+            (rect (0,0) width=200 height=200)
+            (touch-action
+              (pan-x              
+                (rect (0,0) width=200 height=25)
+                (rect (0,25) width=100 height=75)
+              )
+            )
+          )
+        )
+        (GraphicsLayer
+          (position 8.00 208.00)
+          (bounds 200.00 200.00)
+          (drawsContent 1)
+          (event region
+            (rect (0,0) width=200 height=200)
+            (touch-action
+              (manipulation              
+                (rect (100,0) width=100 height=25)
+              )
+              (pan-x              
+                (rect (0,0) width=100 height=100)
+              )
+            )
+          )
+        )
+      )
+    )
+  )
+)
+

Added: trunk/LayoutTests/pointerevents/ios/touch-action-region-manipulation.html (0 => 246879)


--- trunk/LayoutTests/pointerevents/ios/touch-action-region-manipulation.html	                        (rev 0)
+++ trunk/LayoutTests/pointerevents/ios/touch-action-region-manipulation.html	2019-06-27 13:32:33 UTC (rev 246879)
@@ -0,0 +1,49 @@
+<html>
+<style>
+.test {
+    width: 200px;
+    height: 200px;
+    position: relative;
+    will-change: transform;
+}
+.box {
+    width: 100px;
+    height: 100px;
+    background: green;
+    position: absolute;
+}
+.bar {
+    height:25px;
+}
+.pan-x {
+    touch-action:pan-x;
+    background: green;
+}
+
+.manipulation {
+    touch-action:manipulation;
+    background: yellow;
+}
+</style>
+<script>
+window._onload_ = function () {
+    if (window.testRunner)
+        testRunner.dumpAsText();
+    if (window.internals)
+        results.innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_EVENT_REGION);
+}
+</script>
+<body>
+<div class="test">
+    <div class="pan-x bar">
+        <div class="manipulation box"></div>
+    </div>
+</div>
+<div class="test">
+    <div class="manipulation bar">
+        <div class="pan-x box"></div>
+    </div>
+</div>
+<pre id="results"></pre>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (246878 => 246879)


--- trunk/Source/WebCore/ChangeLog	2019-06-27 08:58:52 UTC (rev 246878)
+++ trunk/Source/WebCore/ChangeLog	2019-06-27 13:32:33 UTC (rev 246879)
@@ -1,3 +1,22 @@
+2019-06-27  Antti Koivisto  <[email protected]>
+
+        REGRESSION (touch-action): Can't scroll vertically when touching a horizontally-scrollable element on instagram.com
+        https://bugs.webkit.org/show_bug.cgi?id=199268
+        <rdar://problem/52246473>
+
+        Reviewed by Antoine Quint.
+
+        Test: pointerevents/ios/touch-action-region-manipulation.html
+
+        Having a restrictive touch-action value like 'pan-y' on on element and then having a descendant with
+        'touch-action: manipulation' computes to 'none'.
+
+        * css/StyleResolver.cpp:
+        (WebCore::computeEffectiveTouchActions):
+
+        For value 'manipulation' return the current effective value, similar to the reverse case above.
+        Set intersection should only be computed out of restrictive values (pan-x/pan-y/pinch-zoom/none).
+
 2019-06-27  Carlos Garcia Campos  <[email protected]>
 
         [SOUP] Use libsoup WebSockets API

Modified: trunk/Source/WebCore/css/StyleResolver.cpp (246878 => 246879)


--- trunk/Source/WebCore/css/StyleResolver.cpp	2019-06-27 08:58:52 UTC (rev 246878)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2019-06-27 13:32:33 UTC (rev 246879)
@@ -856,9 +856,12 @@
     if (effectiveTouchActions.contains(TouchAction::None))
         return { TouchAction::None };
 
-    if (effectiveTouchActions.contains(TouchAction::Auto) || effectiveTouchActions.contains(TouchAction::Manipulation))
+    if (effectiveTouchActions.containsAny({ TouchAction::Auto, TouchAction::Manipulation }))
         return touchActions;
 
+    if (touchActions.containsAny({ TouchAction::Auto, TouchAction::Manipulation }))
+        return effectiveTouchActions;
+
     auto sharedTouchActions = effectiveTouchActions & touchActions;
     if (sharedTouchActions.isEmpty())
         return { TouchAction::None };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to