Title: [218656] trunk/Source/WebKit2
Revision
218656
Author
[email protected]
Date
2017-06-21 15:11:07 -0700 (Wed, 21 Jun 2017)

Log Message

REGRESSION (r218606): 3D Touch action menu for links is missing items
https://bugs.webkit.org/show_bug.cgi?id=173669
<rdar://problem/32905541>

Reviewed by Wenson Hsieh.

* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
defaultActionsForLinkSheet is used outside the usual action sheet flow,
by 3D Touch code. Therefore, we're not guaranteed to have a _positionInformation.
We don't need one, though -- we can get the URL from the passed-in
_WKActivatedElementInfo, exactly like defaultActionsForImageSheet already did.

(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
Remove the delegate null check, which isn't used after r218606.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (218655 => 218656)


--- trunk/Source/WebKit2/ChangeLog	2017-06-21 21:55:27 UTC (rev 218655)
+++ trunk/Source/WebKit2/ChangeLog	2017-06-21 22:11:07 UTC (rev 218656)
@@ -1,3 +1,21 @@
+2017-06-21  Tim Horton  <[email protected]>
+
+        REGRESSION (r218606): 3D Touch action menu for links is missing items
+        https://bugs.webkit.org/show_bug.cgi?id=173669
+        <rdar://problem/32905541>
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/ios/WKActionSheetAssistant.mm:
+        (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
+        defaultActionsForLinkSheet is used outside the usual action sheet flow,
+        by 3D Touch code. Therefore, we're not guaranteed to have a _positionInformation.
+        We don't need one, though -- we can get the URL from the passed-in
+        _WKActivatedElementInfo, exactly like defaultActionsForImageSheet already did.
+
+        (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
+        Remove the delegate null check, which isn't used after r218606.
+
 2017-06-21  Daniel Bates  <[email protected]>
 
         Cleanup FrameLoadRequest

Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm (218655 => 218656)


--- trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm	2017-06-21 21:55:27 UTC (rev 218655)
+++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm	2017-06-21 22:11:07 UTC (rev 218656)
@@ -441,14 +441,7 @@
 
 - (RetainPtr<NSArray>)defaultActionsForLinkSheet:(_WKActivatedElementInfo *)elementInfo
 {
-    auto delegate = _delegate.get();
-    if (!delegate)
-        return nil;
-
-    if (!_positionInformation)
-        return nil;
-
-    NSURL *targetURL = [NSURL URLWithString:_positionInformation->url];
+    NSURL *targetURL = [elementInfo URL];
     if (!targetURL)
         return nil;
 
@@ -469,10 +462,6 @@
 
 - (RetainPtr<NSArray>)defaultActionsForImageSheet:(_WKActivatedElementInfo *)elementInfo
 {
-    auto delegate = _delegate.get();
-    if (!delegate)
-        return nil;
-
     NSURL *targetURL = [elementInfo URL];
 
     auto defaultActions = adoptNS([[NSMutableArray alloc] init]);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to