Title: [175486] trunk/Source/WebKit2
- Revision
- 175486
- Author
- timothy_hor...@apple.com
- Date
- 2014-11-03 12:41:08 -0800 (Mon, 03 Nov 2014)
Log Message
_actionMenuItemsForHitTestResult is given kWKActionMenuLink but an empty array of defaultMenuItems
https://bugs.webkit.org/show_bug.cgi?id=138321
<rdar://problem/18855134>
Reviewed by Beth Dakin.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForLink]):
(-[WKActionMenuController _defaultMenuItems:]):
Move the HTTP-family-URLs-only condition to the place where we decide what kind of menu to
show. We depend on _defaultMenuItemsForLink returning the link menu, and should never
set the link menu type if we aren't going to build a link menu.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (175485 => 175486)
--- trunk/Source/WebKit2/ChangeLog 2014-11-03 20:17:44 UTC (rev 175485)
+++ trunk/Source/WebKit2/ChangeLog 2014-11-03 20:41:08 UTC (rev 175486)
@@ -1,5 +1,20 @@
2014-11-03 Tim Horton <timothy_hor...@apple.com>
+ _actionMenuItemsForHitTestResult is given kWKActionMenuLink but an empty array of defaultMenuItems
+ https://bugs.webkit.org/show_bug.cgi?id=138321
+ <rdar://problem/18855134>
+
+ Reviewed by Beth Dakin.
+
+ * UIProcess/mac/WKActionMenuController.mm:
+ (-[WKActionMenuController _defaultMenuItemsForLink]):
+ (-[WKActionMenuController _defaultMenuItems:]):
+ Move the HTTP-family-URLs-only condition to the place where we decide what kind of menu to
+ show. We depend on _defaultMenuItemsForLink returning the link menu, and should never
+ set the link menu type if we aren't going to build a link menu.
+
+2014-11-03 Tim Horton <timothy_hor...@apple.com>
+
Use FrameSnapshotting functions in FindController::getFindIndicatorBitmap
https://bugs.webkit.org/show_bug.cgi?id=138300
<rdar://problem/18855863>
Modified: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (175485 => 175486)
--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-03 20:17:44 UTC (rev 175485)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-03 20:41:08 UTC (rev 175486)
@@ -148,10 +148,6 @@
- (NSArray *)_defaultMenuItemsForLink
{
- WebHitTestResult* hitTestResult = _page->lastMouseMoveHitTestResult();
- if (!WebCore::protocolIsInHTTPFamily(hitTestResult->absoluteLinkURL()))
- return @[ ];
-
RetainPtr<NSMenuItem> openLinkItem = [self _createActionMenuItemForTag:kWKContextActionItemTagOpenLinkInDefaultBrowser];
RetainPtr<NSMenuItem> previewLinkItem = [self _createActionMenuItemForTag:kWKContextActionItemTagPreviewLink];
RetainPtr<NSMenuItem> readingListItem = [self _createActionMenuItemForTag:kWKContextActionItemTagAddLinkToSafariReadingList];
@@ -520,7 +516,8 @@
return [self _defaultMenuItemsForImage];
}
- if (!hitTestResult->absoluteLinkURL().isEmpty()) {
+ String absoluteLinkURL = hitTestResult->absoluteLinkURL();
+ if (!absoluteLinkURL.isEmpty() && WebCore::protocolIsInHTTPFamily(absoluteLinkURL)) {
_type = kWKActionMenuLink;
return [self _defaultMenuItemsForLink];
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes