Title: [187290] branches/safari-601.1-branch/Source/WebKit2
- Revision
- 187290
- Author
- [email protected]
- Date
- 2015-07-23 22:58:30 -0700 (Thu, 23 Jul 2015)
Log Message
Merged r186806. rdar://problem/21795569
Modified Paths
Diff
Modified: branches/safari-601.1-branch/Source/WebKit2/ChangeLog (187289 => 187290)
--- branches/safari-601.1-branch/Source/WebKit2/ChangeLog 2015-07-24 04:58:43 UTC (rev 187289)
+++ branches/safari-601.1-branch/Source/WebKit2/ChangeLog 2015-07-24 05:58:30 UTC (rev 187290)
@@ -1,3 +1,19 @@
+2015-07-23 Lucas Forschler <[email protected]>
+
+ Merge r186806
+
+ 2015-07-14 Yongjun Zhang <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=146909
+ Add actions for default link preview that uses SFSafariViewController.
+
+ Use the new private properties to prepare actions for the default link preview controller.
+
+ Reviewed by Dan Bernstein.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView previewViewControllerForPosition:inSourceView:]):
+
2015-07-21 Babak Shafiei <[email protected]>
Merge r186897.
Modified: branches/safari-601.1-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (187289 => 187290)
--- branches/safari-601.1-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-24 04:58:43 UTC (rev 187289)
+++ branches/safari-601.1-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2015-07-24 05:58:30 UTC (rev 187290)
@@ -3225,11 +3225,12 @@
if (canShowLinkPreview) {
_previewType = PreviewElementType::Link;
NSURL *targetURL = [NSURL _web_URLWithWTFString:_positionInformation.url];
+ RetainPtr<_WKActivatedElementInfo> elementInfo = adoptNS([[_WKActivatedElementInfo alloc] _initWithType:_WKActivatedElementTypeLink URL:targetURL location:_positionInformation.point title:_positionInformation.title rect:_positionInformation.bounds image:_positionInformation.image.get()]);
+ RetainPtr<NSArray> actions = [_actionSheetAssistant defaultActionsForLinkSheet:elementInfo.get()];
if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForURL:defaultActions:elementInfo:)]) {
_highlightLongPressCanClick = NO;
- RetainPtr<_WKActivatedElementInfo> elementInfo = adoptNS([[_WKActivatedElementInfo alloc] _initWithType:_WKActivatedElementTypeLink URL:targetURL location:_positionInformation.point title:_positionInformation.title rect:_positionInformation.bounds image:_positionInformation.image.get()]);
_page->startInteractionWithElementAtPosition(_positionInformation.point);
- return [uiDelegate _webView:_webView previewViewControllerForURL:targetURL defaultActions:[_actionSheetAssistant defaultActionsForLinkSheet:elementInfo.get()].get() elementInfo:elementInfo.get()];
+ return [uiDelegate _webView:_webView previewViewControllerForURL:targetURL defaultActions:actions.get() elementInfo:elementInfo.get()];
}
if ([uiDelegate respondsToSelector:@selector(_webView:previewViewControllerForURL:)]) {
@@ -3239,7 +3240,10 @@
#if HAVE(SAFARI_SERVICES_FRAMEWORK)
SFSafariViewController *previewViewController = [allocSFSafariViewControllerInstance() initWithURL:targetURL];
previewViewController._showingLinkPreview = YES;
+ previewViewController._activatedElementInfo = elementInfo.get();
+ previewViewController._previewActions = actions.get();
_highlightLongPressCanClick = NO;
+ _page->startInteractionWithElementAtPosition(_positionInformation.point);
return [previewViewController autorelease];
#else
return nil;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes