Title: [246316] trunk
Revision
246316
Author
[email protected]
Date
2019-06-11 08:55:17 -0700 (Tue, 11 Jun 2019)

Log Message

REGRESSION (iOS): Can't scroll litter-robot.com checkout form's dropdown menus
https://bugs.webkit.org/show_bug.cgi?id=198753
<rdar://problem/51355686>

Reviewed by Simon Fraser.

Source/WebKit:

If an element with 'overflow:scroll' also had 'visibility:hidden' or 'pointer-events:none' it would
capture touches and prevent scrolling of any overlapped scrollers.

* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(WebKit::collectDescendantViewsAtPoint):

Filter out views with 'isUserInteractionEnabled == NO' (set for hidden and pointer-events:none layers).
This prevents it being considered as the first view hit when determining scrolling relationships.

(-[UIView _web_findDescendantViewAtPoint:withEvent:]):

No need to skip here anymore.

LayoutTests:

* fast/scrolling/ios/overflow-scroll-user-interaction-disabled-expected.txt: Added.
* fast/scrolling/ios/overflow-scroll-user-interaction-disabled.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (246315 => 246316)


--- trunk/LayoutTests/ChangeLog	2019-06-11 15:34:43 UTC (rev 246315)
+++ trunk/LayoutTests/ChangeLog	2019-06-11 15:55:17 UTC (rev 246316)
@@ -1,3 +1,14 @@
+2019-06-11  Antti Koivisto  <[email protected]>
+
+        REGRESSION (iOS): Can't scroll litter-robot.com checkout form's dropdown menus
+        https://bugs.webkit.org/show_bug.cgi?id=198753
+        <rdar://problem/51355686>
+
+        Reviewed by Simon Fraser.
+
+        * fast/scrolling/ios/overflow-scroll-user-interaction-disabled-expected.txt: Added.
+        * fast/scrolling/ios/overflow-scroll-user-interaction-disabled.html: Added.
+
 2019-06-11  Youenn Fablet  <[email protected]>
 
         MediaStreamAudioSourceNode::setFormat should check for m_sourceSampleRate equality

Added: trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-user-interaction-disabled-expected.txt (0 => 246316)


--- trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-user-interaction-disabled-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-user-interaction-disabled-expected.txt	2019-06-11 15:55:17 UTC (rev 246316)
@@ -0,0 +1,5 @@
+Test that a 'visibility:hidden' or 'pointer-events:none' scroll layer does not block scrolling of overlapped scrollers.
+
+case 1: Scrollable 1 
+case 2: Scrollable 3 
+

Added: trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-user-interaction-disabled.html (0 => 246316)


--- trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-user-interaction-disabled.html	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-user-interaction-disabled.html	2019-06-11 15:55:17 UTC (rev 246316)
@@ -0,0 +1,74 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<script src=""
+<script src=""
+<style>
+.case {
+    width: 150px;
+    height: 150px;
+    display: inline-block;
+    position: relative;
+}
+.scrollcontent {
+    width: 500px;
+    height: 500px;
+    background: green;
+}
+
+.overflowscroll {
+    overflow: scroll;
+    height: 100px;
+    width: 100px;
+    position: absolute;
+    border: 2px solid black;
+}
+.overlapping {
+    position:absolute;
+    left: 25px;
+    top: 25px;
+    width: 100px;
+    height: 100px;
+    background: red;
+}
+.clip {
+    position:absolute;
+    width: 100px;
+    height: 100px;
+    overflow:hidden;
+}
+.large {
+    width: 3000px;
+    height: 150px;
+}
+#log {
+    position:relative;
+    white-space: pre;
+}
+</style>
+</head>
+<body _onload_="runTest()">
+<p>
+Test that a 'visibility:hidden' or 'pointer-events:none' scroll layer does not block scrolling of overlapped scrollers.
+</p>
+<div class="case">
+    <div class="overflowscroll target" style="z-index:0">
+        <div class="scrollcontent"></div>
+    </div>
+    <div class="overflowscroll overlapping" style="pointer-events:none">
+        <div class="scrollcontent"></div>
+    </div>
+</div>
+<div class="case">
+    <div class="overflowscroll target" style="z-index:0">
+        <div class="scrollcontent"></div>
+    </div>
+    <div class="overflowscroll overlapping" style="visibility:hidden">
+        <div class="scrollcontent"></div>
+    </div>
+</div>
+<div id=log></div>
+
+</body>
+</html>

Modified: trunk/Source/WebKit/ChangeLog (246315 => 246316)


--- trunk/Source/WebKit/ChangeLog	2019-06-11 15:34:43 UTC (rev 246315)
+++ trunk/Source/WebKit/ChangeLog	2019-06-11 15:55:17 UTC (rev 246316)
@@ -1,3 +1,24 @@
+2019-06-11  Antti Koivisto  <[email protected]>
+
+        REGRESSION (iOS): Can't scroll litter-robot.com checkout form's dropdown menus
+        https://bugs.webkit.org/show_bug.cgi?id=198753
+        <rdar://problem/51355686>
+
+        Reviewed by Simon Fraser.
+
+        If an element with 'overflow:scroll' also had 'visibility:hidden' or 'pointer-events:none' it would
+        capture touches and prevent scrolling of any overlapped scrollers.
+
+        * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
+        (WebKit::collectDescendantViewsAtPoint):
+
+        Filter out views with 'isUserInteractionEnabled == NO' (set for hidden and pointer-events:none layers).
+        This prevents it being considered as the first view hit when determining scrolling relationships.
+
+        (-[UIView _web_findDescendantViewAtPoint:withEvent:]):
+
+        No need to skip here anymore.
+
 2019-06-11  Wenson Hsieh  <[email protected]>
 
         Quotes are always inserted as smart quotes on stackblitz.com, causing compilation errors

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm (246315 => 246316)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2019-06-11 15:34:43 UTC (rev 246315)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2019-06-11 15:55:17 UTC (rev 246316)
@@ -47,6 +47,10 @@
         CGPoint subviewPoint = [view convertPoint:point fromView:parent];
 
         auto handlesEvent = [&] {
+            // FIXME: isUserInteractionEnabled is mostly redundant with event regions for web content layers.
+            //        It is currently only needed for scroll views.
+            if (!view.isUserInteractionEnabled)
+                return false;
             if (![view pointInside:subviewPoint withEvent:event])
                 return false;
             if (![view isKindOfClass:[WKCompositingView class]])
@@ -133,9 +137,6 @@
     WebKit::collectDescendantViewsAtPoint(viewsAtPoint, self, point, event);
 
     for (auto *view : WTF::makeReversedRange(viewsAtPoint)) {
-        if (!view.isUserInteractionEnabled)
-            continue;
-
         if ([view conformsToProtocol:@protocol(WKNativelyInteractible)]) {
             CGPoint subviewPoint = [view convertPoint:point fromView:self];
             return [view hitTest:subviewPoint withEvent:event];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to