Title: [168174] trunk/Source/WebKit2
Revision
168174
Author
simon.fra...@apple.com
Date
2014-05-02 10:29:20 -0700 (Fri, 02 May 2014)

Log Message

[iOS WK2] Can't scroll on gatesnotes.com
https://bugs.webkit.org/show_bug.cgi?id=132459
<rdar://problem/16770909>

Reviewed by Benjamin Poulain.

The custom UIView hit-testing code was finding views that were created by
the compositing code for clipping, above the UIScrollViews. We only ever
need to find UIScrollViews here for touch overflow-scrolling, so constrain
the hit-testing code to only return UIScrollViews.

* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]):
(-[UIView _findDescendantViewAtPoint:withEvent:]):
(-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (168173 => 168174)


--- trunk/Source/WebKit2/ChangeLog	2014-05-02 17:27:40 UTC (rev 168173)
+++ trunk/Source/WebKit2/ChangeLog	2014-05-02 17:29:20 UTC (rev 168174)
@@ -1,3 +1,21 @@
+2014-05-01  Simon Fraser  <simon.fra...@apple.com>
+
+        [iOS WK2] Can't scroll on gatesnotes.com 
+        https://bugs.webkit.org/show_bug.cgi?id=132459
+        <rdar://problem/16770909>
+
+        Reviewed by Benjamin Poulain.
+        
+        The custom UIView hit-testing code was finding views that were created by
+        the compositing code for clipping, above the UIScrollViews. We only ever
+        need to find UIScrollViews here for touch overflow-scrolling, so constrain
+        the hit-testing code to only return UIScrollViews.
+
+        * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
+        (-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]):
+        (-[UIView _findDescendantViewAtPoint:withEvent:]):
+        (-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]): Deleted.
+
 2014-05-02  Carlos Alberto Lopez Perez  <clo...@igalia.com>
 
         REGRESSION(r168118): [GTK] build broken due to shouldTrackVisitedLinks

Modified: trunk/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm (168173 => 168174)


--- trunk/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm	2014-05-02 17:27:40 UTC (rev 168173)
+++ trunk/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm	2014-05-02 17:29:20 UTC (rev 168174)
@@ -49,7 +49,8 @@
 
 // UIView hit testing assumes that views should only hit test subviews that are entirely contained
 // in the view. This is not true of web content.
-- (UIView *)_recursiveFindDescendantViewAtPoint:(CGPoint)point withEvent:(UIEvent *)event
+// We only want to find UIScrollViews here. Other views are ignored.
+- (UIView *)_recursiveFindDescendantScrollViewAtPoint:(CGPoint)point withEvent:(UIEvent *)event
 {
     if (self.clipsToBounds && ![self pointInside:point withEvent:event])
         return nil;
@@ -58,13 +59,13 @@
     [[self subviews] enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) {
         CGPoint subviewPoint = [view convertPoint:point fromView:self];
 
-        if ([view pointInside:subviewPoint withEvent:event])
+        if ([view pointInside:subviewPoint withEvent:event] && [view isKindOfClass:[UIScrollView class]])
             foundView = view;
 
         if (![view subviews])
             return;
 
-        if (UIView *hitView = [view _recursiveFindDescendantViewAtPoint:subviewPoint withEvent:event])
+        if (UIView *hitView = [view _recursiveFindDescendantScrollViewAtPoint:subviewPoint withEvent:event])
             foundView = hitView;
     }];
 
@@ -73,7 +74,7 @@
 
 - (UIView *)_findDescendantViewAtPoint:(CGPoint)point withEvent:(UIEvent *)event
 {
-    return [self _recursiveFindDescendantViewAtPoint:point withEvent:event];
+    return [self _recursiveFindDescendantScrollViewAtPoint:point withEvent:event];
 }
 
 @end
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to