Title: [248570] branches/safari-608-branch/Source/WebKit
- Revision
- 248570
- Author
- [email protected]
- Date
- 2019-08-12 16:42:23 -0700 (Mon, 12 Aug 2019)
Log Message
Cherry-pick r248455. rdar://problem/54109872
[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-branch/Source/WebKit/ChangeLog (248569 => 248570)
--- branches/safari-608-branch/Source/WebKit/ChangeLog 2019-08-12 23:42:20 UTC (rev 248569)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog 2019-08-12 23:42:23 UTC (rev 248570)
@@ -1,5 +1,40 @@
2019-08-12 Alan Coon <[email protected]>
+ Cherry-pick r248455. rdar://problem/54109872
+
+ [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-12 Alan Coon <[email protected]>
+
Cherry-pick r248438. rdar://problem/54093220
[iOS] Position image information should respect the image orientation
Modified: branches/safari-608-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h (248569 => 248570)
--- branches/safari-608-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2019-08-12 23:42:20 UTC (rev 248569)
+++ branches/safari-608-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2019-08-12 23:42:23 UTC (rev 248570)
@@ -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)
@@ -1157,6 +1161,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-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (248569 => 248570)
--- branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-08-12 23:42:20 UTC (rev 248569)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-08-12 23:42:23 UTC (rev 248570)
@@ -8172,6 +8172,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