Title: [248459] branches/safari-608.1-branch/Source/WebKit
Revision
248459
Author
[email protected]
Date
2019-08-08 22:01:24 -0700 (Thu, 08 Aug 2019)

Log Message

Cherry-pick r248455. rdar://problem/54109873

    [iOS WK2] Hide previews when an inner overflow or frame scrollview scrolls
    https://bugs.webkit.org/show_bug.cgi?id=200552
    rdar://problem/54086338

    Reviewed by Wenson Hsieh.

    Give UITargetedPreview the UIScrollView that the target element is inside of,
    so it can clean up if the user starts to scroll that view.

    * Platform/spi/ios/UIKitSPI.h:
    * UIProcess/ios/WKContentViewInteraction.mm:
    (-[WKContentView _createTargetedPreviewIfPossible]):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248455 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608.1-branch/Source/WebKit/ChangeLog (248458 => 248459)


--- branches/safari-608.1-branch/Source/WebKit/ChangeLog	2019-08-09 05:01:21 UTC (rev 248458)
+++ branches/safari-608.1-branch/Source/WebKit/ChangeLog	2019-08-09 05:01:24 UTC (rev 248459)
@@ -1,5 +1,40 @@
 2019-08-08  Kocsen Chung  <[email protected]>
 
+        Cherry-pick r248455. rdar://problem/54109873
+
+    [iOS WK2] Hide previews when an inner overflow or frame scrollview scrolls
+    https://bugs.webkit.org/show_bug.cgi?id=200552
+    rdar://problem/54086338
+    
+    Reviewed by Wenson Hsieh.
+    
+    Give UITargetedPreview the UIScrollView that the target element is inside of,
+    so it can clean up if the user starts to scroll that view.
+    
+    * Platform/spi/ios/UIKitSPI.h:
+    * UIProcess/ios/WKContentViewInteraction.mm:
+    (-[WKContentView _createTargetedPreviewIfPossible]):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-08  Simon Fraser  <[email protected]>
+
+            [iOS WK2] Hide previews when an inner overflow or frame scrollview scrolls
+            https://bugs.webkit.org/show_bug.cgi?id=200552
+            rdar://problem/54086338
+
+            Reviewed by Wenson Hsieh.
+
+            Give UITargetedPreview the UIScrollView that the target element is inside of,
+            so it can clean up if the user starts to scroll that view.
+
+            * Platform/spi/ios/UIKitSPI.h:
+            * UIProcess/ios/WKContentViewInteraction.mm:
+            (-[WKContentView _createTargetedPreviewIfPossible]):
+
+2019-08-08  Kocsen Chung  <[email protected]>
+
         Cherry-pick r248438. rdar://problem/54093226
 
     [iOS] Position image information should respect the image orientation

Modified: branches/safari-608.1-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h (248458 => 248459)


--- branches/safari-608.1-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2019-08-09 05:01:21 UTC (rev 248458)
+++ branches/safari-608.1-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2019-08-09 05:01:24 UTC (rev 248459)
@@ -112,6 +112,10 @@
 #import <UIKit/_UITextDragCaretView.h>
 #endif
 
+#if __has_include(<UIKit/UITargetedPreview_Private.h>)
+#import <UIKit/UITargetedPreview_Private.h>
+#endif
+
 #else // USE(APPLE_INTERNAL_SDK)
 
 #if ENABLE(DRAG_SUPPORT)
@@ -1154,6 +1158,12 @@
 @end
 #endif
 
+#if USE(UICONTEXTMENU)
+@interface UITargetedPreview (Radar54086338)
+@property (nonatomic, strong, setter=_setOverridePositionTrackingView:) UIView *overridePositionTrackingView;
+@end
+#endif // USE(UICONTEXTMENU)
+
 @interface UIResponder ()
 - (UIResponder *)firstResponder;
 - (void)pasteAndMatchStyle:(id)sender;

Modified: branches/safari-608.1-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (248458 => 248459)


--- branches/safari-608.1-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-08-09 05:01:21 UTC (rev 248458)
+++ branches/safari-608.1-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-08-09 05:01:24 UTC (rev 248459)
@@ -8152,6 +8152,15 @@
     if (!targetedPreview)
         targetedPreview = createFallbackTargetedPreview(self, self.containerViewForTargetedPreviews, _positionInformation.bounds);
 
+    if (_positionInformation.containerScrollingNodeID) {
+        UIScrollView *positionTrackingView = _webView.scrollView;
+        if (auto* scrollingCoordinator = _page->scrollingCoordinatorProxy())
+            positionTrackingView = scrollingCoordinator->scrollViewForScrollingNodeID(_positionInformation.containerScrollingNodeID);
+
+        if ([targetedPreview respondsToSelector:@selector(_setOverridePositionTrackingView:)])
+            [targetedPreview _setOverridePositionTrackingView:positionTrackingView];
+    }
+
     _contextMenuInteractionTargetedPreview = WTFMove(targetedPreview);
     return _contextMenuInteractionTargetedPreview.get();
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to