Title: [205915] trunk/Source/WebKit2
Revision
205915
Author
[email protected]
Date
2016-09-14 10:44:31 -0700 (Wed, 14 Sep 2016)

Log Message

Long tap menu on an image link no longer includes "Save Image" button
https://bugs.webkit.org/show_bug.cgi?id=161761
<rdar://27202717>

Patch by Megan Gardner <[email protected]> on 2016-09-14
Reviewed by Beth Dakin.

* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
Added share to image sheet as to not regress current functionality
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
Gather information for images as well as links, and they can be both

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (205914 => 205915)


--- trunk/Source/WebKit2/ChangeLog	2016-09-14 17:11:57 UTC (rev 205914)
+++ trunk/Source/WebKit2/ChangeLog	2016-09-14 17:44:31 UTC (rev 205915)
@@ -1,3 +1,18 @@
+2016-09-14  Megan Gardner  <[email protected]>
+
+        Long tap menu on an image link no longer includes "Save Image" button
+        https://bugs.webkit.org/show_bug.cgi?id=161761
+        <rdar://27202717>
+
+        Reviewed by Beth Dakin.
+
+        * UIProcess/ios/WKActionSheetAssistant.mm:
+        (-[WKActionSheetAssistant defaultActionsForImageSheet:]):
+        Added share to image sheet as to not regress current functionality
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::getPositionInformation):
+        Gather information for images as well as links, and they can be both
+
 2016-09-14  Carlos Garnacho  <[email protected]>
 
         [GTK][Wayland] Implement clipboard support

Modified: trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm (205914 => 205915)


--- trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm	2016-09-14 17:11:57 UTC (rev 205914)
+++ trunk/Source/WebKit2/UIProcess/ios/WKActionSheetAssistant.mm	2016-09-14 17:44:31 UTC (rev 205915)
@@ -367,8 +367,10 @@
     NSURL *targetURL = [NSURL _web_URLWithWTFString:positionInformation.url];
 
     auto defaultActions = adoptNS([[NSMutableArray alloc] init]);
-    if (!positionInformation.url.isEmpty())
+    if (!positionInformation.url.isEmpty()) {
         [self _appendOpenActionsForURL:targetURL actions:defaultActions.get() elementInfo:elementInfo];
+        [defaultActions addObject:[_WKElementAction _elementActionWithType:_WKElementActionTypeShare assistant:self]];
+    }
 
 #if HAVE(SAFARI_SERVICES_FRAMEWORK)
     if ([getSSReadingListClass() supportsURL:targetURL])

Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (205914 => 205915)


--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2016-09-14 17:11:57 UTC (rev 205914)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm	2016-09-14 17:44:31 UTC (rev 205915)
@@ -2337,7 +2337,8 @@
                         }
                     }
 #endif
-                } else if (element->renderer() && element->renderer()->isRenderImage()) {
+                }
+                if (element->renderer() && element->renderer()->isRenderImage()) {
                     info.isImage = true;
                     auto& renderImage = downcast<RenderImage>(*(element->renderer()));
                     if (renderImage.cachedImage() && !renderImage.cachedImage()->errorOccurred()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to