<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[184780] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/184780">184780</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2015-05-22 11:43:42 -0700 (Fri, 22 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove action menu support
https://bugs.webkit.org/show_bug.cgi?id=145305
&lt;rdar://problem/21070771&gt;

Reviewed by Anders Carlsson.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSMenuSPI.h:
* platform/spi/mac/NSViewSPI.h: Removed.
Remove some SPI.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/action-menu-target.pdf: Removed.
* TestWebKitAPI/Tests/WebKit2/action-menu-targets.html: Removed.
* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm: Removed.
* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm: Removed.
* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundleSPI.h: Removed.
Remove the tests.

* WebKit.xcodeproj/project.pbxproj:
Remove some files.

* Configurations/WebKitLegacy.xcconfig:
* WebView/WebActionMenuController.h: Removed.
* WebView/WebActionMenuController.mm: Removed.
* WebView/WebHTMLView.mm:
(-[WebHTMLView otherMouseDown:]):
(-[WebHTMLView scrollWheel:scrollWheel:]): Deleted.
(-[WebHTMLView mouseDown:mouseDown:]): Deleted.
* WebView/WebUIDelegatePrivate.h:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]): Deleted.
(-[WebView _close]): Deleted.
(-[WebView prepareForMenu:withEvent:]): Deleted.
(-[WebView willOpenMenu:withEvent:]): Deleted.
(-[WebView didCloseMenu:withEvent:]): Deleted.
(-[WebView _actionMenuController]): Deleted.
* WebView/WebViewData.h:
* WebView/WebViewData.mm:
(-[WebViewPrivate dealloc]): Deleted.
* WebView/WebViewInternal.h:
Remove everything, except some enums that clients still refer to.

* Configurations/WebKit.xcconfig:
* Shared/API/c/WKActionMenuItemTypes.h:
* Shared/API/c/WKActionMenuTypes.h:
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
(-[WKView dealloc]): Deleted.
(-[WKView mouseDown:]): Deleted.
(-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
(-[WKView prepareForMenu:withEvent:]): Deleted.
(-[WKView willOpenMenu:withEvent:]): Deleted.
(-[WKView didCloseMenu:withEvent:]): Deleted.
(-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]): Deleted.
(-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]): Deleted.
(-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performImmediateActionHitTestAtLocation):
(WebKit::WebPageProxy::didPerformImmediateActionHitTest):
(WebKit::WebPageProxy::performActionMenuHitTestAtLocation): Deleted.
(WebKit::WebPageProxy::selectLastActionMenuRange): Deleted.
(WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult): Deleted.
(WebKit::WebPageProxy::didPerformActionMenuHitTest): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformImmediateActionHitTest):
(WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
* UIProcess/mac/WKActionMenuController.h: Removed.
* UIProcess/mac/WKActionMenuController.mm: Removed.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
(-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
(API::InjectedBundle::PageContextMenuClient::prepareForImmediateAction):
(API::InjectedBundle::PageContextMenuClient::prepareForActionMenu): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
(WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu): Deleted.
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::WebPageOverlay::actionContextForResultAtPoint):
* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::textIndicatorTransitionForImmediateAction):
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
(WebKit::textIndicatorTransitionForActionMenu): Deleted.
(WebKit::WebPage::performActionMenuHitTestAtLocation): Deleted.
(WebKit::WebPage::selectLastActionMenuRange): Deleted.
(WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult): Deleted.
Remove everything, except some enums that clients still refer to.
Also, leave SPI that used to be shared between immediate actions and
action menus intact, even if it had &quot;action menu&quot; in the name. We can
deprecate and rename in another patch... except for the very recently-added
support from <a href="http://trac.webkit.org/projects/webkit/changeset/184106">r184106</a>, which we'll revert entirely, removing WKBundlePageOverlayV2, 
which was not adopted by any clients.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformspimacNSMenuSPIh">trunk/Source/WebCore/platform/spi/mac/NSMenuSPI.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacConfigurationsWebKitLegacyxcconfig">trunk/Source/WebKit/mac/Configurations/WebKitLegacy.xcconfig</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebHTMLViewmm">trunk/Source/WebKit/mac/WebView/WebHTMLView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebUIDelegatePrivateh">trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewDatah">trunk/Source/WebKit/mac/WebView/WebViewData.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewDatamm">trunk/Source/WebKit/mac/WebView/WebViewData.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewInternalh">trunk/Source/WebKit/mac/WebView/WebViewInternal.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2ConfigurationsWebKitxcconfig">trunk/Source/WebKit2/Configurations/WebKit.xcconfig</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIcWKActionMenuItemTypesh">trunk/Source/WebKit2/Shared/API/c/WKActionMenuItemTypes.h</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIcWKActionMenuTypesh">trunk/Source/WebKit2/Shared/API/c/WKActionMenuTypes.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebHitTestResultcpp">trunk/Source/WebKit2/Shared/WebHitTestResult.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebHitTestResulth">trunk/Source/WebKit2/Shared/WebHitTestResult.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKViewPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewInternalh">trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplh">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplmm">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWKImmediateActionControllerh">trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWKImmediateActionControllermm">trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIAPIInjectedBundlePageContextMenuClienth">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageContextMenuClienth">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageOverlaycpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageOverlayh">trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageContextMenuClientcpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageContextMenuClienth">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageOverlaycpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageOverlayh">trunk/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformspimacNSViewSPIh">trunk/Source/WebCore/platform/spi/mac/NSViewSPI.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebActionMenuControllerh">trunk/Source/WebKit/mac/WebView/WebActionMenuController.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebActionMenuControllermm">trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWKActionMenuControllerh">trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWKActionMenuControllermm">trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2actionmenutargetpdf">trunk/Tools/TestWebKitAPI/Tests/WebKit2/action-menu-target.pdf</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2actionmenutargetshtml">trunk/Tools/TestWebKitAPI/Tests/WebKit2/action-menu-targets.html</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2ObjCActionMenusmm">trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2ObjCActionMenusBundlemm">trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2ObjCActionMenusBundleSPIh">trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundleSPI.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebCore/ChangeLog        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-05-22  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Remove action menu support
+        https://bugs.webkit.org/show_bug.cgi?id=145305
+        &lt;rdar://problem/21070771&gt;
+
+        Reviewed by Anders Carlsson.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/spi/mac/NSMenuSPI.h:
+        * platform/spi/mac/NSViewSPI.h: Removed.
+        Remove some SPI.
+
</ins><span class="cx"> 2015-05-22  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         MaskImageOperation code does not manage CachedImageClients correctly
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -3360,7 +3360,6 @@
</span><span class="cx">                 9343CB8212F25E510033C5EE /* TextCodecUTF8.h in Headers */ = {isa = PBXBuildFile; fileRef = 9343CB8012F25E510033C5EE /* TextCodecUTF8.h */; };
</span><span class="cx">                 93442C9E0D2B335C00338FF9 /* HTMLTableRowsCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 93442C9D0D2B335C00338FF9 /* HTMLTableRowsCollection.h */; };
</span><span class="cx">                 93442CA00D2B336000338FF9 /* HTMLTableRowsCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93442C9F0D2B336000338FF9 /* HTMLTableRowsCollection.cpp */; };
</span><del>-                9348428219F1A9190009D5AE /* NSViewSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 9348428119F1A9190009D5AE /* NSViewSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 934907E4125BBBC8007F23A0 /* GraphicsContextCG.h in Headers */ = {isa = PBXBuildFile; fileRef = 934907E3125BBBC8007F23A0 /* GraphicsContextCG.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 934CC10A0EDB223900A658F2 /* ScriptSourceCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 934CC1090EDB223900A658F2 /* ScriptSourceCode.h */; };
</span><span class="cx">                 934D9BA50B8C116B007B42A9 /* WebCoreNSStringExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 934D9BA40B8C116B007B42A9 /* WebCoreNSStringExtras.mm */; };
</span><span class="lines">@@ -10635,7 +10634,6 @@
</span><span class="cx">                 9343CB8012F25E510033C5EE /* TextCodecUTF8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCodecUTF8.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93442C9D0D2B335C00338FF9 /* HTMLTableRowsCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTableRowsCollection.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93442C9F0D2B336000338FF9 /* HTMLTableRowsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLTableRowsCollection.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                9348428119F1A9190009D5AE /* NSViewSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSViewSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 934907E3125BBBC8007F23A0 /* GraphicsContextCG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextCG.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 934CC1090EDB223900A658F2 /* ScriptSourceCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptSourceCode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 934D9BA40B8C116B007B42A9 /* WebCoreNSStringExtras.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreNSStringExtras.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17926,7 +17924,6 @@
</span><span class="cx">                                 93F1E1EB1A40FDDC00348D13 /* NSPopoverSPI.h */,
</span><span class="cx">                                 2DCB837719F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h */,
</span><span class="cx">                                 2DCB837819F99BBA00A7FBE4 /* NSSharingServiceSPI.h */,
</span><del>-                                9348428119F1A9190009D5AE /* NSViewSPI.h */,
</del><span class="cx">                                 937F4CCB1A2D48C100BB39F5 /* QuickLookMacSPI.h */,
</span><span class="cx">                                 2D232BFF1A326EF9006BF2DB /* TUCallSPI.h */,
</span><span class="cx">                         );
</span><span class="lines">@@ -25943,7 +25940,6 @@
</span><span class="cx">                                 CE1252531A1BEC0600864480 /* NSStringSPI.h in Headers */,
</span><span class="cx">                                 CE1252551A1BEC0E00864480 /* NSURLDownloadSPI.h in Headers */,
</span><span class="cx">                                 658F540319A1C9240088FC92 /* NSURLFileTypeMappingsSPI.h in Headers */,
</span><del>-                                9348428219F1A9190009D5AE /* NSViewSPI.h in Headers */,
</del><span class="cx">                                 F55B3DC81251F12D003EF269 /* NumberInputType.h in Headers */,
</span><span class="cx">                                 1A569D120D7E2B82007C3983 /* objc_class.h in Headers */,
</span><span class="cx">                                 1A569D140D7E2B82007C3983 /* objc_header.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformspimacNSMenuSPIh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/spi/mac/NSMenuSPI.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/mac/NSMenuSPI.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebCore/platform/spi/mac/NSMenuSPI.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> typedef NS_ENUM(NSInteger, NSMenuType) {
</span><span class="cx">     NSMenuTypeNone = 0,
</span><span class="cx">     NSMenuTypeContextMenu,
</span><del>-    NSMenuTypeActionMenu,
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> @interface NSMenu (Private)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformspimacNSViewSPIh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/spi/mac/NSViewSPI.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/mac/NSViewSPI.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebCore/platform/spi/mac/NSViewSPI.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,32 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// FIXME: This should include private headers when possible.
-
-#import &lt;AppKit/NSView.h&gt;
-
-@interface NSView (Private)
-@property (strong, setter=_setActionMenu:) NSMenu *_actionMenu;
-@end
</del></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/ChangeLog        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-05-22  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Remove action menu support
+        https://bugs.webkit.org/show_bug.cgi?id=145305
+        &lt;rdar://problem/21070771&gt;
+
+        Reviewed by Anders Carlsson.
+
+        * WebKit.xcodeproj/project.pbxproj:
+        Remove some files.
+
</ins><span class="cx"> 2015-05-18  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CMake] Ignore warnings in system headers
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -182,8 +182,6 @@
</span><span class="cx">                 934C11670D8710BB00C32ABD /* WebDynamicScrollBarsViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 934C11660D8710BB00C32ABD /* WebDynamicScrollBarsViewInternal.h */; };
</span><span class="cx">                 934C4A910F01406C009372C0 /* WebNSObjectExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 934C4A900F01406C009372C0 /* WebNSObjectExtras.mm */; };
</span><span class="cx">                 934C4AA00F0141F7009372C0 /* WebResourceInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 934C4A9F0F0141F7009372C0 /* WebResourceInternal.h */; };
</span><del>-                935D44E419F9AFF000FB5306 /* WebActionMenuController.h in Headers */ = {isa = PBXBuildFile; fileRef = 935D44E219F9AFF000FB5306 /* WebActionMenuController.h */; };
-                935D44E519F9AFF000FB5306 /* WebActionMenuController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 935D44E319F9AFF000FB5306 /* WebActionMenuController.mm */; };
</del><span class="cx">                 936A2DE80FD2D08000D312DB /* WebTextCompletionController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 936A2DE70FD2D08000D312DB /* WebTextCompletionController.mm */; };
</span><span class="cx">                 936A2DEA0FD2D08400D312DB /* WebTextCompletionController.h in Headers */ = {isa = PBXBuildFile; fileRef = 936A2DE90FD2D08400D312DB /* WebTextCompletionController.h */; };
</span><span class="cx">                 9391F275121B38BD00EBF7E8 /* WebFrameNetworkingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 9391F273121B38BD00EBF7E8 /* WebFrameNetworkingContext.h */; };
</span><span class="lines">@@ -738,8 +736,6 @@
</span><span class="cx">                 934C11660D8710BB00C32ABD /* WebDynamicScrollBarsViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDynamicScrollBarsViewInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 934C4A900F01406C009372C0 /* WebNSObjectExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNSObjectExtras.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 934C4A9F0F0141F7009372C0 /* WebResourceInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebResourceInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                935D44E219F9AFF000FB5306 /* WebActionMenuController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebActionMenuController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                935D44E319F9AFF000FB5306 /* WebActionMenuController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebActionMenuController.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 936A2DE70FD2D08000D312DB /* WebTextCompletionController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebTextCompletionController.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 936A2DE90FD2D08400D312DB /* WebTextCompletionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebTextCompletionController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9391F273121B38BD00EBF7E8 /* WebFrameNetworkingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameNetworkingContext.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -1342,8 +1338,6 @@
</span><span class="cx">                                 51E94C0706C02CA300A9B09E /* PDF */,
</span><span class="cx">                                 A10C1D79182030190036883A /* ios */,
</span><span class="cx">                                 2DF064A81A2DD53C00DBB354 /* DictionaryPopupInfo.h */,
</span><del>-                                935D44E219F9AFF000FB5306 /* WebActionMenuController.h */,
-                                935D44E319F9AFF000FB5306 /* WebActionMenuController.mm */,
</del><span class="cx">                                 8373435A0624EE0D00F3B289 /* WebArchive.h */,
</span><span class="cx">                                 8373435B0624EE0D00F3B289 /* WebArchive.mm */,
</span><span class="cx">                                 44BB8B131241A022001E3A22 /* WebArchiveInternal.h */,
</span><span class="lines">@@ -1779,7 +1773,6 @@
</span><span class="cx">                                 9398104B0824BF01008DF038 /* WebDataSource.h in Headers */,
</span><span class="cx">                                 658A40960A14853B005E6987 /* WebDataSourceInternal.h in Headers */,
</span><span class="cx">                                 9398104C0824BF01008DF038 /* WebDataSourcePrivate.h in Headers */,
</span><del>-                                935D44E419F9AFF000FB5306 /* WebActionMenuController.h in Headers */,
</del><span class="cx">                                 9398104E0824BF01008DF038 /* WebDefaultContextMenuDelegate.h in Headers */,
</span><span class="cx">                                 9398108D0824BF01008DF038 /* WebDefaultEditingDelegate.h in Headers */,
</span><span class="cx">                                 9398104F0824BF01008DF038 /* WebDefaultPolicyDelegate.h in Headers */,
</span><span class="lines">@@ -2309,7 +2302,6 @@
</span><span class="cx">                                 A5687BDB135B791A0074CBCB /* WebNodeHighlighter.mm in Sources */,
</span><span class="cx">                                 1C68F672095B5FC100C2984E /* WebNodeHighlightView.mm in Sources */,
</span><span class="cx">                                 A10C1D611820300E0036883A /* SearchPopupMenuIOS.cpp in Sources */,
</span><del>-                                935D44E519F9AFF000FB5306 /* WebActionMenuController.mm in Sources */,
</del><span class="cx">                                 A10C1D6C1820300E0036883A /* WebFrameIOS.mm in Sources */,
</span><span class="cx">                                 312E2FE614E48182007CCA18 /* WebNotification.mm in Sources */,
</span><span class="cx">                                 31C11A6F1476552E0049A4CC /* WebNotificationClient.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2015-05-22  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Remove action menu support
+        https://bugs.webkit.org/show_bug.cgi?id=145305
+        &lt;rdar://problem/21070771&gt;
+
+        Reviewed by Anders Carlsson.
+
+        * Configurations/WebKitLegacy.xcconfig:
+        * WebView/WebActionMenuController.h: Removed.
+        * WebView/WebActionMenuController.mm: Removed.
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView otherMouseDown:]):
+        (-[WebHTMLView scrollWheel:scrollWheel:]): Deleted.
+        (-[WebHTMLView mouseDown:mouseDown:]): Deleted.
+        * WebView/WebUIDelegatePrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:]): Deleted.
+        (-[WebView _close]): Deleted.
+        (-[WebView prepareForMenu:withEvent:]): Deleted.
+        (-[WebView willOpenMenu:withEvent:]): Deleted.
+        (-[WebView didCloseMenu:withEvent:]): Deleted.
+        (-[WebView _actionMenuController]): Deleted.
+        * WebView/WebViewData.h:
+        * WebView/WebViewData.mm:
+        (-[WebViewPrivate dealloc]): Deleted.
+        * WebView/WebViewInternal.h:
+        Remove everything, except some enums that clients still refer to.
+
</ins><span class="cx"> 2015-05-22  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rework how the ResourceRequest user initiated property key is used.
</span></span></pre></div>
<a id="trunkSourceWebKitmacConfigurationsWebKitLegacyxcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Configurations/WebKitLegacy.xcconfig (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Configurations/WebKitLegacy.xcconfig        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/mac/Configurations/WebKitLegacy.xcconfig        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> #include &quot;FeatureDefines.xcconfig&quot;
</span><span class="cx"> #include &quot;Version.xcconfig&quot;
</span><span class="cx"> 
</span><del>-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *.defs *.nib *.pdf *.tiff CarbonUtils.m CarbonWindowAdapter.mm CarbonWindowContentView.m CarbonWindowFrame.m HIViewAdapter.m HIWebView.mm OutlookQuirksUserScript.js PopupMenuMac.mm SearchPopupMenuMac.mm WebActionMenuController.* WebClipView.* WebDashboardRegion.* WebDynamicScrollBarsView.* WebIconDatabase.* WebIconDatabasePrivate.* WebInspectorClient.mm WebJavaScriptTextInputPanel.* WebKeyGenerator.* WebNetscapeContainerCheckContextInfo.* WebNetscapeContainerCheckPrivate.* WebNSEventExtras.* WebNSPasteboardExtras.* WebNSWindowExtras.* WebPanelAuthenticationHandler.* WebPluginsPrivate.* WebStringTruncator.* WebTextCompletionController.*;
</del><ins>+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *.defs *.nib *.pdf *.tiff CarbonUtils.m CarbonWindowAdapter.mm CarbonWindowContentView.m CarbonWindowFrame.m HIViewAdapter.m HIWebView.mm OutlookQuirksUserScript.js PopupMenuMac.mm SearchPopupMenuMac.mm WebClipView.* WebDashboardRegion.* WebDynamicScrollBarsView.* WebIconDatabase.* WebIconDatabasePrivate.* WebInspectorClient.mm WebJavaScriptTextInputPanel.* WebKeyGenerator.* WebNetscapeContainerCheckContextInfo.* WebNetscapeContainerCheckPrivate.* WebNSEventExtras.* WebNSPasteboardExtras.* WebNSWindowExtras.* WebPanelAuthenticationHandler.* WebPluginsPrivate.* WebStringTruncator.* WebTextCompletionController.*;
</ins><span class="cx"> EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = *IOS.mm MemoryMeasure.h WebCaretChangeListener.h WebFixedPositionContent.h WebFrameIOS.h WebFrameIPhone.h WebGeolocationCoreLocationProvider.h WebGeolocationPrivate.h WebGeolocationProviderIOS.h WebMIMETypeRegistry.h WebNSStringExtrasIOS.h WebNSStringExtrasIPhone.h WebPDFViewIOS.h WebPDFViewIPhone.h WebPDFViewPlaceholder.h WebSelectionRect.h WebUIKitDelegate.h WebUIKitSupport.h WebVisiblePosition.h;
</span><span class="cx"> 
</span><span class="cx"> EXPORTED_SYMBOLS_FILE = $(EXPORTED_SYMBOLS_FILE_$(CURRENT_ARCH));
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebActionMenuControllerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit/mac/WebView/WebActionMenuController.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebActionMenuController.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/mac/WebView/WebActionMenuController.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,65 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
-
-#import &quot;WebUIDelegatePrivate.h&quot;
-#import &lt;AppKit/NSSharingService.h&gt;
-#import &lt;WebCore/HitTestResult.h&gt;
-#import &lt;wtf/RetainPtr.h&gt;
-
-@class DDActionContext;
-@class WebView;
-
-namespace WebCore {
-class Range;
-class TextIndicator;
-}
-
-@interface WebActionMenuController : NSObject &lt;NSSharingServiceDelegate, NSSharingServicePickerDelegate&gt; {
-@private
-    WebView *_webView;
-    WebActionMenuType _type;
-    WebCore::HitTestResult _hitTestResult;
-    RetainPtr&lt;NSSharingServicePicker&gt; _sharingServicePicker;
-    RetainPtr&lt;DDActionContext&gt; _currentActionContext;
-    RefPtr&lt;WebCore::Range&gt; _currentDetectedDataRange;
-    BOOL _isShowingTextIndicator;
-    RefPtr&lt;WebCore::TextIndicator&gt; _currentDetectedDataTextIndicator;
-    BOOL _hasActivatedActionContext;
-}
-
-- (id)initWithWebView:(WebView *)webView;
-- (void)webViewClosed;
-- (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
-- (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
-- (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
-
-- (void)webView:(WebView *)webView willHandleMouseDown:(NSEvent *)event;
-- (void)webView:(WebView *)webView didHandleScrollWheel:(NSEvent *)event;
-
-@end
-
-#endif // PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</del></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebActionMenuControllermm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,842 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014-2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import &quot;WebActionMenuController.h&quot;
-
-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
-
-#import &quot;DOMElementInternal.h&quot;
-#import &quot;DOMNodeInternal.h&quot;
-#import &quot;DOMRangeInternal.h&quot;
-#import &quot;WebDataSource.h&quot;
-#import &quot;WebDocumentInternal.h&quot;
-#import &quot;WebElementDictionary.h&quot;
-#import &quot;WebFrameInternal.h&quot;
-#import &quot;WebHTMLView.h&quot;
-#import &quot;WebHTMLViewInternal.h&quot;
-#import &quot;WebPDFView.h&quot;
-#import &quot;WebSystemInterface.h&quot;
-#import &quot;WebUIDelegatePrivate.h&quot;
-#import &quot;WebViewInternal.h&quot;
-#import &lt;ImageIO/ImageIO.h&gt;
-#import &lt;ImageKit/ImageKit.h&gt;
-#import &lt;WebCore/ArchiveResource.h&gt;
-#import &lt;WebCore/DataDetection.h&gt;
-#import &lt;WebCore/DataDetectorsSPI.h&gt;
-#import &lt;WebCore/DictionaryLookup.h&gt;
-#import &lt;WebCore/DocumentLoader.h&gt;
-#import &lt;WebCore/Editor.h&gt;
-#import &lt;WebCore/Element.h&gt;
-#import &lt;WebCore/EventHandler.h&gt;
-#import &lt;WebCore/FocusController.h&gt;
-#import &lt;WebCore/Frame.h&gt;
-#import &lt;WebCore/FrameView.h&gt;
-#import &lt;WebCore/HTMLConverter.h&gt;
-#import &lt;WebCore/LocalizedStrings.h&gt;
-#import &lt;WebCore/NSMenuSPI.h&gt;
-#import &lt;WebCore/NSSharingServicePickerSPI.h&gt;
-#import &lt;WebCore/NSSharingServiceSPI.h&gt;
-#import &lt;WebCore/NSViewSPI.h&gt;
-#import &lt;WebCore/Page.h&gt;
-#import &lt;WebCore/QuickLookMacSPI.h&gt;
-#import &lt;WebCore/Range.h&gt;
-#import &lt;WebCore/RenderElement.h&gt;
-#import &lt;WebCore/RenderObject.h&gt;
-#import &lt;WebCore/SharedBuffer.h&gt;
-#import &lt;WebCore/SoftLinking.h&gt;
-#import &lt;WebCore/TextCheckerClient.h&gt;
-#import &lt;WebCore/TextIndicator.h&gt;
-#import &lt;WebKitSystemInterface.h&gt;
-#import &lt;objc/objc-class.h&gt;
-#import &lt;objc/objc.h&gt;
-
-SOFT_LINK_FRAMEWORK_IN_UMBRELLA(Quartz, ImageKit)
-SOFT_LINK_CLASS(ImageKit, IKSlideshow)
-
-using namespace WebCore;
-
-@implementation WebActionMenuController
-
-- (id)initWithWebView:(WebView *)webView
-{
-    if (!(self = [super init]))
-        return nil;
-
-    _webView = webView;
-    _type = WebActionMenuNone;
-
-    return self;
-}
-
-- (void)webViewClosed
-{
-    _webView = nil;
-}
-
-- (WebElementDictionary *)performHitTestAtPoint:(NSPoint)windowPoint
-{
-    NSView&lt;WebDocumentView&gt; *documentView = [[[_webView _selectedOrMainFrame] frameView] documentView];
-    if (![documentView isKindOfClass:[WebHTMLView class]])
-        return nil;
-        
-    Frame* coreFrame = core([(WebHTMLView *)documentView _frame]);
-    if (!coreFrame)
-        return nil;
-
-    NSPoint point = [documentView convertPoint:windowPoint fromView:nil];
-    _hitTestResult = coreFrame-&gt;eventHandler().hitTestResultAtPoint(IntPoint(point));
-
-    return [[[WebElementDictionary alloc] initWithHitTestResult:_hitTestResult] autorelease];
-}
-
-- (void)webView:(WebView *)webView willHandleMouseDown:(NSEvent *)event
-{
-    if (_currentActionContext &amp;&amp; _hasActivatedActionContext) {
-        [getDDActionsManagerClass() didUseActions];
-        _hasActivatedActionContext = NO;
-    }
-}
-
-- (void)webView:(WebView *)webView didHandleScrollWheel:(NSEvent *)event
-{
-    [self _dismissActionMenuPopovers];
-    [self _hideTextIndicatorWithAnimation:TextIndicatorDismissalAnimation::None];
-}
-
-- (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (!_webView)
-        return;
-
-    NSMenu *actionMenu = _webView._actionMenu;
-    if (menu != actionMenu)
-        return;
-
-    [self _dismissActionMenuPopovers];
-    [self _hideTextIndicatorWithAnimation:TextIndicatorDismissalAnimation::FadeOut];
-    [actionMenu removeAllItems];
-
-    WebElementDictionary *hitTestResult = [self performHitTestAtPoint:event.locationInWindow];
-    NSArray *menuItems = [self _defaultMenuItems];
-
-    // Allow clients to customize the menu items.
-    if ([[_webView UIDelegate] respondsToSelector:@selector(_webView:actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:)])
-        menuItems = [(id)[_webView UIDelegate] _webView:_webView actionMenuItemsForHitTestResult:hitTestResult withType:_type defaultActionMenuItems:menuItems];
-
-    for (NSMenuItem *item in menuItems)
-        [actionMenu addItem:item];
-
-    if (_currentActionContext) {
-        _hasActivatedActionContext = YES;
-        if (![getDDActionsManagerClass() shouldUseActionsWithContext:_currentActionContext.get()]) {
-            [menu cancelTracking];
-            [menu removeAllItems];
-        }
-    }
-}
-
-- (BOOL)isMenuForTextContent
-{
-    return _type == WebActionMenuReadOnlyText || _type == WebActionMenuEditableText || _type == WebActionMenuEditableTextWithSuggestions;
-}
-
-- (void)focusAndSelectHitTestResult
-{
-    if (!_hitTestResult.isContentEditable())
-        return;
-
-    Element* element = _hitTestResult.innerElement();
-    if (!element)
-        return;
-
-    Frame* frame = element-&gt;document().frame();
-    if (!frame)
-        return;
-
-    frame-&gt;page()-&gt;focusController().setFocusedElement(element, frame);
-    VisiblePosition position = frame-&gt;visiblePositionForPoint(_hitTestResult.roundedPointInInnerNodeFrame());
-    frame-&gt;selection().setSelection(position);
-}
-
-- (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (menu != _webView._actionMenu)
-        return;
-
-    if (!menu.numberOfItems)
-        return;
-
-    if (_type == WebActionMenuDataDetectedItem) {
-        if (menu.numberOfItems == 1)
-            [[_webView _selectedOrMainFrame] _clearSelection];
-        else
-            [self _selectDataDetectedText];
-        return;
-    }
-
-    if (_type == WebActionMenuWhitespaceInEditableArea) {
-        [self focusAndSelectHitTestResult];
-        return;
-    }
-
-    if (![self isMenuForTextContent]) {
-        [[_webView _selectedOrMainFrame] _clearSelection];
-        return;
-    }
-
-    // Action menus for text should highlight the text so that it is clear what the action menu actions
-    // will apply to. If the text is already selected, the menu will use the existing selection.
-    if (!_hitTestResult.isSelected())
-        [self _selectLookupText];
-}
-
-- (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (menu != _webView._actionMenu)
-        return;
-
-    if (_currentActionContext &amp;&amp; _hasActivatedActionContext) {
-        [getDDActionsManagerClass() didUseActions];
-        _hasActivatedActionContext = NO;
-    }
-
-    _type = WebActionMenuNone;
-    _sharingServicePicker = nil;
-    _currentDetectedDataTextIndicator = nil;
-    _currentDetectedDataRange = nil;
-    _currentActionContext = nil;
-}
-
-#pragma mark Link actions
-
-- (void)_openURLFromActionMenu:(id)sender
-{
-    if (!_webView)
-        return;
-
-    [[NSWorkspace sharedWorkspace] openURL:_hitTestResult.absoluteLinkURL()];
-}
-
-- (void)_addToReadingListFromActionMenu:(id)sender
-{
-    if (!_webView)
-        return;
-
-    NSURL *url = _hitTestResult.absoluteLinkURL();
-    NSSharingService *service = [NSSharingService sharingServiceNamed:NSSharingServiceNameAddToSafariReadingList];
-    [service performWithItems:@[ url ]];
-}
-
-static IntRect elementBoundingBoxInWindowCoordinatesFromNode(Node* node)
-{
-    if (!node)
-        return IntRect();
-
-    Frame* frame = node-&gt;document().frame();
-    if (!frame)
-        return IntRect();
-
-    FrameView* view = frame-&gt;view();
-    if (!view)
-        return IntRect();
-
-    RenderObject* renderer = node-&gt;renderer();
-    if (!renderer)
-        return IntRect();
-
-    return view-&gt;contentsToWindow(renderer-&gt;absoluteBoundingBoxRect());
-}
-
-- (NSArray *)_defaultMenuItemsForLink
-{
-    RetainPtr&lt;NSMenuItem&gt; openLinkItem = [self _createActionMenuItemForTag:WebActionMenuItemTagOpenLinkInDefaultBrowser];
-    RetainPtr&lt;NSMenuItem&gt; readingListItem = [self _createActionMenuItemForTag:WebActionMenuItemTagAddLinkToSafariReadingList];
-
-    NSURL *url = _hitTestResult.absoluteLinkURL();
-    RetainPtr&lt;NSMenuItem&gt; shareItem = [self _createShareActionMenuItemForTag:WebActionMenuItemTagShareLink withItems:@[ url ]];
-
-    return @[ openLinkItem.get(), shareItem.get(), [NSMenuItem separatorItem], readingListItem.get() ];
-}
-
-#pragma mark mailto: and tel: Link actions
-
-- (NSArray *)_defaultMenuItemsForDataDetectableLink
-{
-    Node* node = _hitTestResult.innerNode();
-    if (!node)
-        return @[ ];
-
-    RetainPtr&lt;DDActionContext&gt; actionContext = adoptNS([allocDDActionContextInstance() init]);
-
-    // FIXME: Should this show a yellow highlight?
-    _currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() {
-    } interactionChangedHandler:^() {
-    } interactionStoppedHandler:^() {
-    }];
-
-    [_currentActionContext setHighlightFrame:elementBoundingBoxInWindowCoordinatesFromNode(node)];
-
-    return [[getDDActionsManagerClass() sharedManager] menuItemsForTargetURL:_hitTestResult.absoluteLinkURL() actionContext:_currentActionContext.get()];
-}
-
-#pragma mark Image actions
-
-- (NSArray *)_defaultMenuItemsForImage
-{
-    RetainPtr&lt;NSMenuItem&gt; copyImageItem = [self _createActionMenuItemForTag:WebActionMenuItemTagCopyImage];
-
-    RetainPtr&lt;NSMenuItem&gt; addToPhotosItem;
-    if ([self _canAddMediaToPhotos])
-        addToPhotosItem = [self _createActionMenuItemForTag:WebActionMenuItemTagAddImageToPhotos];
-    else
-        addToPhotosItem = [NSMenuItem separatorItem];
-
-    RetainPtr&lt;NSMenuItem&gt; saveToDownloadsItem = [self _createActionMenuItemForTag:WebActionMenuItemTagSaveImageToDownloads];
-    if (!_webView.downloadDelegate)
-        [saveToDownloadsItem setEnabled:NO];
-
-    RefPtr&lt;SharedBuffer&gt; buffer = _hitTestResult.image()-&gt;data();
-    RetainPtr&lt;NSImage&gt; nsImage = adoptNS([[NSImage alloc] initWithData:[NSData dataWithBytes:buffer-&gt;data() length:buffer-&gt;size()]]);
-    RetainPtr&lt;NSMenuItem&gt; shareItem = [self _createShareActionMenuItemForTag:WebActionMenuItemTagShareImage withItems:@[ nsImage.get() ]];
-
-    return @[ copyImageItem.get(), addToPhotosItem.get(), saveToDownloadsItem.get(), shareItem.get() ];
-}
-
-- (void)_copyImage:(id)sender
-{
-    Frame* frame = core([_webView _selectedOrMainFrame]);
-    if (!frame)
-        return;
-    frame-&gt;editor().copyImage(_hitTestResult);
-}
-
-static NSString *temporaryPhotosDirectoryPath()
-{
-    static NSString *temporaryPhotosDirectoryPath;
-
-    if (!temporaryPhotosDirectoryPath) {
-        NSString *temporaryDirectoryTemplate = [NSTemporaryDirectory() stringByAppendingPathComponent:@&quot;WebKitPhotos-XXXXXX&quot;];
-        CString templateRepresentation = [temporaryDirectoryTemplate fileSystemRepresentation];
-
-        if (mkdtemp(templateRepresentation.mutableData()))
-            temporaryPhotosDirectoryPath = [[[NSFileManager defaultManager] stringWithFileSystemRepresentation:templateRepresentation.data() length:templateRepresentation.length()] copy];
-    }
-
-    return temporaryPhotosDirectoryPath;
-}
-
-static NSString *pathToPhotoOnDisk(NSString *suggestedFilename)
-{
-    NSString *photoDirectoryPath = temporaryPhotosDirectoryPath();
-    if (!photoDirectoryPath) {
-        WTFLogAlways(&quot;Cannot create temporary photo download directory.&quot;);
-        return nil;
-    }
-
-    NSString *path = [photoDirectoryPath stringByAppendingPathComponent:suggestedFilename];
-
-    NSFileManager *fileManager = [NSFileManager defaultManager];
-    if ([fileManager fileExistsAtPath:path]) {
-        NSString *pathTemplatePrefix = [photoDirectoryPath stringByAppendingPathComponent:@&quot;XXXXXX-&quot;];
-        NSString *pathTemplate = [pathTemplatePrefix stringByAppendingString:suggestedFilename];
-        CString pathTemplateRepresentation = [pathTemplate fileSystemRepresentation];
-
-        int fd = mkstemps(pathTemplateRepresentation.mutableData(), pathTemplateRepresentation.length() - strlen([pathTemplatePrefix fileSystemRepresentation]) + 1);
-        if (fd &lt; 0) {
-            WTFLogAlways(&quot;Cannot create photo file in the temporary directory (%@).&quot;, suggestedFilename);
-            return nil;
-        }
-
-        close(fd);
-        path = [fileManager stringWithFileSystemRepresentation:pathTemplateRepresentation.data() length:pathTemplateRepresentation.length()];
-    }
-
-    return path;
-}
-
-- (BOOL)_canAddMediaToPhotos
-{
-    return [getIKSlideshowClass() canExportToApplication:@&quot;com.apple.Photos&quot;];
-}
-
-- (void)_addImageToPhotos:(id)sender
-{
-    if (![self _canAddMediaToPhotos])
-        return;
-
-    Image* image = _hitTestResult.image();
-    if (!image)
-        return;
-
-    String imageExtension = image-&gt;filenameExtension();
-    if (imageExtension.isEmpty())
-        return;
-
-    RefPtr&lt;SharedBuffer&gt; buffer = image-&gt;data();
-    if (!buffer)
-        return;
-    RetainPtr&lt;NSData&gt; nsData = [NSData dataWithBytes:buffer-&gt;data() length:buffer-&gt;size()];
-    RetainPtr&lt;NSString&gt; suggestedFilename = [[[NSProcessInfo processInfo] globallyUniqueString] stringByAppendingPathExtension:imageExtension];
-
-    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-        NSString *filePath = pathToPhotoOnDisk(suggestedFilename.get());
-        if (!filePath)
-            return;
-
-        NSURL *fileURL = [NSURL fileURLWithPath:filePath];
-        [nsData writeToURL:fileURL atomically:NO];
-
-        dispatch_async(dispatch_get_main_queue(), ^{
-            // This API provides no way to report failure, but if 18420778 is fixed so that it does, we should handle this.
-            [getIKSlideshowClass() exportSlideshowItem:filePath toApplication:@&quot;com.apple.Photos&quot;];
-        });
-    });
-}
-
-- (void)_saveImageToDownloads:(id)sender
-{
-    [_webView _downloadURL:_hitTestResult.absoluteImageURL()];
-}
-
-#pragma mark Video actions
-
-- (NSArray*)_defaultMenuItemsForVideo
-{
-    RetainPtr&lt;NSMenuItem&gt; copyVideoURLItem = [self _createActionMenuItemForTag:WebActionMenuItemTagCopyVideoURL];
-
-    RetainPtr&lt;NSMenuItem&gt; saveToDownloadsItem = [self _createActionMenuItemForTag:WebActionMenuItemTagSaveVideoToDownloads];
-    if (!_hitTestResult.isDownloadableMedia() || !_webView.downloadDelegate)
-        [saveToDownloadsItem setEnabled:NO];
-
-    String urlToShare = _hitTestResult.isDownloadableMedia() ? _hitTestResult.absoluteMediaURL() : [_webView mainFrameURL];
-    RetainPtr&lt;NSMenuItem&gt; shareItem = [self _createShareActionMenuItemForTag:WebActionMenuItemTagShareImage withItems:@[ urlToShare ]];
-
-    return @[ copyVideoURLItem.get(), [NSMenuItem separatorItem], saveToDownloadsItem.get(), shareItem.get() ];
-}
-
-- (void)_copyVideoURL:(id)sender
-{
-    NSString *urlToCopy = _hitTestResult.absoluteMediaURL();
-    if (!_hitTestResult.isDownloadableMedia())
-        urlToCopy = [_webView mainFrameURL];
-
-    [[NSPasteboard generalPasteboard] clearContents];
-    [[NSPasteboard generalPasteboard] writeObjects:@[ urlToCopy ]];
-}
-
-- (void)_saveVideoToDownloads:(id)sender
-{
-    [_webView _downloadURL:_hitTestResult.absoluteMediaURL()];
-}
-
-#pragma mark Text actions
-
-- (NSArray *)_defaultMenuItemsForText
-{
-    RetainPtr&lt;NSMenuItem&gt; copyTextItem = [self _createActionMenuItemForTag:WebActionMenuItemTagCopyText];
-    RetainPtr&lt;NSMenuItem&gt; pasteItem = [self _createActionMenuItemForTag:WebActionMenuItemTagPaste];
-    [pasteItem setEnabled:NO];
-
-    return @[ copyTextItem.get(), [NSMenuItem separatorItem], pasteItem.get() ];
-}
-
-- (NSArray *)_defaultMenuItemsForEditableText
-{
-    RetainPtr&lt;NSMenuItem&gt; copyTextItem = [self _createActionMenuItemForTag:WebActionMenuItemTagCopyText];
-    RetainPtr&lt;NSMenuItem&gt; pasteItem = [self _createActionMenuItemForTag:WebActionMenuItemTagPaste];
-
-    return @[ copyTextItem.get(), [NSMenuItem separatorItem], pasteItem.get() ];
-}
-
-- (NSArray *)_defaultMenuItemsForEditableTextWithSuggestions
-{
-    Frame* frame = core([_webView _selectedOrMainFrame]);
-    if (!frame)
-        return @[ ];
-
-    NSDictionary *options = nil;
-    RefPtr&lt;Range&gt; lookupRange = rangeForDictionaryLookupAtHitTestResult(_hitTestResult, &amp;options);
-    if (!lookupRange)
-        return @[ ];
-
-    String lookupText = lookupRange-&gt;text();
-    TextCheckerClient* textChecker = frame-&gt;editor().textChecker();
-    if (!textChecker)
-        return @[ ];
-
-    Vector&lt;TextCheckingResult&gt; results = textChecker-&gt;checkTextOfParagraph(lookupText, NSTextCheckingTypeSpelling);
-    if (results.isEmpty())
-        return @[ ];
-
-    Vector&lt;String&gt; guesses;
-    frame-&gt;editor().textChecker()-&gt;getGuessesForWord(lookupText, String(), guesses);
-    if (guesses.isEmpty())
-        return @[ ];
-
-    RetainPtr&lt;NSMenu&gt; spellingSubMenu = adoptNS([[NSMenu alloc] init]);
-    for (const auto&amp; guess : guesses) {
-        RetainPtr&lt;NSMenuItem&gt; item = adoptNS([[NSMenuItem alloc] initWithTitle:guess action:@selector(_changeSelectionToSuggestion:) keyEquivalent:@&quot;&quot;]);
-        [item setRepresentedObject:guess];
-        [item setTarget:self];
-        [spellingSubMenu addItem:item.get()];
-    }
-
-    RetainPtr&lt;NSMenuItem&gt; copyTextItem = [self _createActionMenuItemForTag:WebActionMenuItemTagCopyText];
-    RetainPtr&lt;NSMenuItem&gt; pasteItem = [self _createActionMenuItemForTag:WebActionMenuItemTagPaste];
-    RetainPtr&lt;NSMenuItem&gt; textSuggestionsItem = [self _createActionMenuItemForTag:WebActionMenuItemTagTextSuggestions];
-
-    [textSuggestionsItem setSubmenu:spellingSubMenu.get()];
-
-    return @[ copyTextItem.get(), [NSMenuItem separatorItem], pasteItem.get(), textSuggestionsItem.get() ];
-}
-
-- (void)_selectDataDetectedText
-{
-    [_webView _mainCoreFrame]-&gt;selection().setSelectedRange(_currentDetectedDataRange.get(), DOWNSTREAM, true);
-}
-
-- (NSArray *)_defaultMenuItemsForDataDetectedText
-{
-    RefPtr&lt;Range&gt; detectedDataRange;
-    FloatRect detectedDataBoundingBox;
-    RetainPtr&lt;DDActionContext&gt; actionContext;
-
-    if ([[_webView UIDelegate] respondsToSelector:@selector(_webView:actionContextForHitTestResult:range:)]) {
-        RetainPtr&lt;WebElementDictionary&gt; hitTestDictionary = adoptNS([[WebElementDictionary alloc] initWithHitTestResult:_hitTestResult]);
-
-        DOMRange *customDataDetectorsRange;
-        actionContext = [(id)[_webView UIDelegate] _webView:_webView actionContextForHitTestResult:hitTestDictionary.get() range:&amp;customDataDetectorsRange];
-
-        if (actionContext &amp;&amp; customDataDetectorsRange)
-            detectedDataRange = core(customDataDetectorsRange);
-    }
-
-    // If the client didn't give us an action context, try to scan around the hit point.
-    if (!actionContext || !detectedDataRange)
-        actionContext = DataDetection::detectItemAroundHitTestResult(_hitTestResult, detectedDataBoundingBox, detectedDataRange);
-
-    if (!actionContext || !detectedDataRange)
-        return @[ ];
-
-    [actionContext setAltMode:YES];
-    if ([[getDDActionsManagerClass() sharedManager] respondsToSelector:@selector(hasActionsForResult:actionContext:)]) {
-        if (![[getDDActionsManagerClass() sharedManager] hasActionsForResult:[actionContext mainResult] actionContext:actionContext.get()])
-            return @[ ];
-    }
-
-    _currentDetectedDataTextIndicator = TextIndicator::createWithRange(*detectedDataRange, TextIndicatorPresentationTransition::BounceAndCrossfade);
-
-    _currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() {
-    } interactionChangedHandler:^() {
-        [self _showTextIndicator];
-    } interactionStoppedHandler:^() {
-        [self _hideTextIndicatorWithAnimation:TextIndicatorDismissalAnimation::FadeOut];
-    }];
-    _currentDetectedDataRange = detectedDataRange;
-
-    [_currentActionContext setHighlightFrame:[_webView.window convertRectToScreen:detectedDataBoundingBox]];
-
-    NSArray *menuItems = [[getDDActionsManagerClass() sharedManager] menuItemsForResult:[_currentActionContext mainResult] actionContext:_currentActionContext.get()];
-    if (menuItems.count == 1 &amp;&amp; _currentDetectedDataTextIndicator)
-        _currentDetectedDataTextIndicator-&gt;setPresentationTransition(TextIndicatorPresentationTransition::Bounce);
-    return menuItems;
-}
-
-- (void)_copySelection:(id)sender
-{
-    [_webView copy:self];
-}
-
-- (void)_paste:(id)sender
-{
-    [_webView paste:self];
-}
-
-- (void)_selectLookupText
-{
-    NSDictionary *options = nil;
-    RefPtr&lt;Range&gt; lookupRange = rangeForDictionaryLookupAtHitTestResult(_hitTestResult, &amp;options);
-    if (!lookupRange)
-        return;
-
-    Frame* frame = _hitTestResult.innerNode()-&gt;document().frame();
-    if (!frame)
-        return;
-
-    frame-&gt;selection().setSelectedRange(lookupRange.get(), DOWNSTREAM, true);
-}
-
-- (void)_changeSelectionToSuggestion:(id)sender
-{
-    NSString *selectedCorrection = [sender representedObject];
-    if (!selectedCorrection)
-        return;
-
-    ASSERT([selectedCorrection isKindOfClass:[NSString class]]);
-
-    WebHTMLView *documentView = [[[_webView _selectedOrMainFrame] frameView] documentView];
-    [documentView _changeSpellingToWord:selectedCorrection];
-}
-
-#pragma mark Whitespace actions
-
-- (NSArray *)_defaultMenuItemsForWhitespaceInEditableArea
-{
-    RetainPtr&lt;NSMenuItem&gt; copyTextItem = [self _createActionMenuItemForTag:WebActionMenuItemTagCopyText];
-    RetainPtr&lt;NSMenuItem&gt; pasteItem = [self _createActionMenuItemForTag:WebActionMenuItemTagPaste];
-    [copyTextItem setEnabled:NO];
-
-    return @[ copyTextItem.get(), [NSMenuItem separatorItem], pasteItem.get() ];
-}
-
-#pragma mark NSSharingServicePickerDelegate implementation
-
-- (NSArray *)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker sharingServicesForItems:(NSArray *)items mask:(NSSharingServiceMask)mask proposedSharingServices:(NSArray *)proposedServices
-{
-    RetainPtr&lt;NSMutableArray&gt; services = adoptNS([[NSMutableArray alloc] initWithCapacity:proposedServices.count]);
-
-    for (NSSharingService *service in proposedServices) {
-        if ([service.name isEqualToString:NSSharingServiceNameAddToIPhoto])
-            continue;
-        [services addObject:service];
-    }
-
-    return services.autorelease();
-}
-
-- (id &lt;NSSharingServiceDelegate&gt;)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker delegateForSharingService:(NSSharingService *)sharingService
-{
-    return self;
-}
-
-#pragma mark NSSharingServiceDelegate implementation
-
-- (NSWindow *)sharingService:(NSSharingService *)sharingService sourceWindowForShareItems:(NSArray *)items sharingContentScope:(NSSharingContentScope *)sharingContentScope
-{
-    return _webView.window;
-}
-
-#pragma mark Menu Items
-
-- (RetainPtr&lt;NSMenuItem&gt;)_createActionMenuItemForTag:(uint32_t)tag
-{
-    SEL selector = nullptr;
-    NSString *title = nil;
-    NSImage *image = nil;
-    bool enabled = true;
-
-    switch (tag) {
-    case WebActionMenuItemTagOpenLinkInDefaultBrowser:
-        selector = @selector(_openURLFromActionMenu:);
-        title = WEB_UI_STRING_KEY(&quot;Open&quot;, &quot;Open (action menu item)&quot;, &quot;action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuOpenInNewWindow&quot;];
-        break;
-
-    case WebActionMenuItemTagAddLinkToSafariReadingList:
-        selector = @selector(_addToReadingListFromActionMenu:);
-        title = WEB_UI_STRING_KEY(&quot;Add to Reading List&quot;, &quot;Add to Reading List (action menu item)&quot;, &quot;action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuAddToReadingList&quot;];
-        break;
-
-    case WebActionMenuItemTagCopyText:
-        selector = @selector(_copySelection:);
-        title = WEB_UI_STRING_KEY(&quot;Copy&quot;, &quot;Copy (text action menu item)&quot;, &quot;text action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuCopy&quot;];
-        enabled = _hitTestResult.allowsCopy();
-        break;
-
-    case WebActionMenuItemTagPaste:
-        selector = @selector(_paste:);
-        title = WEB_UI_STRING_KEY(&quot;Paste&quot;, &quot;Paste (action menu item)&quot;, &quot;action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuPaste&quot;];
-        break;
-
-    case WebActionMenuItemTagTextSuggestions:
-        title = WEB_UI_STRING_KEY(&quot;Suggestions&quot;, &quot;Suggestions (action menu item)&quot;, &quot;action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuSpelling&quot;];
-        break;
-
-    case WebActionMenuItemTagCopyImage:
-        selector = @selector(_copyImage:);
-        title = WEB_UI_STRING_KEY(&quot;Copy&quot;, &quot;Copy (image action menu item)&quot;, &quot;image action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuCopy&quot;];
-        break;
-
-    case WebActionMenuItemTagAddImageToPhotos:
-        selector = @selector(_addImageToPhotos:);
-        title = WEB_UI_STRING_KEY(&quot;Add to Photos&quot;, &quot;Add to Photos (action menu item)&quot;, &quot;action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuAddToPhotos&quot;];
-        break;
-
-    case WebActionMenuItemTagSaveImageToDownloads:
-        selector = @selector(_saveImageToDownloads:);
-        title = WEB_UI_STRING_KEY(&quot;Save to Downloads&quot;, &quot;Save to Downloads (image action menu item)&quot;, &quot;image action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuSaveToDownloads&quot;];
-        enabled = !WebCore::protocolIs(_hitTestResult.absoluteImageURL(), &quot;file&quot;);
-        break;
-
-    case WebActionMenuItemTagCopyVideoURL:
-        selector = @selector(_copyVideoURL:);
-        title = WEB_UI_STRING_KEY(&quot;Copy&quot;, &quot;Copy (video action menu item)&quot;, &quot;video action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuCopy&quot;];
-        break;
-
-    case WebActionMenuItemTagSaveVideoToDownloads:
-        selector = @selector(_saveVideoToDownloads:);
-        title = WEB_UI_STRING_KEY(&quot;Save to Downloads&quot;, &quot;Save to Downloads (video action menu item)&quot;, &quot;video action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuSaveToDownloads&quot;];
-        enabled = !WebCore::protocolIs(_hitTestResult.absoluteMediaURL(), &quot;file&quot;) &amp;&amp; _hitTestResult.isDownloadableMedia();
-        break;
-
-    default:
-        ASSERT_NOT_REACHED();
-        return nil;
-    }
-
-    RetainPtr&lt;NSMenuItem&gt; item = adoptNS([[NSMenuItem alloc] initWithTitle:title action:selector keyEquivalent:@&quot;&quot;]);
-    [item setImage:image];
-    [item setTarget:self];
-    [item setTag:tag];
-    [item setEnabled:enabled];
-    return item;
-}
-
-- (RetainPtr&lt;NSMenuItem&gt;)_createShareActionMenuItemForTag:(uint32_t)tag withItems:(NSArray *)items
-{
-    RetainPtr&lt;NSMenuItem&gt; shareItem = [NSMenuItem standardShareMenuItemWithItems:items];
-    [shareItem setTag:tag];
-
-    NSSharingServicePicker *sharingServicePicker = [shareItem representedObject];
-    sharingServicePicker.delegate = self;
-
-    return shareItem;
-}
-
-- (NSArray *)_defaultMenuItems
-{
-    NSURL *url = _hitTestResult.absoluteLinkURL();
-    NSString *absoluteURLString = [url absoluteString];
-    if (url &amp;&amp; WebCore::protocolIsInHTTPFamily(absoluteURLString)) {
-        _type = WebActionMenuLink;
-        return [self _defaultMenuItemsForLink];
-    }
-
-    if (url &amp;&amp; WebCore::protocolIs(absoluteURLString, &quot;mailto&quot;)) {
-        _type = WebActionMenuMailtoLink;
-        return [self _defaultMenuItemsForDataDetectableLink];
-    }
-
-    if (url &amp;&amp; WebCore::protocolIs(absoluteURLString, &quot;tel&quot;)) {
-        _type = WebActionMenuTelLink;
-        return [self _defaultMenuItemsForDataDetectableLink];
-    }
-
-    if (!_hitTestResult.absoluteMediaURL().isEmpty()) {
-        _type = WebActionMenuVideo;
-        return [self _defaultMenuItemsForVideo];
-    }
-
-    Image* image = _hitTestResult.image();
-    if (image &amp;&amp; !_hitTestResult.absoluteImageURL().isEmpty() &amp;&amp; !image-&gt;filenameExtension().isEmpty() &amp;&amp; image-&gt;data() &amp;&amp; !image-&gt;data()-&gt;isEmpty()) {
-        _type = WebActionMenuImage;
-        return [self _defaultMenuItemsForImage];
-    }
-
-    Node* node = _hitTestResult.innerNode();
-    if ((node &amp;&amp; node-&gt;isTextNode()) || _hitTestResult.isOverTextInsideFormControlElement()) {
-        NSArray *dataDetectorMenuItems = [self _defaultMenuItemsForDataDetectedText];
-        if (_currentActionContext) {
-            // If this is a data detected item with no menu items, we should not fall back to regular text options.
-            if (!dataDetectorMenuItems.count) {
-                _type = WebActionMenuNone;
-                return @[ ];
-            }
-            _type = WebActionMenuDataDetectedItem;
-            return dataDetectorMenuItems;
-        }
-
-        if (_hitTestResult.isContentEditable()) {
-            NSArray *editableTextWithSuggestions = [self _defaultMenuItemsForEditableTextWithSuggestions];
-            if (editableTextWithSuggestions.count) {
-                _type = WebActionMenuEditableTextWithSuggestions;
-                return editableTextWithSuggestions;
-            }
-
-            _type = WebActionMenuEditableText;
-            return [self _defaultMenuItemsForEditableText];
-        }
-
-        _type = WebActionMenuReadOnlyText;
-        return [self _defaultMenuItemsForText];
-    }
-
-    if (_hitTestResult.isContentEditable()) {
-        _type = WebActionMenuWhitespaceInEditableArea;
-        return [self _defaultMenuItemsForWhitespaceInEditableArea];
-    }
-
-    if (_hitTestResult.isSelected()) {
-        // A selection should present the read-only text menu. It might make more sense to present a new
-        // type of menu with just copy, but for the time being, we should stay consistent with text.
-        _type = WebActionMenuReadOnlyText;
-        return [self _defaultMenuItemsForText];
-    }
-
-    _type = WebActionMenuNone;
-    return @[ ];
-}
-
-#pragma mark Text Indicator
-
-- (void)_showTextIndicator
-{
-    if (_isShowingTextIndicator)
-        return;
-
-    if (_type == WebActionMenuDataDetectedItem &amp;&amp; _currentDetectedDataTextIndicator) {
-        [_webView _setTextIndicator:*_currentDetectedDataTextIndicator withLifetime:TextIndicatorLifetime::Permanent];
-        _isShowingTextIndicator = YES;
-    }
-}
-
-- (void)_hideTextIndicatorWithAnimation:(TextIndicatorDismissalAnimation)animation
-{
-    if (!_isShowingTextIndicator)
-        return;
-
-    [_webView _clearTextIndicatorWithAnimation:animation];
-    _isShowingTextIndicator = NO;
-}
-
-- (void)_dismissActionMenuPopovers
-{
-    DDActionsManager *actionsManager = [getDDActionsManagerClass() sharedManager];
-    if ([actionsManager respondsToSelector:@selector(requestBubbleClosureUnanchorOnFailure:)])
-        [actionsManager requestBubbleClosureUnanchorOnFailure:YES];
-}
-
-@end
-
-#endif // PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</del></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebHTMLViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #import &quot;DOMNodeInternal.h&quot;
</span><span class="cx"> #import &quot;DOMRangeInternal.h&quot;
</span><span class="cx"> #import &quot;DictionaryPopupInfo.h&quot;
</span><del>-#import &quot;WebActionMenuController.h&quot;
</del><span class="cx"> #import &quot;WebArchive.h&quot;
</span><span class="cx"> #import &quot;WebClipView.h&quot;
</span><span class="cx"> #import &quot;WebContextMenuClient.h&quot;
</span><span class="lines">@@ -52,6 +51,7 @@
</span><span class="cx"> #import &quot;WebFrameViewInternal.h&quot;
</span><span class="cx"> #import &quot;WebHTMLRepresentationPrivate.h&quot;
</span><span class="cx"> #import &quot;WebHTMLViewInternal.h&quot;
</span><ins>+#import &quot;WebImmediateActionController.h&quot;
</ins><span class="cx"> #import &quot;WebKitLogging.h&quot;
</span><span class="cx"> #import &quot;WebKitNSStringExtras.h&quot;
</span><span class="cx"> #import &quot;WebKitVersionChecks.h&quot;
</span><span class="lines">@@ -3728,7 +3728,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><del>-    [[[self _webView] _actionMenuController] webView:[self _webView] didHandleScrollWheel:event];
</del><span class="cx">     [[[self _webView] _immediateActionController] webView:[self _webView] didHandleScrollWheel:event];
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="lines">@@ -3839,10 +3838,6 @@
</span><span class="cx">     // Record the mouse down position so we can determine drag hysteresis.
</span><span class="cx">     [self _setMouseDownEvent:event];
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
-    [[[self _webView] _actionMenuController] webView:[self _webView] willHandleMouseDown:event];
-#endif
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     // TEXTINPUT: if there is marked text and the current input
</span><span class="cx">     // manager wants to handle mouse events, we need to make sure to
</span><span class="lines">@@ -5434,7 +5429,7 @@
</span><span class="cx"> - (void)otherMouseDown:(NSEvent *)event
</span><span class="cx"> {
</span><span class="cx">     if ([event buttonNumber] != 2 || ([NSMenu respondsToSelector:@selector(menuTypeForEvent:)]
</span><del>-        &amp;&amp; ([NSMenu menuTypeForEvent:event] == NSMenuTypeActionMenu || [NSMenu menuTypeForEvent:event] == NSMenuTypeContextMenu))) {
</del><ins>+        &amp;&amp; [NSMenu menuTypeForEvent:event] == NSMenuTypeContextMenu)) {
</ins><span class="cx">         [super otherMouseDown:event];
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebUIDelegatePrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -112,25 +112,7 @@
</span><span class="cx">     WebMenuItemTagBaseApplication = 10000
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-enum {
-    WebActionMenuItemTagNoAction = 0,
-    WebActionMenuItemTagOpenLinkInDefaultBrowser,
-    WebActionMenuItemTagPreviewLink,
-    WebActionMenuItemTagAddLinkToSafariReadingList,
-    WebActionMenuItemTagCopyText,
-    WebActionMenuItemTagLookupText,
-    WebActionMenuItemTagPaste,
-    WebActionMenuItemTagTextSuggestions,
-    WebActionMenuItemTagCopyImage,
-    WebActionMenuItemTagAddImageToPhotos,
-    WebActionMenuItemTagSaveImageToDownloads,
-    WebActionMenuItemTagShareImage,
-    WebActionMenuItemTagCopyVideoURL,
-    WebActionMenuItemTagSaveVideoToDownloads,
-    WebActionMenuItemTagShareVideo,
-    WebActionMenuItemTagShareLink
-};
-
</del><ins>+// Deprecated; remove when there are no more clients.
</ins><span class="cx"> typedef enum {
</span><span class="cx">     WebActionMenuNone = 0,
</span><span class="cx">     WebActionMenuLink,
</span><span class="lines">@@ -238,7 +220,8 @@
</span><span class="cx"> - (void)webView:(WebView *)sender willPopupMenu:(NSMenu *)menu;
</span><span class="cx"> - (void)webView:(WebView *)sender contextMenuItemSelected:(NSMenuItem *)item forElement:(NSDictionary *)element;
</span><span class="cx"> - (void)webView:(WebView *)sender saveFrameView:(WebFrameView *)frameView showingPanel:(BOOL)showingPanel;
</span><del>-- (NSArray *)_webView:(WebView *)sender actionMenuItemsForHitTestResult:(NSDictionary *)hitTestResult withType:(WebActionMenuType)type defaultActionMenuItems:(NSArray *)defaultMenuItems;
</del><ins>+
+// FIXME: Rename this because it's only used by immediate action code.
</ins><span class="cx"> - (DDActionContext *)_webView:(WebView *)sender actionContextForHitTestResult:(NSDictionary *)hitTestResult range:(DOMRange **)range;
</span><span class="cx"> 
</span><span class="cx"> // Clients that want to maintain default behavior can return nil. To disable the immediate action entirely, return NSNull. And to
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -212,7 +212,6 @@
</span><span class="cx"> #import &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>-#import &quot;WebActionMenuController.h&quot;
</del><span class="cx"> #import &quot;WebContextMenuClient.h&quot;
</span><span class="cx"> #import &quot;WebFullScreenController.h&quot;
</span><span class="cx"> #import &quot;WebImmediateActionController.h&quot;
</span><span class="lines">@@ -223,7 +222,6 @@
</span><span class="cx"> #import &quot;WebPDFView.h&quot;
</span><span class="cx"> #import &lt;WebCore/LookupSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/NSImmediateActionGestureRecognizerSPI.h&gt;
</span><del>-#import &lt;WebCore/NSViewSPI.h&gt;
</del><span class="cx"> #import &lt;WebCore/SoftLinking.h&gt;
</span><span class="cx"> #import &lt;WebCore/TextIndicator.h&gt;
</span><span class="cx"> #import &lt;WebCore/TextIndicatorWindow.h&gt;
</span><span class="lines">@@ -909,13 +907,6 @@
</span><span class="cx">     [frameView release];
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><del>-    if ([self respondsToSelector:@selector(_setActionMenu:)]) {
-        RetainPtr&lt;NSMenu&gt; actionMenu = adoptNS([[NSMenu alloc] init]);
-        self._actionMenu = actionMenu.get();
-        _private-&gt;actionMenuController = [[WebActionMenuController alloc] initWithWebView:self];
-        self._actionMenu.autoenablesItems = NO;
-    }
-
</del><span class="cx">     if (Class gestureClass = NSClassFromString(@&quot;NSImmediateActionGestureRecognizer&quot;)) {
</span><span class="cx">         RetainPtr&lt;NSImmediateActionGestureRecognizer&gt; recognizer = adoptNS([(NSImmediateActionGestureRecognizer *)[gestureClass alloc] init]);
</span><span class="cx">         _private-&gt;immediateActionController = [[WebImmediateActionController alloc] initWithWebView:self recognizer:recognizer.get()];
</span><span class="lines">@@ -1762,7 +1753,6 @@
</span><span class="cx">     [_private-&gt;inspector webViewClosed];
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><del>-    [_private-&gt;actionMenuController webViewClosed];
</del><span class="cx">     [_private-&gt;immediateActionController webViewClosed];
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -8550,35 +8540,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><del>-- (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (menu != self._actionMenu)
-        return;
-
-    [_private-&gt;actionMenuController prepareForMenu:menu withEvent:event];
-}
-
-- (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (menu != self._actionMenu)
-        return;
-
-    [_private-&gt;actionMenuController willOpenMenu:menu withEvent:event];
-}
-
-- (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (menu != self._actionMenu)
-        return;
-
-    [_private-&gt;actionMenuController didCloseMenu:menu withEvent:event];
-}
-
-- (WebActionMenuController *)_actionMenuController
-{
-    return _private-&gt;actionMenuController;
-}
-
</del><span class="cx"> - (WebImmediateActionController *)_immediateActionController
</span><span class="cx"> {
</span><span class="cx">     return _private-&gt;immediateActionController;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewData.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewData.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/mac/WebView/WebViewData.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -49,7 +49,6 @@
</span><span class="cx"> class TextIndicatorWindow;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-@class WebActionMenuController;
</del><span class="cx"> @class WebImmediateActionController;
</span><span class="cx"> @class WebInspector;
</span><span class="cx"> @class WebNodeHighlight;
</span><span class="lines">@@ -169,7 +168,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><del>-    WebActionMenuController *actionMenuController;
</del><span class="cx">     WebImmediateActionController *immediateActionController;
</span><span class="cx"> #endif // __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><span class="cx">     std::unique_ptr&lt;WebCore::TextIndicatorWindow&gt; textIndicatorWindow;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewDatamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewData.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewData.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/mac/WebView/WebViewData.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -188,7 +188,6 @@
</span><span class="cx">     [inspector release];
</span><span class="cx">     [currentNodeHighlight release];
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><del>-    [actionMenuController release];
</del><span class="cx">     [immediateActionController release];
</span><span class="cx"> #endif
</span><span class="cx">     [hostWindow release];
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewInternal.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewInternal.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit/mac/WebView/WebViewInternal.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -70,7 +70,6 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-@class WebActionMenuController;
</del><span class="cx"> @class WebBasePluginPackage;
</span><span class="cx"> @class WebDownload;
</span><span class="cx"> @class WebImmediateActionController;
</span><span class="lines">@@ -271,7 +270,6 @@
</span><span class="cx"> - (void)_showDictionaryLookupPopup:(const DictionaryPopupInfo&amp;)dictionaryPopupInfo;
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><span class="cx"> - (id)_animationControllerForDictionaryLookupPopupInfo:(const DictionaryPopupInfo&amp;)dictionaryPopupInfo;
</span><del>-- (WebActionMenuController *)_actionMenuController;
</del><span class="cx"> - (WebImmediateActionController *)_immediateActionController;
</span><span class="cx"> #endif
</span><span class="cx"> - (NSEvent *)_pressureEvent;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/ChangeLog        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,3 +1,80 @@
</span><ins>+2015-05-22  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Remove action menu support
+        https://bugs.webkit.org/show_bug.cgi?id=145305
+        &lt;rdar://problem/21070771&gt;
+
+        Reviewed by Anders Carlsson.
+
+        * Configurations/WebKit.xcconfig:
+        * Shared/API/c/WKActionMenuItemTypes.h:
+        * Shared/API/c/WKActionMenuTypes.h:
+        * UIProcess/API/Cocoa/WKViewPrivate.h:
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
+        (-[WKView dealloc]): Deleted.
+        (-[WKView mouseDown:]): Deleted.
+        (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
+        (-[WKView prepareForMenu:withEvent:]): Deleted.
+        (-[WKView willOpenMenu:withEvent:]): Deleted.
+        (-[WKView didCloseMenu:withEvent:]): Deleted.
+        (-[WKView _didPerformActionMenuHitTest:forImmediateAction:contentPreventsDefault:userData:]): Deleted.
+        (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]): Deleted.
+        (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]): Deleted.
+        * UIProcess/API/mac/WKViewInternal.h:
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::performImmediateActionHitTestAtLocation):
+        (WebKit::WebPageProxy::didPerformImmediateActionHitTest):
+        (WebKit::WebPageProxy::performActionMenuHitTestAtLocation): Deleted.
+        (WebKit::WebPageProxy::selectLastActionMenuRange): Deleted.
+        (WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult): Deleted.
+        (WebKit::WebPageProxy::didPerformActionMenuHitTest): Deleted.
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/mac/PageClientImpl.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::didPerformImmediateActionHitTest):
+        (WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
+        * UIProcess/mac/WKActionMenuController.h: Removed.
+        * UIProcess/mac/WKActionMenuController.mm: Removed.
+        * UIProcess/mac/WKImmediateActionController.h:
+        * UIProcess/mac/WKImmediateActionController.mm:
+        (-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
+        (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
+        (-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
+        (-[WKImmediateActionController didPerformActionMenuHitTest:contentPreventsDefault:userData:]): Deleted.
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h:
+        (API::InjectedBundle::PageContextMenuClient::prepareForImmediateAction):
+        (API::InjectedBundle::PageContextMenuClient::prepareForActionMenu): Deleted.
+        * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
+        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
+        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
+        (WebKit::InjectedBundlePageContextMenuClient::prepareForImmediateAction):
+        (WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu): Deleted.
+        * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/WebPageOverlay.cpp:
+        (WebKit::WebPageOverlay::actionContextForResultAtPoint):
+        * WebProcess/WebPage/WebPageOverlay.h:
+        (WebKit::WebPageOverlay::Client::actionContextForResultAtPoint):
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::textIndicatorTransitionForImmediateAction):
+        (WebKit::WebPage::performImmediateActionHitTestAtLocation):
+        (WebKit::textIndicatorTransitionForActionMenu): Deleted.
+        (WebKit::WebPage::performActionMenuHitTestAtLocation): Deleted.
+        (WebKit::WebPage::selectLastActionMenuRange): Deleted.
+        (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult): Deleted.
+        Remove everything, except some enums that clients still refer to.
+        Also, leave SPI that used to be shared between immediate actions and
+        action menus intact, even if it had &quot;action menu&quot; in the name. We can
+        deprecate and rename in another patch... except for the very recently-added
+        support from r184106, which we'll revert entirely, removing WKBundlePageOverlayV2, 
+        which was not adopted by any clients.
+
</ins><span class="cx"> 2015-05-22  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rework how the ResourceRequest user initiated property key is used.
</span></span></pre></div>
<a id="trunkSourceWebKit2ConfigurationsWebKitxcconfig"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Configurations/WebKit.xcconfig (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Configurations/WebKit.xcconfig        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/Configurations/WebKit.xcconfig        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebKit.order;
</span><span class="cx"> SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,mac/WebKit2.order;
</span><span class="cx"> 
</span><del>-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *.pdf Resources/mac/* WKActionMenuController.* com.apple.WebKit.Databases.sb com.apple.WebKit.NetworkProcess.sb com.apple.WebProcess.sb PlugInSandboxProfiles/*.sb;
</del><ins>+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *.pdf Resources/mac/* com.apple.WebKit.Databases.sb com.apple.WebKit.NetworkProcess.sb com.apple.WebProcess.sb PlugInSandboxProfiles/*.sb;
</ins><span class="cx"> 
</span><span class="cx"> INSTALLHDRS_SCRIPT_PHASE = YES;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIcWKActionMenuItemTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/WKActionMenuItemTypes.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/WKActionMenuItemTypes.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/Shared/API/c/WKActionMenuItemTypes.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> extern &quot;C&quot; {
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+// Deprecated; remove when there are no more clients.
</ins><span class="cx"> enum {
</span><span class="cx">     kWKContextActionItemTagNoAction = 0,
</span><span class="cx">     kWKContextActionItemTagOpenLinkInDefaultBrowser,
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIcWKActionMenuTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/WKActionMenuTypes.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/WKActionMenuTypes.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/Shared/API/c/WKActionMenuTypes.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> extern &quot;C&quot; {
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+// Deprecated; remove when there are no more clients.
</ins><span class="cx"> enum {
</span><span class="cx">     kWKActionMenuNone = 0,
</span><span class="cx">     kWKActionMenuLink,
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebHitTestResultcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebHitTestResult.cpp (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebHitTestResult.cpp        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/Shared/WebHitTestResult.cpp        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -84,11 +84,9 @@
</span><span class="cx"> 
</span><span class="cx">     if (Image* image = hitTestResult.image()) {
</span><span class="cx">         RefPtr&lt;SharedBuffer&gt; buffer = image-&gt;data();
</span><del>-        String filenameExtension = image-&gt;filenameExtension();
-        if (!filenameExtension.isEmpty() &amp;&amp; buffer) {
</del><ins>+        if (buffer) {
</ins><span class="cx">             imageSharedMemory = SharedMemory::allocate(buffer-&gt;size());
</span><span class="cx">             memcpy(imageSharedMemory-&gt;data(), buffer-&gt;data(), buffer-&gt;size());
</span><del>-            imageExtension = filenameExtension;
</del><span class="cx">             imageSize = buffer-&gt;size();
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -114,7 +112,6 @@
</span><span class="cx">     encoder &lt;&lt; isOverTextInsideFormControlElement;
</span><span class="cx">     encoder &lt;&lt; allowsCopy;
</span><span class="cx">     encoder &lt;&lt; isDownloadableMedia;
</span><del>-    encoder &lt;&lt; hitTestLocationInViewCoordinates;
</del><span class="cx">     encoder &lt;&lt; lookupText;
</span><span class="cx">     encoder &lt;&lt; dictionaryPopupInfo;
</span><span class="cx"> 
</span><span class="lines">@@ -123,7 +120,6 @@
</span><span class="cx">         imageSharedMemory-&gt;createHandle(imageHandle, SharedMemory::Protection::ReadOnly);
</span><span class="cx">     encoder &lt;&lt; imageHandle;
</span><span class="cx">     encoder &lt;&lt; imageSize;
</span><del>-    encoder &lt;&lt; imageExtension;
</del><span class="cx"> 
</span><span class="cx">     bool hasLinkTextIndicator = linkTextIndicator;
</span><span class="cx">     encoder &lt;&lt; hasLinkTextIndicator;
</span><span class="lines">@@ -149,7 +145,6 @@
</span><span class="cx">         || !decoder.decode(hitTestResultData.isOverTextInsideFormControlElement)
</span><span class="cx">         || !decoder.decode(hitTestResultData.allowsCopy)
</span><span class="cx">         || !decoder.decode(hitTestResultData.isDownloadableMedia)
</span><del>-        || !decoder.decode(hitTestResultData.hitTestLocationInViewCoordinates)
</del><span class="cx">         || !decoder.decode(hitTestResultData.lookupText)
</span><span class="cx">         || !decoder.decode(hitTestResultData.dictionaryPopupInfo))
</span><span class="cx">         return false;
</span><span class="lines">@@ -164,9 +159,6 @@
</span><span class="cx">     if (!decoder.decode(hitTestResultData.imageSize))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (!decoder.decode(hitTestResultData.imageExtension))
-        return false;
-
</del><span class="cx">     bool hasLinkTextIndicator;
</span><span class="cx">     if (!decoder.decode(hasLinkTextIndicator))
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebHitTestResulth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebHitTestResult.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebHitTestResult.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/Shared/WebHitTestResult.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -64,12 +64,9 @@
</span><span class="cx">         bool allowsCopy;
</span><span class="cx">         bool isDownloadableMedia;
</span><span class="cx"> 
</span><del>-        // FIXME: Added from ActionHitTestResult. All make sense?
-        WebCore::FloatPoint hitTestLocationInViewCoordinates;
</del><span class="cx">         String lookupText;
</span><span class="cx">         RefPtr&lt;SharedMemory&gt; imageSharedMemory;
</span><span class="cx">         uint64_t imageSize;
</span><del>-        String imageExtension;
</del><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">         RetainPtr&lt;DDActionContext&gt; detectedDataActionContext;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#import &lt;WebKit/WKActionMenuTypes.h&gt;
</del><span class="cx"> #import &lt;WebKit/WKBase.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKImmediateActionTypes.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKLayoutMode.h&gt;
</span><span class="lines">@@ -141,9 +140,6 @@
</span><span class="cx"> // The rect returned is always that of the snapshot, and only if it is the view being manipulated by the swipe. This only works for layer-backed windows.
</span><span class="cx"> - (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect swipeSnapshotRectInWindowCoordinates))callback;
</span><span class="cx"> 
</span><del>-- (NSArray *)_actionMenuItemsForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(_WKActionMenuType)type defaultActionMenuItems:(NSArray *)defaultMenuItems;
-- (NSArray *)_actionMenuItemsForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(_WKActionMenuType)type defaultActionMenuItems:(NSArray *)defaultMenuItems userData:(WKTypeRef)userData;
-
</del><span class="cx"> // Clients that want to maintain default behavior can return nil. To disable the immediate action entirely, return NSNull. And to
</span><span class="cx"> // do something custom, return an object that conforms to the NSImmediateActionAnimationController protocol.
</span><span class="cx"> - (id)_immediateActionAnimationControllerForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(_WKImmediateActionType)type userData:(WKTypeRef)userData;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -55,8 +55,6 @@
</span><span class="cx"> #import &quot;ViewGestureController.h&quot;
</span><span class="cx"> #import &quot;ViewSnapshotStore.h&quot;
</span><span class="cx"> #import &quot;WKAPICast.h&quot;
</span><del>-#import &quot;WKActionMenuController.h&quot;
-#import &quot;WKActionMenuItemTypes.h&quot;
</del><span class="cx"> #import &quot;WKFullScreenWindowController.h&quot;
</span><span class="cx"> #import &quot;WKImmediateActionController.h&quot;
</span><span class="cx"> #import &quot;WKLayoutMode.h&quot;
</span><span class="lines">@@ -96,7 +94,6 @@
</span><span class="cx"> #import &lt;WebCore/LookupSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/NSImmediateActionGestureRecognizerSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/NSMenuSPI.h&gt;
</span><del>-#import &lt;WebCore/NSViewSPI.h&gt;
</del><span class="cx"> #import &lt;WebCore/PlatformEventFactoryMac.h&gt;
</span><span class="cx"> #import &lt;WebCore/PlatformScreen.h&gt;
</span><span class="cx"> #import &lt;WebCore/Region.h&gt;
</span><span class="lines">@@ -284,7 +281,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><span class="cx">     BOOL _automaticallyAdjustsContentInsets;
</span><del>-    RetainPtr&lt;WKActionMenuController&gt; _actionMenuController;
</del><span class="cx">     RetainPtr&lt;WKImmediateActionController&gt; _immediateActionController;
</span><span class="cx">     RetainPtr&lt;NSImmediateActionGestureRecognizer&gt; _immediateActionGestureRecognizer;
</span><span class="cx"> #endif
</span><span class="lines">@@ -387,7 +383,6 @@
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><del>-    [_data-&gt;_actionMenuController willDestroyView:self];
</del><span class="cx">     [_data-&gt;_immediateActionController willDestroyView:self];
</span><span class="cx"> #endif
</span><span class="cx">     [_data-&gt;_layoutStrategy willDestroyView:self];
</span><span class="lines">@@ -1262,10 +1257,6 @@
</span><span class="cx">             }]; \
</span><span class="cx">             return; \
</span><span class="cx">         } \
</span><del>-        if ([NSMenu respondsToSelector:@selector(menuTypeForEvent:)] &amp;&amp; [NSMenu menuTypeForEvent:theEvent] == NSMenuTypeActionMenu) { \
-            [super Selector:theEvent]; \
-            return; \
-        } \
</del><span class="cx">         NativeWebMouseEvent webEvent(theEvent, _data-&gt;_pressureEvent, self); \
</span><span class="cx">         _data-&gt;_page-&gt;handleMouseEvent(webEvent); \
</span><span class="cx">     }
</span><span class="lines">@@ -1298,10 +1289,6 @@
</span><span class="cx">             LOG(TextInput, &quot;%s was handled by text input context&quot;, String(#Selector).substring(0, String(#Selector).find(&quot;Internal&quot;)).ascii().data()); \
</span><span class="cx">             return; \
</span><span class="cx">         } \
</span><del>-        if ([NSMenu respondsToSelector:@selector(menuTypeForEvent:)] &amp;&amp; [NSMenu menuTypeForEvent:theEvent] == NSMenuTypeActionMenu) { \
-            [super Selector:theEvent]; \
-            return; \
-        } \
</del><span class="cx">         NativeWebMouseEvent webEvent(theEvent, _data-&gt;_pressureEvent, self); \
</span><span class="cx">         _data-&gt;_page-&gt;handleMouseEvent(webEvent); \
</span><span class="cx">     }
</span><span class="lines">@@ -1396,9 +1383,6 @@
</span><span class="cx">     [self _setMouseDownEvent:event];
</span><span class="cx">     _data-&gt;_ignoringMouseDraggedEvents = NO;
</span><span class="cx"> 
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
-    [_data-&gt;_actionMenuController wkView:self willHandleMouseDown:event];
-#endif
</del><span class="cx">     [self mouseDownInternal:event];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3846,14 +3830,6 @@
</span><span class="cx">     [workspaceNotificationCenter addObserver:self selector:@selector(_activeSpaceDidChange:) name:NSWorkspaceActiveSpaceDidChangeNotification object:nil];
</span><span class="cx"> 
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><del>-    if ([self respondsToSelector:@selector(_setActionMenu:)]) {
-        RetainPtr&lt;NSMenu&gt; menu = adoptNS([[NSMenu alloc] init]);
-        self._actionMenu = menu.get();
-        _data-&gt;_actionMenuController = adoptNS([[WKActionMenuController alloc] initWithPage:*_data-&gt;_page view:self]);
-        self._actionMenu.delegate = _data-&gt;_actionMenuController.get();
-        self._actionMenu.autoenablesItems = NO;
-    }
-
</del><span class="cx">     if (Class gestureClass = NSClassFromString(@&quot;NSImmediateActionGestureRecognizer&quot;)) {
</span><span class="cx">         _data-&gt;_immediateActionGestureRecognizer = adoptNS([(NSImmediateActionGestureRecognizer *)[gestureClass alloc] init]);
</span><span class="cx">         _data-&gt;_immediateActionController = adoptNS([[WKImmediateActionController alloc] initWithPage:*_data-&gt;_page view:self recognizer:_data-&gt;_immediateActionGestureRecognizer.get()]);
</span><span class="lines">@@ -3968,44 +3944,11 @@
</span><span class="cx"> 
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><span class="cx"> 
</span><del>-- (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event
</del><ins>+- (void)_didPerformImmediateActionHitTest:(const WebHitTestResult::Data&amp;)hitTestResult contentPreventsDefault:(BOOL)contentPreventsDefault userData:(API::Object*)userData
</ins><span class="cx"> {
</span><del>-    if (_data-&gt;_ignoresNonWheelEvents) {
-        [menu cancelTracking];
-        return;
-    }
-
-    [_data-&gt;_actionMenuController prepareForMenu:menu withEvent:event];
</del><ins>+    [_data-&gt;_immediateActionController didPerformImmediateActionHitTest:hitTestResult contentPreventsDefault:contentPreventsDefault userData:userData];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (_data-&gt;_ignoresNonWheelEvents) {
-        [menu cancelTracking];
-        return;
-    }
-
-    [_data-&gt;_actionMenuController willOpenMenu:menu withEvent:event];
-}
-
-- (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (_data-&gt;_ignoresNonWheelEvents) {
-        [menu cancelTracking];
-        return;
-    }
-
-    [_data-&gt;_actionMenuController didCloseMenu:menu withEvent:event];
-}
-
-- (void)_didPerformActionMenuHitTest:(const WebHitTestResult::Data&amp;)hitTestResult forImmediateAction:(BOOL)forImmediateAction contentPreventsDefault:(BOOL)contentPreventsDefault userData:(API::Object*)userData
-{
-    if (forImmediateAction)
-        [_data-&gt;_immediateActionController didPerformActionMenuHitTest:hitTestResult contentPreventsDefault:contentPreventsDefault userData:userData];
-    else
-        [_data-&gt;_actionMenuController didPerformActionMenuHitTest:hitTestResult userData:userData];
-}
-
</del><span class="cx"> #endif // __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="lines">@@ -4644,16 +4587,6 @@
</span><span class="cx">     _data-&gt;_gestureController-&gt;setDidMoveSwipeSnapshotCallback(callback);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (NSArray *)_actionMenuItemsForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(_WKActionMenuType)type defaultActionMenuItems:(NSArray *)defaultMenuItems
-{
-    return defaultMenuItems;
-}
-
-- (NSArray *)_actionMenuItemsForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(_WKActionMenuType)type defaultActionMenuItems:(NSArray *)defaultMenuItems userData:(WKTypeRef)userData
-{
-    return [self _actionMenuItemsForHitTestResult:hitTestResult withType:type defaultActionMenuItems:defaultMenuItems];
-}
-
</del><span class="cx"> - (id)_immediateActionAnimationControllerForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(_WKImmediateActionType)type userData:(WKTypeRef)userData
</span><span class="cx"> {
</span><span class="cx">     return nil;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> - (void)_prepareForDictionaryLookup;
</span><span class="cx"> 
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><del>-- (void)_didPerformActionMenuHitTest:(const WebKit::WebHitTestResult::Data&amp;)hitTestResult forImmediateAction:(BOOL)forImmediateAction contentPreventsDefault:(BOOL)contentPreventsDefault userData:(API::Object*)userData;
</del><ins>+- (void)_didPerformImmediateActionHitTest:(const WebKit::WebHitTestResult::Data&amp;)hitTestResult contentPreventsDefault:(BOOL)contentPreventsDefault userData:(API::Object*)userData;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> @property (nonatomic, retain, setter=_setPrimaryTrackingArea:) NSTrackingArea *_primaryTrackingArea;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -319,7 +319,7 @@
</span><span class="cx">     virtual void didChangeBackgroundColor() = 0;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    virtual void didPerformActionMenuHitTest(const WebHitTestResult::Data&amp;, bool forImmediateAction, bool contentPreventsDefault, API::Object*) = 0;
</del><ins>+    virtual void didPerformImmediateActionHitTest(const WebHitTestResult::Data&amp;, bool contentPreventsDefault, API::Object*) = 0;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET) &amp;&amp; !PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -5781,21 +5781,11 @@
</span><span class="cx">     m_pageClient.removeNavigationGestureSnapshot();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::performActionMenuHitTestAtLocation(FloatPoint point, bool forImmediateAction)
</del><ins>+void WebPageProxy::performImmediateActionHitTestAtLocation(FloatPoint point)
</ins><span class="cx"> {
</span><del>-    m_process-&gt;send(Messages::WebPage::PerformActionMenuHitTestAtLocation(point, forImmediateAction), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::PerformImmediateActionHitTestAtLocation(point), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::selectLastActionMenuRange()
-{
-    m_process-&gt;send(Messages::WebPage::SelectLastActionMenuRange(), m_pageID);
-}
-
-void WebPageProxy::focusAndSelectLastActionMenuHitTestResult()
-{
-    m_process-&gt;send(Messages::WebPage::FocusAndSelectLastActionMenuHitTestResult(), m_pageID);
-}
-
</del><span class="cx"> void WebPageProxy::immediateActionDidUpdate()
</span><span class="cx"> {
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::ImmediateActionDidUpdate(), m_pageID);
</span><span class="lines">@@ -5811,9 +5801,9 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::ImmediateActionDidComplete(), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::didPerformActionMenuHitTest(const WebHitTestResult::Data&amp; result, bool forImmediateAction, bool contentPreventsDefault, const UserData&amp; userData)
</del><ins>+void WebPageProxy::didPerformImmediateActionHitTest(const WebHitTestResult::Data&amp; result, bool contentPreventsDefault, const UserData&amp; userData)
</ins><span class="cx"> {
</span><del>-    m_pageClient.didPerformActionMenuHitTest(result, forImmediateAction, contentPreventsDefault, m_process-&gt;transformHandlesToObjects(userData.object()).get());
</del><ins>+    m_pageClient.didPerformImmediateActionHitTest(result, contentPreventsDefault, m_process-&gt;transformHandlesToObjects(userData.object()).get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::installViewStateChangeCompletionHandler(void (^completionHandler)())
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1004,9 +1004,7 @@
</span><span class="cx">     void removeNavigationGestureSnapshot();
</span><span class="cx"> 
</span><span class="cx">     WebHitTestResult* lastMouseMoveHitTestResult() const { return m_lastMouseMoveHitTestResult.get(); }
</span><del>-    void performActionMenuHitTestAtLocation(WebCore::FloatPoint, bool forImmediateAction);
-    void selectLastActionMenuRange();
-    void focusAndSelectLastActionMenuHitTestResult();
</del><ins>+    void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
</ins><span class="cx"> 
</span><span class="cx">     void immediateActionDidUpdate();
</span><span class="cx">     void immediateActionDidCancel();
</span><span class="lines">@@ -1438,7 +1436,7 @@
</span><span class="cx">     void viewDidEnterWindow();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    void didPerformActionMenuHitTest(const WebHitTestResult::Data&amp;, bool forImmediateAction, bool contentPreventsDefault, const UserData&amp;);
</del><ins>+    void didPerformImmediateActionHitTest(const WebHitTestResult::Data&amp;, bool contentPreventsDefault, const UserData&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void handleAutoFillButtonClick(const UserData&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -428,7 +428,7 @@
</span><span class="cx">     IsPlayingMediaDidChange(unsigned state)
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    DidPerformActionMenuHitTest(struct WebKit::WebHitTestResult::Data result, bool forImmediateAction, bool contentPreventsDefault, WebKit::UserData userData)
</del><ins>+    DidPerformImmediateActionHitTest(struct WebKit::WebHitTestResult::Data result, bool contentPreventsDefault, WebKit::UserData userData)
</ins><span class="cx"> #endif
</span><span class="cx">     HandleMessage(String messageName, WebKit::UserData messageBody) WantsConnection
</span><span class="cx">     HandleSynchronousMessage(String messageName, WebKit::UserData messageBody) -&gt; (WebKit::UserData returnData) WantsConnection
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx">     virtual void didSameDocumentNavigationForMainFrame(SameDocumentNavigationType) override;
</span><span class="cx">     virtual void removeNavigationGestureSnapshot() override;
</span><span class="cx"> 
</span><del>-    virtual void didPerformActionMenuHitTest(const WebHitTestResult::Data&amp;, bool forImmediateAction, bool contentPreventsDefault, API::Object*) override;
</del><ins>+    virtual void didPerformImmediateActionHitTest(const WebHitTestResult::Data&amp;, bool contentPreventsDefault, API::Object*) override;
</ins><span class="cx">     virtual void showPlatformContextMenu(NSMenu *, WebCore::IntPoint) override;
</span><span class="cx"> 
</span><span class="cx">     virtual void didChangeBackgroundColor() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -807,10 +807,10 @@
</span><span class="cx">     return [windowContentLayer convertRect:layer.bounds fromLayer:layer];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PageClientImpl::didPerformActionMenuHitTest(const WebHitTestResult::Data&amp; result, bool forImmediateAction, bool contentPreventsDefault, API::Object* userData)
</del><ins>+void PageClientImpl::didPerformImmediateActionHitTest(const WebHitTestResult::Data&amp; result, bool contentPreventsDefault, API::Object* userData)
</ins><span class="cx"> {
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><del>-    [m_wkView _didPerformActionMenuHitTest:result forImmediateAction:forImmediateAction contentPreventsDefault:contentPreventsDefault userData:userData];
</del><ins>+    [m_wkView _didPerformImmediateActionHitTest:result contentPreventsDefault:contentPreventsDefault userData:userData];
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWKActionMenuControllerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,81 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKActionMenuController_h
-#define WKActionMenuController_h
-
-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
-
-#import &quot;WKActionMenuItemTypes.h&quot;
-#import &quot;WKActionMenuTypes.h&quot;
-#import &quot;WebHitTestResult.h&quot;
-#import &lt;AppKit/NSSharingService.h&gt;
-#import &lt;wtf/RetainPtr.h&gt;
-
-namespace WebKit {
-class WebPageProxy;
-
-enum class ActionMenuState {
-    None = 0,
-    Pending,
-    TimedOut,
-    Ready
-};
-}
-
-@class DDActionContext;
-@class WKView;
-
-@interface WKActionMenuController : NSObject &lt;NSMenuDelegate&gt; {
-@private
-    WebKit::WebPageProxy *_page;
-    WKView *_wkView;
-
-    WebKit::ActionMenuState _state;
-    WebKit::WebHitTestResult::Data _hitTestResultData;
-    RefPtr&lt;API::Object&gt; _userData;
-    _WKActionMenuType _type;
-    RetainPtr&lt;NSSharingServicePicker&gt; _sharingServicePicker;
-
-    BOOL _hasActivatedActionContext;
-
-    RetainPtr&lt;DDActionContext&gt; _currentActionContext;
-}
-
-- (instancetype)initWithPage:(WebKit::WebPageProxy&amp;)page view:(WKView *)wkView;
-- (void)willDestroyView:(WKView *)view;
-
-- (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
-- (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
-- (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
-- (void)wkView:(WKView *)wkView willHandleMouseDown:(NSEvent *)event;
-
-- (void)didPerformActionMenuHitTest:(const WebKit::WebHitTestResult::Data&amp;)hitTestResult userData:(API::Object*)userData;
-
-@end
-
-#endif // PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
-
-#endif // WKActionMenuController_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWKActionMenuControllermm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,762 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014-2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import &quot;config.h&quot;
-#import &quot;WKActionMenuController.h&quot;
-
-#if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
-
-#import &quot;WKNSURLExtras.h&quot;
-#import &quot;WKViewInternal.h&quot;
-#import &quot;WebKitSystemInterface.h&quot;
-#import &quot;WebPageMessages.h&quot;
-#import &quot;WebPageProxy.h&quot;
-#import &quot;WebPageProxyMessages.h&quot;
-#import &quot;WebProcessPool.h&quot;
-#import &quot;WebProcessProxy.h&quot;
-#import &lt;Foundation/Foundation.h&gt;
-#import &lt;ImageIO/ImageIO.h&gt;
-#import &lt;ImageKit/ImageKit.h&gt;
-#import &lt;WebCore/DataDetectorsSPI.h&gt;
-#import &lt;WebCore/LocalizedStrings.h&gt;
-#import &lt;WebCore/NSMenuSPI.h&gt;
-#import &lt;WebCore/NSSharingServiceSPI.h&gt;
-#import &lt;WebCore/NSSharingServicePickerSPI.h&gt;
-#import &lt;WebCore/NSViewSPI.h&gt;
-#import &lt;WebCore/SoftLinking.h&gt;
-#import &lt;WebCore/TextIndicator.h&gt;
-#import &lt;WebCore/URL.h&gt;
-
-SOFT_LINK_FRAMEWORK_IN_UMBRELLA(Quartz, ImageKit)
-SOFT_LINK_CLASS(ImageKit, IKSlideshow)
-
-using namespace WebCore;
-using namespace WebKit;
-
-@interface WKActionMenuController () &lt;NSSharingServiceDelegate, NSSharingServicePickerDelegate&gt;
-- (void)_updateActionMenuItems;
-- (BOOL)_canAddMediaToPhotos;
-- (void)_clearActionMenuState;
-@end
-
-@interface WKView (WKDeprecatedSPI)
-- (NSArray *)_actionMenuItemsForHitTestResult:(WKHitTestResultRef)hitTestResult defaultActionMenuItems:(NSArray *)defaultMenuItems;
-@end
-
-@implementation WKActionMenuController
-
-- (instancetype)initWithPage:(WebPageProxy&amp;)page view:(WKView *)wkView
-{
-    self = [super init];
-
-    if (!self)
-        return nil;
-
-    _page = &amp;page;
-    _wkView = wkView;
-    _type = kWKActionMenuNone;
-
-    return self;
-}
-
-- (void)willDestroyView:(WKView *)view
-{
-    _page = nullptr;
-    _wkView = nil;
-    _hitTestResultData = WebHitTestResult::Data();
-    _currentActionContext = nil;
-}
-
-- (void)wkView:(WKView *)wkView willHandleMouseDown:(NSEvent *)event
-{
-    [self _clearActionMenuState];
-}
-
-- (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (menu != _wkView._actionMenu)
-        return;
-
-    [_wkView _dismissContentRelativeChildWindows];
-
-    _page-&gt;performActionMenuHitTestAtLocation([_wkView convertPoint:event.locationInWindow fromView:nil], false);
-
-    _state = ActionMenuState::Pending;
-    [self _updateActionMenuItems];
-}
-
-- (BOOL)isMenuForTextContent
-{
-    return _type == kWKActionMenuReadOnlyText || _type == kWKActionMenuEditableText || _type == kWKActionMenuEditableTextWithSuggestions;
-}
-
-- (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (menu != _wkView._actionMenu)
-        return;
-
-    if (!menu.numberOfItems)
-        return;
-
-    if (_type == kWKActionMenuDataDetectedItem) {
-        if (menu.numberOfItems == 1)
-            _page-&gt;clearSelection();
-        else
-            _page-&gt;selectLastActionMenuRange();
-        return;
-    }
-
-    if (_type == kWKActionMenuWhitespaceInEditableArea) {
-        _page-&gt;focusAndSelectLastActionMenuHitTestResult();
-        return;
-    }
-
-    if (![self isMenuForTextContent]) {
-        _page-&gt;clearSelection();
-        return;
-    }
-
-    // Action menus for text should highlight the text so that it is clear what the action menu actions
-    // will apply to. If the text is already selected, the menu will use the existing selection.
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult = [self _webHitTestResult];
-    if (!hitTestResult-&gt;isSelected())
-        _page-&gt;selectLastActionMenuRange();
-}
-
-- (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event
-{
-    if (menu != _wkView._actionMenu)
-        return;
-
-    [self _clearActionMenuState];
-}
-
-- (void)_clearActionMenuState
-{
-    if (_currentActionContext &amp;&amp; _hasActivatedActionContext) {
-        [getDDActionsManagerClass() didUseActions];
-        _hasActivatedActionContext = NO;
-    }
-
-    _state = ActionMenuState::None;
-    _hitTestResultData = WebHitTestResult::Data();
-    _type = kWKActionMenuNone;
-    _sharingServicePicker = nil;
-    _currentActionContext = nil;
-    _userData = nil;
-}
-
-- (void)didPerformActionMenuHitTest:(const WebHitTestResult::Data&amp;)hitTestResult userData:(API::Object*)userData
-{
-    // FIXME: This needs to use the WebKit2 callback mechanism to avoid out-of-order replies.
-    _state = ActionMenuState::Ready;
-    _hitTestResultData = hitTestResult;
-    _userData = userData;
-
-    [self _updateActionMenuItems];
-}
-
-#pragma mark Link actions
-
-- (NSURL *)_hitLinkURL
-{
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult = [self _webHitTestResult];
-    return [NSURL _web_URLWithWTFString:hitTestResult-&gt;absoluteLinkURL()];
-}
-
-- (NSArray *)_defaultMenuItemsForLink
-{
-    RetainPtr&lt;NSMenuItem&gt; openLinkItem = [self _createActionMenuItemForTag:kWKContextActionItemTagOpenLinkInDefaultBrowser];
-    RetainPtr&lt;NSMenuItem&gt; readingListItem = [self _createActionMenuItemForTag:kWKContextActionItemTagAddLinkToSafariReadingList];
-    RetainPtr&lt;NSMenuItem&gt; shareItem = [self _createShareActionMenuItemForTag:kWKContextActionItemTagShareLink withItems:@[ [self _hitLinkURL] ]];
-
-    return @[ openLinkItem.get(), shareItem.get(), [NSMenuItem separatorItem], readingListItem.get() ];
-}
-
-- (void)_openURLFromActionMenu:(id)sender
-{
-    [[NSWorkspace sharedWorkspace] openURL:[self _hitLinkURL]];
-}
-
-- (void)_addToReadingListFromActionMenu:(id)sender
-{
-    NSSharingService *service = [NSSharingService sharingServiceNamed:NSSharingServiceNameAddToSafariReadingList];
-    [service performWithItems:@[ [self _hitLinkURL] ]];
-}
-
-#pragma mark Video actions
-
-- (NSArray *)_defaultMenuItemsForVideo
-{
-    RetainPtr&lt;NSMenuItem&gt; copyVideoURLItem = [self _createActionMenuItemForTag:kWKContextActionItemTagCopyVideoURL];
-    RetainPtr&lt;NSMenuItem&gt; saveToDownloadsItem = [self _createActionMenuItemForTag:kWKContextActionItemTagSaveVideoToDownloads];
-
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult = [self _webHitTestResult];
-    String urlToShare = hitTestResult-&gt;isDownloadableMedia() ? hitTestResult-&gt;absoluteMediaURL() : _page-&gt;mainFrame()-&gt;url();
-    RetainPtr&lt;NSMenuItem&gt; shareItem = [self _createShareActionMenuItemForTag:kWKContextActionItemTagShareVideo withItems:@[ urlToShare ]];
-
-    return @[ copyVideoURLItem.get(), [NSMenuItem separatorItem], saveToDownloadsItem.get(), shareItem.get() ];
-}
-
-- (void)_copyVideoURL:(id)sender
-{
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult = [self _webHitTestResult];
-    String urlToCopy = hitTestResult-&gt;absoluteMediaURL();
-    if (!hitTestResult-&gt;isDownloadableMedia())
-        urlToCopy = _page-&gt;mainFrame()-&gt;url();
-
-    [[NSPasteboard generalPasteboard] clearContents];
-    [[NSPasteboard generalPasteboard] writeObjects:@[ urlToCopy ]];
-}
-
-- (void)_saveVideoToDownloads:(id)sender
-{
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult = [self _webHitTestResult];
-    _page-&gt;process().processPool().download(_page, hitTestResult-&gt;absoluteMediaURL());
-}
-
-#pragma mark Image actions
-
-- (NSImage *)_hitTestResultDataImage
-{
-    RefPtr&lt;SharedMemory&gt; imageSharedMemory = _hitTestResultData.imageSharedMemory;
-    if (!imageSharedMemory)
-        return nil;
-
-    RetainPtr&lt;NSImage&gt; nsImage = adoptNS([[NSImage alloc] initWithData:[NSData dataWithBytes:imageSharedMemory-&gt;data() length:_hitTestResultData.imageSize]]);
-    return nsImage.autorelease();
-}
-
-- (NSArray *)_defaultMenuItemsForImage
-{
-    RetainPtr&lt;NSMenuItem&gt; copyImageItem = [self _createActionMenuItemForTag:kWKContextActionItemTagCopyImage];
-    RetainPtr&lt;NSMenuItem&gt; addToPhotosItem;
-    if ([self _canAddMediaToPhotos])
-        addToPhotosItem = [self _createActionMenuItemForTag:kWKContextActionItemTagAddImageToPhotos];
-    else
-        addToPhotosItem = [NSMenuItem separatorItem];
-    RetainPtr&lt;NSMenuItem&gt; saveToDownloadsItem = [self _createActionMenuItemForTag:kWKContextActionItemTagSaveImageToDownloads];
-    RetainPtr&lt;NSMenuItem&gt; shareItem = [self _createShareActionMenuItemForTag:kWKContextActionItemTagShareImage withItems:@[ [self _hitTestResultDataImage] ]];
-
-    return @[ copyImageItem.get(), addToPhotosItem.get(), saveToDownloadsItem.get(), shareItem.get() ];
-}
-
-- (void)_copyImage:(id)sender
-{
-    RetainPtr&lt;NSImage&gt; image = [self _hitTestResultDataImage];
-    if (!image)
-        return;
-
-    [[NSPasteboard generalPasteboard] clearContents];
-    [[NSPasteboard generalPasteboard] writeObjects:@[ image.get() ]];
-}
-
-- (void)_saveImageToDownloads:(id)sender
-{
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult = [self _webHitTestResult];
-    _page-&gt;process().processPool().download(_page, hitTestResult-&gt;absoluteImageURL());
-}
-
-// FIXME: We should try to share this with WebPageProxyMac's similar PDF functions.
-static NSString *temporaryPhotosDirectoryPath()
-{
-    static NSString *temporaryPhotosDirectoryPath;
-
-    if (!temporaryPhotosDirectoryPath) {
-        NSString *temporaryDirectoryTemplate = [NSTemporaryDirectory() stringByAppendingPathComponent:@&quot;WebKitPhotos-XXXXXX&quot;];
-        CString templateRepresentation = [temporaryDirectoryTemplate fileSystemRepresentation];
-
-        if (mkdtemp(templateRepresentation.mutableData()))
-            temporaryPhotosDirectoryPath = [[[NSFileManager defaultManager] stringWithFileSystemRepresentation:templateRepresentation.data() length:templateRepresentation.length()] copy];
-    }
-
-    return temporaryPhotosDirectoryPath;
-}
-
-static NSString *pathToPhotoOnDisk(NSString *suggestedFilename)
-{
-    NSString *photoDirectoryPath = temporaryPhotosDirectoryPath();
-    if (!photoDirectoryPath) {
-        WTFLogAlways(&quot;Cannot create temporary photo download directory.&quot;);
-        return nil;
-    }
-
-    NSString *path = [photoDirectoryPath stringByAppendingPathComponent:suggestedFilename];
-
-    NSFileManager *fileManager = [NSFileManager defaultManager];
-    if ([fileManager fileExistsAtPath:path]) {
-        NSString *pathTemplatePrefix = [photoDirectoryPath stringByAppendingPathComponent:@&quot;XXXXXX-&quot;];
-        NSString *pathTemplate = [pathTemplatePrefix stringByAppendingString:suggestedFilename];
-        CString pathTemplateRepresentation = [pathTemplate fileSystemRepresentation];
-
-        int fd = mkstemps(pathTemplateRepresentation.mutableData(), pathTemplateRepresentation.length() - strlen([pathTemplatePrefix fileSystemRepresentation]) + 1);
-        if (fd &lt; 0) {
-            WTFLogAlways(&quot;Cannot create photo file in the temporary directory (%@).&quot;, suggestedFilename);
-            return nil;
-        }
-
-        close(fd);
-        path = [fileManager stringWithFileSystemRepresentation:pathTemplateRepresentation.data() length:pathTemplateRepresentation.length()];
-    }
-
-    return path;
-}
-
-- (BOOL)_canAddMediaToPhotos
-{
-    return [getIKSlideshowClass() canExportToApplication:@&quot;com.apple.Photos&quot;];
-}
-
-- (void)_addImageToPhotos:(id)sender
-{
-    if (![self _canAddMediaToPhotos])
-        return;
-
-    RefPtr&lt;SharedMemory&gt; imageSharedMemory = _hitTestResultData.imageSharedMemory;
-    if (!imageSharedMemory-&gt;data() || _hitTestResultData.imageExtension.isEmpty() || !_hitTestResultData.imageSize)
-        return;
-
-    RetainPtr&lt;NSData&gt; imageData = adoptNS([[NSData alloc] initWithBytes:imageSharedMemory-&gt;data() length:_hitTestResultData.imageSize]);
-    RetainPtr&lt;NSString&gt; suggestedFilename = [[[NSProcessInfo processInfo] globallyUniqueString] stringByAppendingPathExtension:_hitTestResultData.imageExtension];
-
-    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-        NSString *filePath = pathToPhotoOnDisk(suggestedFilename.get());
-        if (!filePath)
-            return;
-
-        NSURL *fileURL = [NSURL fileURLWithPath:filePath];
-        [imageData writeToURL:fileURL atomically:NO];
-
-        dispatch_async(dispatch_get_main_queue(), ^{
-            // This API provides no way to report failure, but if 18420778 is fixed so that it does, we should handle this.
-            [getIKSlideshowClass() exportSlideshowItem:filePath toApplication:@&quot;com.apple.Photos&quot;];
-        });
-    });
-}
-
-#pragma mark Text actions
-
-- (NSArray *)_defaultMenuItemsForDataDetectedText
-{
-    DDActionContext *actionContext = _hitTestResultData.detectedDataActionContext.get();
-    if (!actionContext)
-        return @[ ];
-
-    actionContext.altMode = YES;
-    if ([[getDDActionsManagerClass() sharedManager] respondsToSelector:@selector(hasActionsForResult:actionContext:)]) {
-        if (![[getDDActionsManagerClass() sharedManager] hasActionsForResult:actionContext.mainResult actionContext:actionContext])
-            return @[ ];
-    }
-
-    // Ref our WebPageProxy for use in the blocks below.
-    RefPtr&lt;WebPageProxy&gt; page = _page;
-    PageOverlay::PageOverlayID overlayID = _hitTestResultData.detectedDataOriginatingPageOverlay;
-    _currentActionContext = [actionContext contextForView:_wkView altMode:YES interactionStartedHandler:^() {
-        page-&gt;send(Messages::WebPage::DataDetectorsDidPresentUI(overlayID));
-    } interactionChangedHandler:^() {
-        if (_hitTestResultData.detectedDataTextIndicator)
-            page-&gt;setTextIndicator(_hitTestResultData.detectedDataTextIndicator-&gt;data());
-        page-&gt;send(Messages::WebPage::DataDetectorsDidChangeUI(overlayID));
-    } interactionStoppedHandler:^() {
-        page-&gt;send(Messages::WebPage::DataDetectorsDidHideUI(overlayID));
-        page-&gt;clearTextIndicator();
-    }];
-
-    [_currentActionContext setHighlightFrame:[_wkView.window convertRectToScreen:[_wkView convertRect:_hitTestResultData.detectedDataBoundingBox toView:nil]]];
-
-    NSArray *menuItems = [[getDDActionsManagerClass() sharedManager] menuItemsForResult:[_currentActionContext mainResult] actionContext:_currentActionContext.get()];
-    return menuItems;
-}
-
-- (NSArray *)_defaultMenuItemsForText
-{
-    RetainPtr&lt;NSMenuItem&gt; copyTextItem = [self _createActionMenuItemForTag:kWKContextActionItemTagCopyText];
-    RetainPtr&lt;NSMenuItem&gt; pasteItem = [self _createActionMenuItemForTag:kWKContextActionItemTagPaste];
-    [pasteItem setEnabled:NO];
-
-    return @[ copyTextItem.get(), [NSMenuItem separatorItem], pasteItem.get() ];
-}
-
-- (NSArray *)_defaultMenuItemsForEditableText
-{
-    RetainPtr&lt;NSMenuItem&gt; copyTextItem = [self _createActionMenuItemForTag:kWKContextActionItemTagCopyText];
-    RetainPtr&lt;NSMenuItem&gt; pasteItem = [self _createActionMenuItemForTag:kWKContextActionItemTagPaste];
-
-    return @[ copyTextItem.get(), [NSMenuItem separatorItem], pasteItem.get() ];
-}
-
-- (NSArray *)_defaultMenuItemsForEditableTextWithSuggestions
-{
-    if (_hitTestResultData.lookupText.isEmpty())
-        return @[ ];
-
-    Vector&lt;TextCheckingResult&gt; results;
-    _page-&gt;checkTextOfParagraph(_hitTestResultData.lookupText, NSTextCheckingTypeSpelling, results);
-    if (results.isEmpty())
-        return @[ ];
-
-    Vector&lt;String&gt; guesses;
-    _page-&gt;getGuessesForWord(_hitTestResultData.lookupText, String(), guesses);
-    if (guesses.isEmpty())
-        return @[ ];
-
-    RetainPtr&lt;NSMenu&gt; spellingSubMenu = adoptNS([[NSMenu alloc] init]);
-    for (const auto&amp; guess : guesses) {
-        RetainPtr&lt;NSMenuItem&gt; item = adoptNS([[NSMenuItem alloc] initWithTitle:guess action:@selector(_changeSelectionToSuggestion:) keyEquivalent:@&quot;&quot;]);
-        [item setRepresentedObject:guess];
-        [item setTarget:self];
-        [spellingSubMenu addItem:item.get()];
-    }
-
-    RetainPtr&lt;NSMenuItem&gt; copyTextItem = [self _createActionMenuItemForTag:kWKContextActionItemTagCopyText];
-    RetainPtr&lt;NSMenuItem&gt; pasteItem = [self _createActionMenuItemForTag:kWKContextActionItemTagPaste];
-    RetainPtr&lt;NSMenuItem&gt; textSuggestionsItem = [self _createActionMenuItemForTag:kWKContextActionItemTagTextSuggestions];
-
-    [textSuggestionsItem setSubmenu:spellingSubMenu.get()];
-
-    return @[ copyTextItem.get(), [NSMenuItem separatorItem], pasteItem.get(), textSuggestionsItem.get() ];
-}
-
-- (void)_copySelection:(id)sender
-{
-    _page-&gt;executeEditCommand(&quot;copy&quot;);
-}
-
-- (void)_paste:(id)sender
-{
-    _page-&gt;executeEditCommand(&quot;paste&quot;);
-}
-
-- (void)_changeSelectionToSuggestion:(id)sender
-{
-    NSString *selectedCorrection = [sender representedObject];
-    if (!selectedCorrection)
-        return;
-
-    ASSERT([selectedCorrection isKindOfClass:[NSString class]]);
-
-    _page-&gt;changeSpellingToWord(selectedCorrection);
-}
-
-#pragma mark Whitespace actions
-
-- (NSArray *)_defaultMenuItemsForWhitespaceInEditableArea
-{
-    RetainPtr&lt;NSMenuItem&gt; copyTextItem = [self _createActionMenuItemForTag:kWKContextActionItemTagCopyText];
-    RetainPtr&lt;NSMenuItem&gt; pasteItem = [self _createActionMenuItemForTag:kWKContextActionItemTagPaste];
-    [copyTextItem setEnabled:NO];
-
-    return @[ copyTextItem.get(), [NSMenuItem separatorItem], pasteItem.get() ];
-}
-
-#pragma mark mailto: and tel: Link actions
-
-- (NSArray *)_defaultMenuItemsForDataDetectableLink
-{
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult = [self _webHitTestResult];
-    RetainPtr&lt;DDActionContext&gt; actionContext = adoptNS([allocDDActionContextInstance() init]);
-
-    // FIXME: Should this show a yellow highlight?
-    _currentActionContext = [actionContext contextForView:_wkView altMode:YES interactionStartedHandler:^() {
-    } interactionChangedHandler:^() {
-    } interactionStoppedHandler:^() {
-    }];
-
-    [_currentActionContext setHighlightFrame:[_wkView.window convertRectToScreen:[_wkView convertRect:_hitTestResultData.detectedDataBoundingBox toView:nil]]];
-
-    return [[getDDActionsManagerClass() sharedManager] menuItemsForTargetURL:hitTestResult-&gt;absoluteLinkURL() actionContext:_currentActionContext.get()];
-}
-
-#pragma mark NSMenuDelegate implementation
-
-- (void)menuNeedsUpdate:(NSMenu *)menu
-{
-    if (menu != _wkView._actionMenu)
-        return;
-
-    ASSERT(_state != ActionMenuState::None);
-
-    // FIXME: We need to be able to cancel this if the menu goes away.
-    // FIXME: Connection can be null if the process is closed; we should clean up better in that case.
-    if (_state == ActionMenuState::Pending) {
-        if (auto* connection = _page-&gt;process().connection()) {
-            bool receivedReply = connection-&gt;waitForAndDispatchImmediately&lt;Messages::WebPageProxy::DidPerformActionMenuHitTest&gt;(_page-&gt;pageID(), std::chrono::milliseconds(500));
-            if (!receivedReply)
-                _state = ActionMenuState::TimedOut;
-        }
-    }
-
-    if (_state != ActionMenuState::Ready)
-        [self _updateActionMenuItems];
-
-    if (_currentActionContext) {
-        _hasActivatedActionContext = YES;
-        if (![getDDActionsManagerClass() shouldUseActionsWithContext:_currentActionContext.get()]) {
-            [menu cancelTracking];
-            [menu removeAllItems];
-        }
-    }
-}
-
-#pragma mark NSSharingServicePickerDelegate implementation
-
-- (NSArray *)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker sharingServicesForItems:(NSArray *)items mask:(NSSharingServiceMask)mask proposedSharingServices:(NSArray *)proposedServices
-{
-    RetainPtr&lt;NSMutableArray&gt; services = adoptNS([[NSMutableArray alloc] initWithCapacity:proposedServices.count]);
-
-    for (NSSharingService *service in proposedServices) {
-        if ([service.name isEqualToString:NSSharingServiceNameAddToIPhoto])
-            continue;
-        [services addObject:service];
-    }
-
-    return services.autorelease();
-}
-
-- (id &lt;NSSharingServiceDelegate&gt;)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker delegateForSharingService:(NSSharingService *)sharingService
-{
-    return self;
-}
-
-#pragma mark NSSharingServiceDelegate implementation
-
-- (NSWindow *)sharingService:(NSSharingService *)sharingService sourceWindowForShareItems:(NSArray *)items sharingContentScope:(NSSharingContentScope *)sharingContentScope
-{
-    return _wkView.window;
-}
-
-#pragma mark Menu Items
-
-- (RetainPtr&lt;NSMenuItem&gt;)_createActionMenuItemForTag:(uint32_t)tag
-{
-    SEL selector = nullptr;
-    NSString *title = nil;
-    NSImage *image = nil;
-    bool enabled = true;
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult = [self _webHitTestResult];
-
-    switch (tag) {
-    case kWKContextActionItemTagOpenLinkInDefaultBrowser:
-        selector = @selector(_openURLFromActionMenu:);
-        title = WEB_UI_STRING_KEY(&quot;Open&quot;, &quot;Open (action menu item)&quot;, &quot;action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuOpenInNewWindow&quot;];
-        break;
-
-    case kWKContextActionItemTagPreviewLink:
-        ASSERT_NOT_REACHED();
-        break;
-
-    case kWKContextActionItemTagAddLinkToSafariReadingList:
-        selector = @selector(_addToReadingListFromActionMenu:);
-        title = WEB_UI_STRING_KEY(&quot;Add to Reading List&quot;, &quot;Add to Reading List (action menu item)&quot;, &quot;action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuAddToReadingList&quot;];
-        break;
-
-    case kWKContextActionItemTagCopyImage:
-        selector = @selector(_copyImage:);
-        title = WEB_UI_STRING_KEY(&quot;Copy&quot;, &quot;Copy (image action menu item)&quot;, &quot;image action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuCopy&quot;];
-        break;
-
-    case kWKContextActionItemTagAddImageToPhotos:
-        selector = @selector(_addImageToPhotos:);
-        title = WEB_UI_STRING_KEY(&quot;Add to Photos&quot;, &quot;Add to Photos (action menu item)&quot;, &quot;action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuAddToPhotos&quot;];
-        break;
-
-    case kWKContextActionItemTagSaveImageToDownloads:
-        selector = @selector(_saveImageToDownloads:);
-        title = WEB_UI_STRING_KEY(&quot;Save to Downloads&quot;, &quot;Save to Downloads (image action menu item)&quot;, &quot;image action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuSaveToDownloads&quot;];
-        enabled = !WebCore::protocolIs(hitTestResult-&gt;absoluteImageURL(), &quot;file&quot;);
-        break;
-
-    case kWKContextActionItemTagCopyText:
-        selector = @selector(_copySelection:);
-        title = WEB_UI_STRING_KEY(&quot;Copy&quot;, &quot;Copy (text action menu item)&quot;, &quot;text action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuCopy&quot;];
-        enabled = hitTestResult-&gt;allowsCopy();
-        break;
-
-    case kWKContextActionItemTagPaste:
-        selector = @selector(_paste:);
-        title = WEB_UI_STRING_KEY(&quot;Paste&quot;, &quot;Paste (action menu item)&quot;, &quot;action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuPaste&quot;];
-        break;
-
-    case kWKContextActionItemTagTextSuggestions:
-        title = WEB_UI_STRING_KEY(&quot;Suggestions&quot;, &quot;Suggestions (action menu item)&quot;, &quot;action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuSpelling&quot;];
-        break;
-
-    case kWKContextActionItemTagCopyVideoURL:
-        selector = @selector(_copyVideoURL:);
-        title = WEB_UI_STRING_KEY(&quot;Copy&quot;, &quot;Copy (video action menu item)&quot;, &quot;video action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuCopy&quot;];
-        break;
-
-    case kWKContextActionItemTagSaveVideoToDownloads:
-        selector = @selector(_saveVideoToDownloads:);
-        title = WEB_UI_STRING_KEY(&quot;Save to Downloads&quot;, &quot;Save to Downloads (video action menu item)&quot;, &quot;video action menu item&quot;);
-        image = [NSImage imageNamed:@&quot;NSActionMenuSaveToDownloads&quot;];
-        enabled = !WebCore::protocolIs(hitTestResult-&gt;absoluteMediaURL(), &quot;file&quot;) &amp;&amp; hitTestResult-&gt;isDownloadableMedia();
-        break;
-
-    default:
-        ASSERT_NOT_REACHED();
-        return nil;
-    }
-
-    RetainPtr&lt;NSMenuItem&gt; item = adoptNS([[NSMenuItem alloc] initWithTitle:title action:selector keyEquivalent:@&quot;&quot;]);
-    [item setImage:image];
-    [item setTarget:self];
-    [item setTag:tag];
-    [item setEnabled:enabled];
-    return item;
-}
-
-- (RetainPtr&lt;NSMenuItem&gt;)_createShareActionMenuItemForTag:(uint32_t)tag withItems:(NSArray *)items
-{
-    RetainPtr&lt;NSMenuItem&gt; shareItem = [NSMenuItem standardShareMenuItemWithItems:items];
-    [shareItem setTag:tag];
-
-    NSSharingServicePicker *sharingServicePicker = [shareItem representedObject];
-    sharingServicePicker.delegate = self;
-
-    return shareItem;
-}
-
-- (PassRefPtr&lt;WebHitTestResult&gt;)_webHitTestResult
-{
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult;
-    if (_state == ActionMenuState::Ready)
-        hitTestResult = WebHitTestResult::create(_hitTestResultData);
-    else
-        hitTestResult = _page-&gt;lastMouseMoveHitTestResult();
-
-    return hitTestResult.release();
-}
-
-- (NSArray *)_defaultMenuItems
-{
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult = [self _webHitTestResult];
-    if (!hitTestResult) {
-        _type = kWKActionMenuNone;
-        return _state == ActionMenuState::Pending ? @[ [NSMenuItem separatorItem] ] : @[ ];
-    }
-
-    String absoluteLinkURL = hitTestResult-&gt;absoluteLinkURL();
-    if (!absoluteLinkURL.isEmpty()) {
-        if (WebCore::protocolIsInHTTPFamily(absoluteLinkURL)) {
-            _type = kWKActionMenuLink;
-            return [self _defaultMenuItemsForLink];
-        }
-
-        if (protocolIs(absoluteLinkURL, &quot;mailto&quot;)) {
-            _type = kWKActionMenuMailtoLink;
-            return [self _defaultMenuItemsForDataDetectableLink];
-        }
-
-        if (protocolIs(absoluteLinkURL, &quot;tel&quot;)) {
-            _type = kWKActionMenuTelLink;
-            return [self _defaultMenuItemsForDataDetectableLink];
-        }
-    }
-
-    if (!hitTestResult-&gt;absoluteMediaURL().isEmpty()) {
-        _type = kWKActionMenuVideo;
-        return [self _defaultMenuItemsForVideo];
-    }
-
-    if (!hitTestResult-&gt;absoluteImageURL().isEmpty() &amp;&amp; _hitTestResultData.imageSharedMemory &amp;&amp; !_hitTestResultData.imageExtension.isEmpty()) {
-        _type = kWKActionMenuImage;
-        return [self _defaultMenuItemsForImage];
-    }
-
-    if (hitTestResult-&gt;isTextNode() || hitTestResult-&gt;isOverTextInsideFormControlElement()) {
-        NSArray *dataDetectorMenuItems = [self _defaultMenuItemsForDataDetectedText];
-        if (_currentActionContext) {
-            // If this is a data detected item with no menu items, we should not fall back to regular text options.
-            if (!dataDetectorMenuItems.count) {
-                _type = kWKActionMenuNone;
-                return @[ ];
-            }
-            _type = kWKActionMenuDataDetectedItem;
-            return dataDetectorMenuItems;
-        }
-
-        if (hitTestResult-&gt;isContentEditable()) {
-            NSArray *editableTextWithSuggestions = [self _defaultMenuItemsForEditableTextWithSuggestions];
-            if (editableTextWithSuggestions.count) {
-                _type = kWKActionMenuEditableTextWithSuggestions;
-                return editableTextWithSuggestions;
-            }
-
-            _type = kWKActionMenuEditableText;
-            return [self _defaultMenuItemsForEditableText];
-        }
-
-        _type = kWKActionMenuReadOnlyText;
-        return [self _defaultMenuItemsForText];
-    }
-
-    if (hitTestResult-&gt;isContentEditable()) {
-        _type = kWKActionMenuWhitespaceInEditableArea;
-        return [self _defaultMenuItemsForWhitespaceInEditableArea];
-    }
-
-    if (hitTestResult-&gt;isSelected()) {
-        // A selection should present the read-only text menu. It might make more sense to present a new
-        // type of menu with just copy, but for the time being, we should stay consistent with text.
-        _type = kWKActionMenuReadOnlyText;
-        return [self _defaultMenuItemsForText];
-    }
-
-    _type = kWKActionMenuNone;
-    return _state == ActionMenuState::Pending ? @[ [NSMenuItem separatorItem] ] : @[ ];
-}
-
-- (void)_updateActionMenuItems
-{
-    [_wkView._actionMenu removeAllItems];
-
-    NSArray *menuItems = [self _defaultMenuItems];
-    RefPtr&lt;WebHitTestResult&gt; hitTestResult = [self _webHitTestResult];
-
-    if ([_wkView respondsToSelector:@selector(_actionMenuItemsForHitTestResult:defaultActionMenuItems:)])
-        menuItems = [_wkView _actionMenuItemsForHitTestResult:toAPI(hitTestResult.get()) defaultActionMenuItems:menuItems];
-    else
-        menuItems = [_wkView _actionMenuItemsForHitTestResult:toAPI(hitTestResult.get()) withType:_type defaultActionMenuItems:menuItems userData:toAPI(_userData.get())];
-
-    for (NSMenuItem *item in menuItems)
-        [_wkView._actionMenu addItem:item];
-
-    if (!_wkView._actionMenu.numberOfItems)
-        [_wkView._actionMenu cancelTracking];
-}
-
-@end
-
-#endif // PLATFORM(MAC)
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWKImmediateActionControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (instancetype)initWithPage:(WebKit::WebPageProxy&amp;)page view:(WKView *)wkView recognizer:(NSImmediateActionGestureRecognizer *)immediateActionRecognizer;
</span><span class="cx"> - (void)willDestroyView:(WKView *)view;
</span><del>-- (void)didPerformActionMenuHitTest:(const WebKit::WebHitTestResult::Data&amp;)hitTestResult contentPreventsDefault:(BOOL)contentPreventsDefault userData:(API::Object*)userData;
</del><ins>+- (void)didPerformImmediateActionHitTest:(const WebKit::WebHitTestResult::Data&amp;)hitTestResult contentPreventsDefault:(BOOL)contentPreventsDefault userData:(API::Object*)userData;
</ins><span class="cx"> - (void)dismissContentRelativeChildWindows;
</span><span class="cx"> - (BOOL)hasActiveImmediateAction;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWKImmediateActionControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/UIProcess/mac/WKImmediateActionController.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">     _hasActiveImmediateAction = NO;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)didPerformActionMenuHitTest:(const WebHitTestResult::Data&amp;)hitTestResult contentPreventsDefault:(BOOL)contentPreventsDefault userData:(API::Object*)userData
</del><ins>+- (void)didPerformImmediateActionHitTest:(const WebHitTestResult::Data&amp;)hitTestResult contentPreventsDefault:(BOOL)contentPreventsDefault userData:(API::Object*)userData
</ins><span class="cx"> {
</span><span class="cx">     // If we've already given up on this gesture (either because it was canceled or the
</span><span class="cx">     // willBeginAnimation timeout expired), we shouldn't build a new animationController for it.
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx"> 
</span><span class="cx">     _page-&gt;setMaintainsInactiveSelection(true);
</span><span class="cx"> 
</span><del>-    _page-&gt;performActionMenuHitTestAtLocation([immediateActionRecognizer locationInView:immediateActionRecognizer.view], true);
</del><ins>+    _page-&gt;performImmediateActionHitTestAtLocation([immediateActionRecognizer locationInView:immediateActionRecognizer.view]);
</ins><span class="cx"> 
</span><span class="cx">     _state = ImmediateActionState::Pending;
</span><span class="cx">     immediateActionRecognizer.animationController = nil;
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx">     // FIXME: Connection can be null if the process is closed; we should clean up better in that case.
</span><span class="cx">     if (_state == ImmediateActionState::Pending) {
</span><span class="cx">         if (auto* connection = _page-&gt;process().connection()) {
</span><del>-            bool receivedReply = connection-&gt;waitForAndDispatchImmediately&lt;Messages::WebPageProxy::DidPerformActionMenuHitTest&gt;(_page-&gt;pageID(), std::chrono::milliseconds(500));
</del><ins>+            bool receivedReply = connection-&gt;waitForAndDispatchImmediately&lt;Messages::WebPageProxy::DidPerformImmediateActionHitTest&gt;(_page-&gt;pageID(), std::chrono::milliseconds(500));
</ins><span class="cx">             if (!receivedReply)
</span><span class="cx">                 _state = ImmediateActionState::TimedOut;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -584,8 +584,6 @@
</span><span class="cx">                 29CD55AB128E294F00133C85 /* WKAccessibilityWebPageObjectBase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObjectBase.mm */; };
</span><span class="cx">                 29D55DF1161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29D55DEF161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp */; };
</span><span class="cx">                 29D55DF2161BF9F10031A2E3 /* WebPageGroupProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */; };
</span><del>-                2D0730A219F9C7DA00E9D9C4 /* WKActionMenuController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D0730A019F9C7DA00E9D9C4 /* WKActionMenuController.mm */; };
-                2D0730A319F9C7DA00E9D9C4 /* WKActionMenuController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D0730A119F9C7DA00E9D9C4 /* WKActionMenuController.h */; };
</del><span class="cx">                 2D125C5E1857EA05003BA3CB /* ViewGestureController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D125C5C1857EA05003BA3CB /* ViewGestureController.h */; };
</span><span class="cx">                 2D125C5F1857EA05003BA3CB /* ViewGestureControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D125C5D1857EA05003BA3CB /* ViewGestureControllerMac.mm */; };
</span><span class="cx">                 2D1B5D5D185869C8006C6596 /* ViewGestureControllerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D1B5D5B185869C8006C6596 /* ViewGestureControllerMessageReceiver.cpp */; };
</span><span class="lines">@@ -2750,8 +2748,6 @@
</span><span class="cx">                 29D55DEE161BF8780031A2E3 /* WebPageGroupProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebPageGroupProxy.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 29D55DEF161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPageGroupProxyMessageReceiver.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPageGroupProxyMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                2D0730A019F9C7DA00E9D9C4 /* WKActionMenuController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKActionMenuController.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
-                2D0730A119F9C7DA00E9D9C4 /* WKActionMenuController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKActionMenuController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 2D125C5C1857EA05003BA3CB /* ViewGestureController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewGestureController.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D125C5D1857EA05003BA3CB /* ViewGestureControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ViewGestureControllerMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D1B5D5A18586599006C6596 /* ViewGestureController.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = ViewGestureController.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -7089,8 +7085,6 @@
</span><span class="cx">                                 51D130571382F10500351EDD /* WebProcessProxyMac.mm */,
</span><span class="cx">                                 868160CD18763D4B0021E79D /* WindowServerConnection.h */,
</span><span class="cx">                                 868160CF187645370021E79D /* WindowServerConnection.mm */,
</span><del>-                                2D0730A119F9C7DA00E9D9C4 /* WKActionMenuController.h */,
-                                2D0730A019F9C7DA00E9D9C4 /* WKActionMenuController.mm */,
</del><span class="cx">                                 E1AEA22D14687BDB00804569 /* WKFullKeyboardAccessWatcher.h */,
</span><span class="cx">                                 E1AEA22E14687BDB00804569 /* WKFullKeyboardAccessWatcher.mm */,
</span><span class="cx">                                 CDCA85C7132ABA4E00E961DF /* WKFullScreenWindowController.h */,
</span><span class="lines">@@ -8187,7 +8181,6 @@
</span><span class="cx">                                 3F889D15188778C900FEADAF /* WebVideoFullscreenManagerProxy.h in Headers */,
</span><span class="cx">                                 29CD55AA128E294F00133C85 /* WKAccessibilityWebPageObjectBase.h in Headers */,
</span><span class="cx">                                 29232DF418B29D6800D0596F /* WKAccessibilityWebPageObjectMac.h in Headers */,
</span><del>-                                2D0730A319F9C7DA00E9D9C4 /* WKActionMenuController.h in Headers */,
</del><span class="cx">                                 934B724419F5B9BE00AE96D6 /* WKActionMenuItemTypes.h in Headers */,
</span><span class="cx">                                 939F401C19FB0BBC002B2B42 /* WKActionMenuTypes.h in Headers */,
</span><span class="cx">                                 0FCB4E4818BBE044000FCFC9 /* WKActionSheet.h in Headers */,
</span><span class="lines">@@ -10011,7 +10004,6 @@
</span><span class="cx">                                 29CD55AB128E294F00133C85 /* WKAccessibilityWebPageObjectBase.mm in Sources */,
</span><span class="cx">                                 29232DF818B2A9AE00D0596F /* WKAccessibilityWebPageObjectIOS.mm in Sources */,
</span><span class="cx">                                 29232DF918B2AB3A00D0596F /* WKAccessibilityWebPageObjectMac.mm in Sources */,
</span><del>-                                2D0730A219F9C7DA00E9D9C4 /* WKActionMenuController.mm in Sources */,
</del><span class="cx">                                 0FCB4E4918BBE044000FCFC9 /* WKActionSheet.mm in Sources */,
</span><span class="cx">                                 0FCB4E4B18BBE044000FCFC9 /* WKActionSheetAssistant.mm in Sources */,
</span><span class="cx">                                 C5FA1ED418E1062200B3F402 /* WKAirPlayRoutePicker.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIAPIInjectedBundlePageContextMenuClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     virtual ~PageContextMenuClient() { }
</span><span class="cx"> 
</span><span class="cx">     virtual bool getCustomMenuFromDefaultItems(WebKit::WebPage&amp;, const WebCore::HitTestResult&amp;, const Vector&lt;WebCore::ContextMenuItem&gt;&amp; /* defaultMenu */, Vector&lt;WebKit::WebContextMenuItemData&gt;&amp; /* newMenu */, RefPtr&lt;API::Object&gt;&amp; /* userData */) { return false; }
</span><del>-    virtual void prepareForActionMenu(WebKit::WebPage&amp;, const WebCore::HitTestResult&amp;, RefPtr&lt;API::Object&gt;&amp; /* userData */) { }
</del><ins>+    virtual void prepareForImmediateAction(WebKit::WebPage&amp;, const WebCore::HitTestResult&amp;, RefPtr&lt;API::Object&gt;&amp; /* userData */) { }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace InjectedBundle
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageContextMenuClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -46,6 +46,8 @@
</span><span class="cx">     WKBundlePageContextMenuClientBase                                   base;
</span><span class="cx"> 
</span><span class="cx">     WKBundlePageGetContextMenuFromDefaultContextMenuCallback            getContextMenuFromDefaultMenu;
</span><ins>+
+    // This is actually about immediate actions; we should consider deprecating and renaming.
</ins><span class="cx">     WKBundlePagePrepareForActionMenuCallback                            prepareForActionMenu;
</span><span class="cx"> } WKBundlePageContextMenuClientV1;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageOverlaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> namespace API {
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct ClientTraits&lt;WKBundlePageOverlayClientBase&gt; {
</span><del>-    typedef std::tuple&lt;WKBundlePageOverlayClientV0, WKBundlePageOverlayClientV1, WKBundlePageOverlayClientV2&gt; Versions;
</del><ins>+    typedef std::tuple&lt;WKBundlePageOverlayClientV0, WKBundlePageOverlayClientV1&gt; Versions;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; struct ClientTraits&lt;WKBundlePageOverlayAccessibilityClientBase&gt; {
</span><span class="lines">@@ -135,11 +135,11 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    virtual DDActionContext *actionContextForResultAtPoint(WebPageOverlay&amp; pageOverlay, WebCore::FloatPoint location, RefPtr&lt;WebCore::Range&gt;&amp; rangeHandle, bool forImmediateAction) override
</del><ins>+    virtual DDActionContext *actionContextForResultAtPoint(WebPageOverlay&amp; pageOverlay, WebCore::FloatPoint location, RefPtr&lt;WebCore::Range&gt;&amp; rangeHandle) override
</ins><span class="cx">     {
</span><span class="cx">         if (m_client.actionContextForResultAtPoint) {
</span><span class="cx">             WKBundleRangeHandleRef apiRange = nullptr;
</span><del>-            DDActionContext *actionContext = (DDActionContext *)m_client.actionContextForResultAtPoint(toAPI(&amp;pageOverlay), WKPointMake(location.x(), location.y()), &amp;apiRange, forImmediateAction ? kWKBundlePageOverlayActionContextForImmediateActionRequestType : kWKBundlePageOverlayActionContextForActionMenuRequestType, m_client.base.clientInfo);
</del><ins>+            DDActionContext *actionContext = (DDActionContext *)m_client.actionContextForResultAtPoint(toAPI(&amp;pageOverlay), WKPointMake(location.x(), location.y()), &amp;apiRange, m_client.base.clientInfo);
</ins><span class="cx"> 
</span><span class="cx">             if (apiRange)
</span><span class="cx">                 rangeHandle = toImpl(apiRange)-&gt;coreRange();
</span><span class="lines">@@ -147,16 +147,6 @@
</span><span class="cx">             return actionContext;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (m_client.actionContextForResultAtPoint_deprecatedForUseWithV1) {
-            WKBundleRangeHandleRef apiRange = nullptr;
-            DDActionContext *actionContext = (DDActionContext *)m_client.actionContextForResultAtPoint_deprecatedForUseWithV1(toAPI(&amp;pageOverlay), WKPointMake(location.x(), location.y()), &amp;apiRange, m_client.base.clientInfo);
-
-            if (apiRange)
-                rangeHandle = toImpl(apiRange)-&gt;coreRange();
-
-            return actionContext;
-        }
-
</del><span class="cx">         return nil;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageOverlayh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -40,12 +40,6 @@
</span><span class="cx"> extern &quot;C&quot; {
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-enum {
-    kWKBundlePageOverlayActionContextForActionMenuRequestType = 0,
-    kWKBundlePageOverlayActionContextForImmediateActionRequestType,
-};
-typedef uint32_t _WKBundlePageOverlayActionContextRequestType;
-
</del><span class="cx"> // Page overlay client.
</span><span class="cx"> typedef void (*WKBundlePageOverlayWillMoveToPageCallback)(WKBundlePageOverlayRef pageOverlay, WKBundlePageRef page, const void* clientInfo);
</span><span class="cx"> typedef void (*WKBundlePageOverlayDidMoveToPageCallback)(WKBundlePageOverlayRef pageOverlay, WKBundlePageRef page, const void* clientInfo);
</span><span class="lines">@@ -55,8 +49,7 @@
</span><span class="cx"> typedef bool (*WKBundlePageOverlayMouseMovedCallback)(WKBundlePageOverlayRef pageOverlay, WKPoint position, const void* clientInfo);
</span><span class="cx"> typedef bool (*WKBundlePageOverlayMouseDraggedCallback)(WKBundlePageOverlayRef pageOverlay, WKPoint position, WKEventMouseButton mouseButton, const void* clientInfo);
</span><span class="cx"> 
</span><del>-typedef void* (*WKBundlePageOverlayActionContextForResultAtPointCallback_deprecatedForUseWithV1)(WKBundlePageOverlayRef pageOverlay, WKPoint position, WKBundleRangeHandleRef* rangeHandle, const void* clientInfo);
-typedef void* (*WKBundlePageOverlayActionContextForResultAtPointCallback)(WKBundlePageOverlayRef pageOverlay, WKPoint position, WKBundleRangeHandleRef* rangeHandle, _WKBundlePageOverlayActionContextRequestType requestType, const void* clientInfo);
</del><ins>+typedef void* (*WKBundlePageOverlayActionContextForResultAtPointCallback)(WKBundlePageOverlayRef pageOverlay, WKPoint position, WKBundleRangeHandleRef* rangeHandle, const void* clientInfo);
</ins><span class="cx"> typedef void (*WKBundlePageOverlayDataDetectorsDidPresentUI)(WKBundlePageOverlayRef pageOverlay, const void* clientInfo);
</span><span class="cx"> typedef void (*WKBundlePageOverlayDataDetectorsDidChangeUI)(WKBundlePageOverlayRef pageOverlay, const void* clientInfo);
</span><span class="cx"> typedef void (*WKBundlePageOverlayDataDetectorsDidHideUI)(WKBundlePageOverlayRef pageOverlay, const void* clientInfo);
</span><span class="lines">@@ -95,25 +88,6 @@
</span><span class="cx">     WKBundlePageOverlayDataDetectorsDidHideUI                           dataDetectorsDidHideUI;
</span><span class="cx"> } WKBundlePageOverlayClientV1;
</span><span class="cx"> 
</span><del>-typedef struct WKBundlePageOverlayClientV2 {
-    WKBundlePageOverlayClientBase                                       base;
-
-    WKBundlePageOverlayWillMoveToPageCallback                           willMoveToPage;
-    WKBundlePageOverlayDidMoveToPageCallback                            didMoveToPage;
-    WKBundlePageOverlayDrawRectCallback                                 drawRect;
-    WKBundlePageOverlayMouseDownCallback                                mouseDown;
-    WKBundlePageOverlayMouseUpCallback                                  mouseUp;
-    WKBundlePageOverlayMouseMovedCallback                               mouseMoved;
-    WKBundlePageOverlayMouseDraggedCallback                             mouseDragged;
-
-    WKBundlePageOverlayActionContextForResultAtPointCallback_deprecatedForUseWithV1 actionContextForResultAtPoint_deprecatedForUseWithV1;
-    WKBundlePageOverlayDataDetectorsDidPresentUI                        dataDetectorsDidPresentUI;
-    WKBundlePageOverlayDataDetectorsDidChangeUI                         dataDetectorsDidChangeUI;
-    WKBundlePageOverlayDataDetectorsDidHideUI                           dataDetectorsDidHideUI;
-
-    WKBundlePageOverlayActionContextForResultAtPointCallback            actionContextForResultAtPoint;
-} WKBundlePageOverlayClientV2;
-
</del><span class="cx"> enum { kWKBundlePageOverlayClientCurrentVersion WK_ENUM_DEPRECATED(&quot;Use an explicit version number instead&quot;) = 0 };
</span><span class="cx"> typedef struct WKBundlePageOverlayClient {
</span><span class="cx">     int                                                                 version;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageContextMenuClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InjectedBundlePageContextMenuClient::prepareForActionMenu(WebPage&amp; page, const HitTestResult&amp; hitTestResult, RefPtr&lt;API::Object&gt;&amp; userData)
</del><ins>+void InjectedBundlePageContextMenuClient::prepareForImmediateAction(WebPage&amp; page, const HitTestResult&amp; hitTestResult, RefPtr&lt;API::Object&gt;&amp; userData)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_client.prepareForActionMenu)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundlePageContextMenuClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     bool getCustomMenuFromDefaultItems(WebPage&amp;, const WebCore::HitTestResult&amp;, const Vector&lt;WebCore::ContextMenuItem&gt;&amp; defaultMenu, Vector&lt;WebContextMenuItemData&gt;&amp; newMenu, RefPtr&lt;API::Object&gt;&amp; userData) override;
</span><del>-    void prepareForActionMenu(WebPage&amp;, const WebCore::HitTestResult&amp;, RefPtr&lt;API::Object&gt;&amp; userData) override;
</del><ins>+    void prepareForImmediateAction(WebPage&amp;, const WebCore::HitTestResult&amp;, RefPtr&lt;API::Object&gt;&amp; userData) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1102,10 +1102,8 @@
</span><span class="cx">     void reportUsedFeatures();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    void performActionMenuHitTestAtLocation(WebCore::FloatPoint, bool forImmediateAction);
</del><ins>+    void performImmediateActionHitTestAtLocation(WebCore::FloatPoint);
</ins><span class="cx">     PassRefPtr&lt;WebCore::Range&gt; lookupTextAtLocation(WebCore::FloatPoint, NSDictionary **options);
</span><del>-    void selectLastActionMenuRange();
-    void focusAndSelectLastActionMenuHitTestResult();
</del><span class="cx">     void immediateActionDidUpdate();
</span><span class="cx">     void immediateActionDidCancel();
</span><span class="cx">     void immediateActionDidComplete();
</span><span class="lines">@@ -1366,12 +1364,6 @@
</span><span class="cx">     WebCore::WebGLLoadPolicy m_systemWebGLPolicy;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC)
-    RefPtr&lt;WebCore::Range&gt; m_lastActionMenuRangeForSelection;
-    WebCore::HitTestResult m_lastActionMenuHitTestResult;
-    RefPtr&lt;WebPageOverlay&gt; m_lastActionMenuHitPageOverlay;
-#endif
-
</del><span class="cx">     bool m_mainFrameProgressCompleted;
</span><span class="cx">     bool m_shouldDispatchFakeMouseMoveEvents;
</span><span class="cx">     bool m_isEditorStateMissingPostLayoutData { false };
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -410,9 +410,7 @@
</span><span class="cx">     
</span><span class="cx">     TakeSnapshot(WebCore::IntRect snapshotRect, WebCore::IntSize bitmapSize, uint32_t options, uint64_t callbackID)
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    PerformActionMenuHitTestAtLocation(WebCore::FloatPoint location, bool forImmediateAction)
-    SelectLastActionMenuRange()
-    FocusAndSelectLastActionMenuHitTestResult()
</del><ins>+    PerformImmediateActionHitTestAtLocation(WebCore::FloatPoint location)
</ins><span class="cx">     ImmediateActionDidUpdate()
</span><span class="cx">     ImmediateActionDidCancel()
</span><span class="cx">     ImmediateActionDidComplete()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageOverlaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.cpp (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.cpp        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.cpp        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -120,9 +120,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-DDActionContext *WebPageOverlay::actionContextForResultAtPoint(FloatPoint location, RefPtr&lt;WebCore::Range&gt;&amp; rangeHandle, bool forImmediateAction)
</del><ins>+DDActionContext *WebPageOverlay::actionContextForResultAtPoint(FloatPoint location, RefPtr&lt;WebCore::Range&gt;&amp; rangeHandle)
</ins><span class="cx"> {
</span><del>-    return m_client-&gt;actionContextForResultAtPoint(*this, location, rangeHandle, forImmediateAction);
</del><ins>+    return m_client-&gt;actionContextForResultAtPoint(*this, location, rangeHandle);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageOverlay::dataDetectorsDidPresentUI()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageOverlayh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">         virtual void didScrollFrame(WebPageOverlay&amp;, WebFrame*) { }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-        virtual DDActionContext *actionContextForResultAtPoint(WebPageOverlay&amp;, WebCore::FloatPoint location, RefPtr&lt;WebCore::Range&gt;&amp; rangeHandle, bool forImmediateAction) { return nullptr; }
</del><ins>+        virtual DDActionContext *actionContextForResultAtPoint(WebPageOverlay&amp;, WebCore::FloatPoint location, RefPtr&lt;WebCore::Range&gt;&amp; rangeHandle) { return nullptr; }
</ins><span class="cx">         virtual void dataDetectorsDidPresentUI(WebPageOverlay&amp;) { }
</span><span class="cx">         virtual void dataDetectorsDidChangeUI(WebPageOverlay&amp;) { }
</span><span class="cx">         virtual void dataDetectorsDidHideUI(WebPageOverlay&amp;) { }
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     Client&amp; client() const { return *m_client; }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    DDActionContext *actionContextForResultAtPoint(WebCore::FloatPoint, RefPtr&lt;WebCore::Range&gt;&amp;, bool forImmediateAction);
</del><ins>+    DDActionContext *actionContextForResultAtPoint(WebCore::FloatPoint, RefPtr&lt;WebCore::Range&gt;&amp;);
</ins><span class="cx">     void dataDetectorsDidPresentUI();
</span><span class="cx">     void dataDetectorsDidChangeUI();
</span><span class="cx">     void dataDetectorsDidHideUI();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1062,46 +1062,41 @@
</span><span class="cx">     return String();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static TextIndicatorPresentationTransition textIndicatorTransitionForActionMenu(Range* selectionRange, Range&amp; indicatorRange, bool forImmediateAction, bool forDataDetectors)
</del><ins>+static TextIndicatorPresentationTransition textIndicatorTransitionForImmediateAction(Range* selectionRange, Range&amp; indicatorRange, bool forDataDetectors)
</ins><span class="cx"> {
</span><del>-    if (areRangesEqual(&amp;indicatorRange, selectionRange) || (forDataDetectors &amp;&amp; !forImmediateAction))
-        return forImmediateAction ? TextIndicatorPresentationTransition::Crossfade : TextIndicatorPresentationTransition::BounceAndCrossfade;
-    return forImmediateAction ? TextIndicatorPresentationTransition::FadeIn : TextIndicatorPresentationTransition::Bounce;
</del><ins>+    if (areRangesEqual(&amp;indicatorRange, selectionRange))
+        return TextIndicatorPresentationTransition::Crossfade;
+    return TextIndicatorPresentationTransition::FadeIn;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(PDFKIT_PLUGIN)
</span><del>-static TextIndicatorPresentationTransition textIndicatorTransitionForActionMenu(bool forImmediateAction, bool forDataDetectors)
</del><ins>+static TextIndicatorPresentationTransition textIndicatorTransitionForImmediateAction()
</ins><span class="cx"> {
</span><del>-    if (forDataDetectors &amp;&amp; !forImmediateAction)
-        return forImmediateAction ? TextIndicatorPresentationTransition::Crossfade : TextIndicatorPresentationTransition::BounceAndCrossfade;
-    return forImmediateAction ? TextIndicatorPresentationTransition::FadeIn : TextIndicatorPresentationTransition::Bounce;
</del><ins>+    return TextIndicatorPresentationTransition::FadeIn;
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WebPage::performActionMenuHitTestAtLocation(WebCore::FloatPoint locationInViewCoordinates, bool forImmediateAction)
</del><ins>+void WebPage::performImmediateActionHitTestAtLocation(WebCore::FloatPoint locationInViewCoordinates)
</ins><span class="cx"> {
</span><span class="cx">     layoutIfNeeded();
</span><span class="cx"> 
</span><span class="cx">     MainFrame&amp; mainFrame = corePage()-&gt;mainFrame();
</span><span class="cx">     if (!mainFrame.view() || !mainFrame.view()-&gt;renderView()) {
</span><del>-        send(Messages::WebPageProxy::DidPerformActionMenuHitTest(WebHitTestResult::Data(), forImmediateAction, false, UserData()));
</del><ins>+        send(Messages::WebPageProxy::DidPerformImmediateActionHitTest(WebHitTestResult::Data(), false, UserData()));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     IntPoint locationInContentCoordinates = mainFrame.view()-&gt;rootViewToContents(roundedIntPoint(locationInViewCoordinates));
</span><span class="cx">     HitTestResult hitTestResult = mainFrame.eventHandler().hitTestResultAtPoint(locationInContentCoordinates);
</span><span class="cx"> 
</span><del>-    bool actionMenuHitTestPreventsDefault = false;
</del><ins>+    bool immediateActionHitTestPreventsDefault = false;
</ins><span class="cx">     Element* element = hitTestResult.innerElement();
</span><span class="cx"> 
</span><del>-    if (forImmediateAction) {
-        mainFrame.eventHandler().setImmediateActionStage(ImmediateActionStage::PerformedHitTest);
-        if (element)
-            actionMenuHitTestPreventsDefault = element-&gt;dispatchMouseForceWillBegin();
-    }
</del><ins>+    mainFrame.eventHandler().setImmediateActionStage(ImmediateActionStage::PerformedHitTest);
+    if (element)
+        immediateActionHitTestPreventsDefault = element-&gt;dispatchMouseForceWillBegin();
</ins><span class="cx"> 
</span><del>-    WebHitTestResult::Data actionMenuResult(hitTestResult, !forImmediateAction);
-    actionMenuResult.hitTestLocationInViewCoordinates = locationInViewCoordinates;
</del><ins>+    WebHitTestResult::Data immediateActionResult(hitTestResult);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Range&gt; selectionRange = corePage()-&gt;focusController().focusedOrMainFrame().selection().selection().firstRange();
</span><span class="cx"> 
</span><span class="lines">@@ -1109,23 +1104,20 @@
</span><span class="cx">     Element *URLElement = hitTestResult.URLElement();
</span><span class="cx">     if (!absoluteLinkURL.isEmpty() &amp;&amp; URLElement) {
</span><span class="cx">         RefPtr&lt;Range&gt; linkRange = rangeOfContents(*URLElement);
</span><del>-        actionMenuResult.linkTextIndicator = TextIndicator::createWithRange(*linkRange, textIndicatorTransitionForActionMenu(selectionRange.get(), *linkRange, forImmediateAction, false));
</del><ins>+        immediateActionResult.linkTextIndicator = TextIndicator::createWithRange(*linkRange, textIndicatorTransitionForImmediateAction(selectionRange.get(), *linkRange, false));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     NSDictionary *options = nil;
</span><span class="cx">     RefPtr&lt;Range&gt; lookupRange = lookupTextAtLocation(locationInViewCoordinates, &amp;options);
</span><del>-    actionMenuResult.lookupText = lookupRange ? lookupRange-&gt;text() : String();
</del><ins>+    immediateActionResult.lookupText = lookupRange ? lookupRange-&gt;text() : String();
</ins><span class="cx"> 
</span><span class="cx">     if (lookupRange) {
</span><span class="cx">         if (Node* node = hitTestResult.innerNode()) {
</span><span class="cx">             if (Frame* hitTestResultFrame = node-&gt;document().frame())
</span><del>-                actionMenuResult.dictionaryPopupInfo = dictionaryPopupInfoForRange(hitTestResultFrame, *lookupRange.get(), &amp;options, textIndicatorTransitionForActionMenu(selectionRange.get(), *lookupRange, forImmediateAction, false));
</del><ins>+                immediateActionResult.dictionaryPopupInfo = dictionaryPopupInfoForRange(hitTestResultFrame, *lookupRange.get(), &amp;options, textIndicatorTransitionForImmediateAction(selectionRange.get(), *lookupRange, false));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_lastActionMenuRangeForSelection = lookupRange;
-    m_lastActionMenuHitTestResult = hitTestResult;
-
</del><span class="cx">     bool pageOverlayDidOverrideDataDetectors = false;
</span><span class="cx">     for (const auto&amp; overlay : mainFrame.pageOverlayController().pageOverlays()) {
</span><span class="cx">         WebPageOverlay* webOverlay = WebPageOverlay::fromCoreOverlay(*overlay);
</span><span class="lines">@@ -1133,12 +1125,12 @@
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         RefPtr&lt;Range&gt; mainResultRange;
</span><del>-        DDActionContext *actionContext = webOverlay-&gt;actionContextForResultAtPoint(locationInContentCoordinates, mainResultRange, forImmediateAction);
</del><ins>+        DDActionContext *actionContext = webOverlay-&gt;actionContextForResultAtPoint(locationInContentCoordinates, mainResultRange);
</ins><span class="cx">         if (!actionContext || !mainResultRange)
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         pageOverlayDidOverrideDataDetectors = true;
</span><del>-        actionMenuResult.detectedDataActionContext = actionContext;
</del><ins>+        immediateActionResult.detectedDataActionContext = actionContext;
</ins><span class="cx"> 
</span><span class="cx">         Vector&lt;FloatQuad&gt; quads;
</span><span class="cx">         mainResultRange-&gt;textQuads(quads);
</span><span class="lines">@@ -1147,10 +1139,9 @@
</span><span class="cx">         for (const auto&amp; quad : quads)
</span><span class="cx">             detectedDataBoundingBox.unite(frameView-&gt;contentsToWindow(quad.enclosingBoundingBox()));
</span><span class="cx"> 
</span><del>-        actionMenuResult.detectedDataBoundingBox = detectedDataBoundingBox;
-        actionMenuResult.detectedDataTextIndicator = TextIndicator::createWithRange(*mainResultRange, textIndicatorTransitionForActionMenu(selectionRange.get(), *mainResultRange, forImmediateAction, true));
-        actionMenuResult.detectedDataOriginatingPageOverlay = overlay-&gt;pageOverlayID();
-        m_lastActionMenuRangeForSelection = mainResultRange;
</del><ins>+        immediateActionResult.detectedDataBoundingBox = detectedDataBoundingBox;
+        immediateActionResult.detectedDataTextIndicator = TextIndicator::createWithRange(*mainResultRange, textIndicatorTransitionForImmediateAction(selectionRange.get(), *mainResultRange, true));
+        immediateActionResult.detectedDataOriginatingPageOverlay = overlay-&gt;pageOverlayID();
</ins><span class="cx"> 
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="lines">@@ -1159,11 +1150,10 @@
</span><span class="cx">     if (!pageOverlayDidOverrideDataDetectors &amp;&amp; hitTestResult.innerNode() &amp;&amp; hitTestResult.innerNode()-&gt;isTextNode()) {
</span><span class="cx">         FloatRect detectedDataBoundingBox;
</span><span class="cx">         RefPtr&lt;Range&gt; detectedDataRange;
</span><del>-        actionMenuResult.detectedDataActionContext = DataDetection::detectItemAroundHitTestResult(hitTestResult, detectedDataBoundingBox, detectedDataRange);
-        if (actionMenuResult.detectedDataActionContext &amp;&amp; detectedDataRange) {
-            actionMenuResult.detectedDataBoundingBox = detectedDataBoundingBox;
-            actionMenuResult.detectedDataTextIndicator = TextIndicator::createWithRange(*detectedDataRange, textIndicatorTransitionForActionMenu(selectionRange.get(), *detectedDataRange, forImmediateAction, true));
-            m_lastActionMenuRangeForSelection = detectedDataRange;
</del><ins>+        immediateActionResult.detectedDataActionContext = DataDetection::detectItemAroundHitTestResult(hitTestResult, detectedDataBoundingBox, detectedDataRange);
+        if (immediateActionResult.detectedDataActionContext &amp;&amp; detectedDataRange) {
+            immediateActionResult.detectedDataBoundingBox = detectedDataBoundingBox;
+            immediateActionResult.detectedDataTextIndicator = TextIndicator::createWithRange(*detectedDataRange, textIndicatorTransitionForImmediateAction(selectionRange.get(), *detectedDataRange, true));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1178,7 +1168,7 @@
</span><span class="cx">             // FIXME: We don't have API to identify images inside PDFs based on position.
</span><span class="cx">             NSDictionary *options = nil;
</span><span class="cx">             PDFSelection *selection = nil;
</span><del>-            String selectedText = pdfPugin-&gt;lookupTextAtLocation(locationInViewCoordinates, actionMenuResult, &amp;selection, &amp;options);
</del><ins>+            String selectedText = pdfPugin-&gt;lookupTextAtLocation(locationInViewCoordinates, immediateActionResult, &amp;selection, &amp;options);
</ins><span class="cx">             if (!selectedText.isEmpty()) {
</span><span class="cx">                 if (element-&gt;document().isPluginDocument()) {
</span><span class="cx">                     // FIXME(144030): Focus does not seem to get set to the PDF when invoking the menu.
</span><span class="lines">@@ -1186,21 +1176,21 @@
</span><span class="cx">                     pluginDocument.setFocusedElement(element);
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                actionMenuResult.lookupText = selectedText;
-                actionMenuResult.isTextNode = true;
-                actionMenuResult.isSelected = true;
-                actionMenuResult.allowsCopy = true;
</del><ins>+                immediateActionResult.lookupText = selectedText;
+                immediateActionResult.isTextNode = true;
+                immediateActionResult.isSelected = true;
+                immediateActionResult.allowsCopy = true;
</ins><span class="cx"> 
</span><del>-                actionMenuResult.dictionaryPopupInfo = dictionaryPopupInfoForSelectionInPDFPlugin(selection, *pdfPugin, &amp;options, textIndicatorTransitionForActionMenu(forImmediateAction, false));
</del><ins>+                immediateActionResult.dictionaryPopupInfo = dictionaryPopupInfoForSelectionInPDFPlugin(selection, *pdfPugin, &amp;options, textIndicatorTransitionForImmediateAction());
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;API::Object&gt; userData;
</span><del>-    injectedBundleContextMenuClient().prepareForActionMenu(*this, hitTestResult, userData);
</del><ins>+    injectedBundleContextMenuClient().prepareForImmediateAction(*this, hitTestResult, userData);
</ins><span class="cx"> 
</span><del>-    send(Messages::WebPageProxy::DidPerformActionMenuHitTest(actionMenuResult, forImmediateAction, actionMenuHitTestPreventsDefault, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</del><ins>+    send(Messages::WebPageProxy::DidPerformImmediateActionHitTest(immediateActionResult, immediateActionHitTestPreventsDefault, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;WebCore::Range&gt; WebPage::lookupTextAtLocation(FloatPoint locationInViewCoordinates, NSDictionary **options)
</span><span class="lines">@@ -1214,30 +1204,6 @@
</span><span class="cx">     return rangeForDictionaryLookupAtHitTestResult(result, options);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::selectLastActionMenuRange()
-{
-    if (m_lastActionMenuRangeForSelection)
-        corePage()-&gt;mainFrame().selection().setSelectedRange(m_lastActionMenuRangeForSelection.get(), DOWNSTREAM, true);
-}
-
-void WebPage::focusAndSelectLastActionMenuHitTestResult()
-{
-    if (!m_lastActionMenuHitTestResult.isContentEditable())
-        return;
-
-    Element* element = m_lastActionMenuHitTestResult.innerElement();
-    if (!element)
-        return;
-
-    Frame* frame = element-&gt;document().frame();
-    if (!frame)
-        return;
-
-    m_page-&gt;focusController().setFocusedElement(element, frame);
-    VisiblePosition position = frame-&gt;visiblePositionForPoint(m_lastActionMenuHitTestResult.roundedPointInInnerNodeFrame());
-    frame-&gt;selection().setSelection(position);
-}
-
</del><span class="cx"> void WebPage::immediateActionDidUpdate()
</span><span class="cx"> {
</span><span class="cx">     m_page-&gt;mainFrame().eventHandler().setImmediateActionStage(ImmediateActionStage::ActionUpdated);
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Tools/ChangeLog        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-05-22  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Remove action menu support
+        https://bugs.webkit.org/show_bug.cgi?id=145305
+        &lt;rdar://problem/21070771&gt;
+
+        Reviewed by Anders Carlsson.
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKit2/action-menu-target.pdf: Removed.
+        * TestWebKitAPI/Tests/WebKit2/action-menu-targets.html: Removed.
+        * TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm: Removed.
+        * TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm: Removed.
+        * TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundleSPI.h: Removed.
+        Remove the tests.
+
</ins><span class="cx"> 2015-05-22  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Removed the Use Shrink To Fit button from the toolbar’s default set.
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -29,8 +29,6 @@
</span><span class="cx">                 290F4275172A221C00939FF0 /* custom-protocol-sync-xhr.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 290F4274172A1FDE00939FF0 /* custom-protocol-sync-xhr.html */; };
</span><span class="cx">                 297234B7173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 297234B5173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp */; };
</span><span class="cx">                 2D1FE0B01AD465C1006CD9E6 /* FixedLayoutSize.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D1FE0AF1AD465C1006CD9E6 /* FixedLayoutSize.mm */; };
</span><del>-                2D950FBE1A2217D300012434 /* ActionMenusBundle.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D950FBB1A2217D000012434 /* ActionMenusBundle.mm */; };
-                2D950FC01A230C3A00012434 /* action-menu-targets.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2D950FBF1A230C1E00012434 /* action-menu-targets.html */; };
</del><span class="cx">                 2DD7D3AF178227B30026E1E3 /* lots-of-text-vertical-lr.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2DD7D3AE178227AC0026E1E3 /* lots-of-text-vertical-lr.html */; };
</span><span class="cx">                 2E7765CD16C4D80A00BA2BB1 /* mainIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E7765CC16C4D80A00BA2BB1 /* mainIOS.mm */; };
</span><span class="cx">                 2E7765CF16C4D81100BA2BB1 /* mainMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E7765CE16C4D81100BA2BB1 /* mainMac.mm */; };
</span><span class="lines">@@ -69,7 +67,6 @@
</span><span class="cx">                 7AA021BB1AB09EA70052953F /* DateMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AA021BA1AB09EA70052953F /* DateMath.cpp */; };
</span><span class="cx">                 7AA6A1521AAC0B31002B2ED3 /* WorkQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AA6A1511AAC0B31002B2ED3 /* WorkQueue.cpp */; };
</span><span class="cx">                 7AE9E5091AE5AE8B00CF874B /* test.pdf in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7AE9E5081AE5AE8B00CF874B /* test.pdf */; };
</span><del>-                7AE9E50B1AE5F97000CF874B /* action-menu-target.pdf in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7AE9E50A1AE5F91300CF874B /* action-menu-target.pdf */; };
</del><span class="cx">                 7C486BA11AA12567003F6F9B /* bundle-file.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 7C486BA01AA1254B003F6F9B /* bundle-file.html */; };
</span><span class="cx">                 7C54A4BE1AA11CCA00380F78 /* WKBundleFileHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C54A4BC1AA11CCA00380F78 /* WKBundleFileHandle.cpp */; };
</span><span class="cx">                 7C54A4C11AA11CE400380F78 /* WKBundleFileHandle_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C54A4BF1AA11CE400380F78 /* WKBundleFileHandle_Bundle.cpp */; };
</span><span class="lines">@@ -206,7 +203,6 @@
</span><span class="cx">                 7CCE7F251A411AF600447C4C /* OpenAndCloseWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = CEA6CF2219CCF5BD0064F5A7 /* OpenAndCloseWindow.mm */; };
</span><span class="cx">                 7CCE7F261A411AF600447C4C /* Preferences.mm in Sources */ = {isa = PBXBuildFile; fileRef = C95501BE19AD2FAF0049BE3E /* Preferences.mm */; };
</span><span class="cx">                 7CCE7F271A411AF600447C4C /* UserContentController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CC3E1FA197E234100BE6252 /* UserContentController.mm */; };
</span><del>-                7CCE7F281A411B1000447C4C /* ActionMenus.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D950FBA1A2217D000012434 /* ActionMenus.mm */; };
</del><span class="cx">                 7CCE7F291A411B1000447C4C /* CustomProtocolsInvalidScheme.mm in Sources */ = {isa = PBXBuildFile; fileRef = 297234B2173AD04800983601 /* CustomProtocolsInvalidScheme.mm */; };
</span><span class="cx">                 7CCE7F2A1A411B1000447C4C /* CustomProtocolsSyncXHRTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 290F4276172A232C00939FF0 /* CustomProtocolsSyncXHRTest.mm */; };
</span><span class="cx">                 7CCE7F2B1A411B1000447C4C /* CustomProtocolsTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29AB8A9F164C735800D49BEC /* CustomProtocolsTest.mm */; };
</span><span class="lines">@@ -335,13 +331,11 @@
</span><span class="cx">                         dstPath = TestWebKitAPI.resources;
</span><span class="cx">                         dstSubfolderSpec = 7;
</span><span class="cx">                         files = (
</span><del>-                                7AE9E50B1AE5F97000CF874B /* action-menu-target.pdf in Copy Resources */,
</del><span class="cx">                                 7AE9E5091AE5AE8B00CF874B /* test.pdf in Copy Resources */,
</span><span class="cx">                                 7A1458FC1AD5C07000E06772 /* mouse-button-listener.html in Copy Resources */,
</span><span class="cx">                                 7C486BA11AA12567003F6F9B /* bundle-file.html in Copy Resources */,
</span><span class="cx">                                 1A9E52C913E65EF4006917F5 /* 18-characters.html in Copy Resources */,
</span><span class="cx">                                 379028B914FAC24C007E6B43 /* acceptsFirstMouse.html in Copy Resources */,
</span><del>-                                2D950FC01A230C3A00012434 /* action-menu-targets.html in Copy Resources */,
</del><span class="cx">                                 B55F11BE15191A0600915916 /* Ahem.ttf in Copy Resources */,
</span><span class="cx">                                 1A63479F183D72A4005B1707 /* all-content-in-one-iframe.html in Copy Resources */,
</span><span class="cx">                                 F6B7BE9717469B96008A3445 /* associate-form-controls.html in Copy Resources */,
</span><span class="lines">@@ -466,12 +460,8 @@
</span><span class="cx">                 29AB8AA3164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestBrowsingContextLoadDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D1FE0AF1AD465C1006CD9E6 /* FixedLayoutSize.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FixedLayoutSize.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D640B5417875DFF00BFAF99 /* ScrollPinningBehaviors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollPinningBehaviors.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                2D950FBA1A2217D000012434 /* ActionMenus.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ActionMenus.mm; path = WebKit2ObjC/ActionMenus.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
-                2D950FBB1A2217D000012434 /* ActionMenusBundle.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ActionMenusBundle.mm; path = WebKit2ObjC/ActionMenusBundle.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
-                2D950FBF1A230C1E00012434 /* action-menu-targets.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = &quot;action-menu-targets.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 2DD7D3A9178205D00026E1E3 /* ResizeReversePaginatedWebView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResizeReversePaginatedWebView.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2DD7D3AE178227AC0026E1E3 /* lots-of-text-vertical-lr.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = &quot;lots-of-text-vertical-lr.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                2DDE58961A36342B00AA80DE /* ActionMenusBundleSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ActionMenusBundleSPI.h; path = WebKit2ObjC/ActionMenusBundleSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 2E7765CC16C4D80A00BA2BB1 /* mainIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = mainIOS.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2E7765CE16C4D81100BA2BB1 /* mainMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = mainMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreventEmptyUserAgent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -546,7 +536,6 @@
</span><span class="cx">                 7AA021BA1AB09EA70052953F /* DateMath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DateMath.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7AA6A1511AAC0B31002B2ED3 /* WorkQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7AE9E5081AE5AE8B00CF874B /* test.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = test.pdf; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                7AE9E50A1AE5F91300CF874B /* action-menu-target.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = &quot;action-menu-target.pdf&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 7C486BA01AA1254B003F6F9B /* bundle-file.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = &quot;bundle-file.html&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C54A4BC1AA11CCA00380F78 /* WKBundleFileHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundleFileHandle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 7C54A4BF1AA11CE400380F78 /* WKBundleFileHandle_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundleFileHandle_Bundle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -908,9 +897,6 @@
</span><span class="cx">                 BC3C4C6F14575B1D0025FB62 /* WebKit2 Objective-C */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                2D950FBA1A2217D000012434 /* ActionMenus.mm */,
-                                2D950FBB1A2217D000012434 /* ActionMenusBundle.mm */,
-                                2DDE58961A36342B00AA80DE /* ActionMenusBundleSPI.h */,
</del><span class="cx">                                 297234B2173AD04800983601 /* CustomProtocolsInvalidScheme.mm */,
</span><span class="cx">                                 297234B5173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp */,
</span><span class="cx">                                 290F4276172A232C00939FF0 /* CustomProtocolsSyncXHRTest.mm */,
</span><span class="lines">@@ -1098,11 +1084,9 @@
</span><span class="cx">                 BC90977B125571AE00083756 /* Resources */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                7AE9E50A1AE5F91300CF874B /* action-menu-target.pdf */,
</del><span class="cx">                                 7AE9E5081AE5AE8B00CF874B /* test.pdf */,
</span><span class="cx">                                 7A1458FB1AD5C03500E06772 /* mouse-button-listener.html */,
</span><span class="cx">                                 C045F9461385C2F800C0F3CD /* 18-characters.html */,
</span><del>-                                2D950FBF1A230C1E00012434 /* action-menu-targets.html */,
</del><span class="cx">                                 93D3D19B17B1A7B000C7C415 /* all-content-in-one-iframe.html */,
</span><span class="cx">                                 F6B7BE9617469B7E008A3445 /* associate-form-controls.html */,
</span><span class="cx">                                 76E182DE15475A8300F1FADD /* auto-submitting-form.html */,
</span><span class="lines">@@ -1411,7 +1395,6 @@
</span><span class="cx">                         files = (
</span><span class="cx">                                 7CCE7EE41A411AE600447C4C /* AboutBlankLoad.cpp in Sources */,
</span><span class="cx">                                 7CCE7EB31A411A7E00447C4C /* AcceptsFirstMouse.mm in Sources */,
</span><del>-                                7CCE7F281A411B1000447C4C /* ActionMenus.mm in Sources */,
</del><span class="cx">                                 7CCE7F301A411B8E00447C4C /* AtomicString.cpp in Sources */,
</span><span class="cx">                                 7CCE7EB41A411A7E00447C4C /* AttributedString.mm in Sources */,
</span><span class="cx">                                 7CCE7EB51A411A7E00447C4C /* BackForwardList.mm in Sources */,
</span><span class="lines">@@ -1616,7 +1599,6 @@
</span><span class="cx">                         isa = PBXSourcesBuildPhase;
</span><span class="cx">                         buildActionMask = 2147483647;
</span><span class="cx">                         files = (
</span><del>-                                2D950FBE1A2217D300012434 /* ActionMenusBundle.mm in Sources */,
</del><span class="cx">                                 BC246D9C132F1FF000B56D7C /* CanHandleRequest_Bundle.cpp in Sources */,
</span><span class="cx">                                 297234B7173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp in Sources */,
</span><span class="cx">                                 F6B7BE9517469212008A3445 /* DidAssociateFormControls_Bundle.cpp in Sources */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2actionmenutargetpdf"></a>
<div class="binary"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/action-menu-target.pdf</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2actionmenutargetshtml"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2/action-menu-targets.html (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2/action-menu-targets.html        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2/action-menu-targets.html        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,123 +0,0 @@
</span><del>-&lt;style&gt;
-div {
-    position: absolute;
-    width: 195px; height: 45px;
-    overflow: hidden;
-    border: 1px solid black;
-}
-
-embed {
-    position: absolute;
-    width: 100%; height: 100%;
-    overflow: hidden;
-    padding: 0;
-    margin: 0;
-}
-&lt;/style&gt;
-
-&lt;script&gt;
-function editableAreaString(name) {
-    if (name.indexOf(&quot;textarea&quot;) === 0 || name.indexOf(&quot;input&quot;) === 0)
-        return document.getElementById(name).value;
-    return document.getElementById(name).innerText;
-}
-
-function stringifySelection() {
-    var sel = window.getSelection();
-    if (sel.rangeCount == 0 || sel.getRangeAt(0).collapsed)
-        return &quot;&lt;no selection&gt;&quot;;
-    return sel.toString();
-}
-
-function stringifySelectionInElement(name) {
-    var el = document.getElementById(name);
-    console.log(el);
-    if (el.selectionStart == undefined)
-        return &quot;&lt;no selection&gt;&quot;;
-    return el.value.substring(el.selectionStart, el.selectionEnd);
-}
-
-var failWasCalled = false;
-
-function fail() {
-    failWasCalled = true;
-}
-
-function wasFailCalled() {
-    return failWasCalled;
-}
-
-// MSE video:
-var source;
-var request;
-var videoIsReady = false;
-
-window.onload = function () {
-    playVideo();
-}
-
-function playVideo()
-{
-    request = new XMLHttpRequest();
-    request.responseType = 'arraybuffer';
-    request.open('GET', 'test-mse.mp4', true);
-    request.addEventListener('load', load);
-    request.send();
-}
-
-function load(event)
-{
-    source = new MediaSource();
-    source.addEventListener('sourceopen', sourceOpen);
-    var video = document.getElementById('mse-video');
-    video.src = URL.createObjectURL(source);
-}
-
-function sourceOpen(event)
-{
-    var sourceBuffer = source.addSourceBuffer('video/mp4;codecs=&quot;avc1.4D4001,mp4a.40.2&quot;');
-    sourceBuffer.appendBuffer(request.response);
-    sourceBuffer.addEventListener('updateend', updateEnd);
-}
-
-function updateEnd(event)
-{
-    videoIsReady = true;
-}
-
-function isVideoReady()
-{
-    return videoIsReady;
-}
-
-&lt;/script&gt;
-
-&lt;div style=&quot;top: 0px; left: 0px;&quot;&gt;word&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 0px; left: 200px;&quot;&gt;New York&lt;/div&gt;&lt;br/&gt;
-
-&lt;div style=&quot;top: 50px; left: 0px;&quot;&gt;1 Infinite Loop, Cupertino, CA 95014&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 50px; left: 200px;&quot;&gt;May 17th, 2012&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 50px; left: 400px;&quot;&gt;(408) 996-1010&lt;/div&gt;&lt;br/&gt;
-
-&lt;div id=&quot;editable1&quot; style=&quot;top: 150px; left: 0px;&quot; contenteditable&gt;editable editable editable editable&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 150px; left: 200px;&quot;&gt;&lt;input id=&quot;input1&quot; type=&quot;text&quot; value=&quot;editable editable editable editable&quot;&gt;&lt;/input&gt;&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 150px; left: 400px;&quot;&gt;&lt;textarea id=&quot;textarea1&quot;&gt;editable editable editable editable&lt;/textarea&gt;&lt;/div&gt;&lt;br/&gt;
-
-&lt;div id=&quot;editable2&quot; style=&quot;top: 200px; left: 0px;&quot; contenteditable&gt;New York some words&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 200px; left: 200px;&quot;&gt;&lt;input id=&quot;input2&quot; type=&quot;text&quot; value=&quot;New York some words&quot;&gt;&lt;/input&gt;&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 200px; left: 400px;&quot;&gt;&lt;textarea id=&quot;textarea2&quot;&gt;New York some words&lt;/textarea&gt;&lt;/div&gt;&lt;br/&gt;
-
-&lt;div style=&quot;top: 250px; left: 0px;&quot;&gt;&lt;img src=&quot;icon.png&quot; height=&quot;100%&quot;&gt;&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 250px; left: 200px;&quot;&gt;&lt;a href=&quot;http://example.org/&quot;&gt;&lt;img src=&quot;icon.png&quot; height=&quot;100%&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br/&gt;
-
-&lt;div style=&quot;top: 250px; left: 400px; height: 350px&quot;&gt;&lt;embed src=&quot;action-menu-target.pdf&quot;&gt;&lt;/embed&gt;&lt;/div&gt;&lt;br/&gt;
-
-&lt;div style=&quot;top: 300px; left: 0px; width: 95px;&quot;&gt;&lt;a href=&quot;http://example.org/&quot;&gt;http&lt;/a&gt;&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 300px; left: 100px; width: 95px;&quot;&gt;&lt;a href=&quot;ftp://example.org/&quot;&gt;ftp&lt;/a&gt;&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 300px; left: 200px; width: 95px;&quot;&gt;&lt;a href=&quot;mailto:example@example.org&quot;&gt;mailto link&lt;/a&gt;&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 300px; left: 300px; width: 95px;&quot;&gt;&lt;a href=&quot;javascript:fail()&quot;&gt;javascript link&lt;/a&gt;&lt;/div&gt;&lt;br/&gt;
-
-&lt;div style=&quot;top: 350px; left: 0px;&quot;&gt;&lt;video src=&quot;test.mp4&quot;&gt;&lt;/video&gt;&lt;/div&gt;&lt;br/&gt;
-&lt;div style=&quot;top: 350px; left: 200px;&quot;&gt;&lt;video id=&quot;mse-video&quot;&gt;&lt;/video&gt;&lt;/div&gt;&lt;br/&gt;
-
-&lt;div style=&quot;top: 0px; left: 750px; height: 600px;&quot;&gt;data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text data detectors menu text &lt;/div&gt;&lt;br/&gt;
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2ObjCActionMenusmm"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,807 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014-2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import &quot;config.h&quot;
-
-#if PLATFORM(MAC)
-
-#import &quot;Test.h&quot;
-
-#import &quot;PlatformUtilities.h&quot;
-#import &quot;PlatformWebView.h&quot;
-#import &quot;TestBrowsingContextLoadDelegate.h&quot;
-#import &lt;JavaScriptCore/JSContextRef.h&gt;
-#import &lt;JavaScriptCore/JSRetainPtr.h&gt;
-#import &lt;WebKit/WebKit2.h&gt;
-#import &lt;WebKit/WKActionMenuItemTypes.h&gt;
-#import &lt;WebKit/WKActionMenuTypes.h&gt;
-#import &lt;WebKit/WKPreferencesPrivate.h&gt;
-#import &lt;WebKit/WKSerializedScriptValue.h&gt;
-#import &lt;WebKit/WKViewPrivate.h&gt;
-#import &lt;wtf/RetainPtr.h&gt;
-
-static bool didFinishLoad = false;
-static bool didFinishDownload = false;
-
-@interface WKView (Details)
-
-- (void)prepareForMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
-- (void)willOpenMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
-- (void)didCloseMenu:(NSMenu *)menu withEvent:(NSEvent *)event;
-
-- (NSMenu *)_actionMenu;
-- (void)copy:(id)sender;
-
-@end
-
-struct ActionMenuResult {
-    WKRetainPtr&lt;WKHitTestResultRef&gt; hitTestResult;
-    _WKActionMenuType type;
-    RetainPtr&lt;NSArray&gt; defaultMenuItems;
-    WKRetainPtr&lt;WKTypeRef&gt; userData;
-};
-
-@interface ActionMenusTestWKView : WKView {
-    ActionMenuResult _actionMenuResult;
-    RetainPtr&lt;NSArray&gt; _overrideItems;
-    BOOL _shouldHaveUserData;
-}
-
-@property (nonatomic, assign, setter=_setActionMenuResult:) ActionMenuResult _actionMenuResult;
-
-@end
-
-@implementation ActionMenusTestWKView
-
-@synthesize _actionMenuResult=_actionMenuResult;
-
-- (NSArray *)_actionMenuItemsForHitTestResult:(WKHitTestResultRef)hitTestResult withType:(_WKActionMenuType)type defaultActionMenuItems:(NSArray *)defaultMenuItems userData:(WKTypeRef)userData
-{
-    if (type != kWKActionMenuNone)
-        EXPECT_GT(defaultMenuItems.count, (NSUInteger)0);
-
-    if (!hitTestResult)
-        return defaultMenuItems;
-
-    // Clients should be able to pass userData from the Web to UI process, between
-    // the WKBundlePageContextMenuClient's prepareForActionMenu, and here.
-    // http://trac.webkit.org/changeset/175444
-    if (_shouldHaveUserData) {
-        EXPECT_NOT_NULL(userData);
-        EXPECT_EQ(WKDictionaryGetTypeID(), WKGetTypeID(userData));
-        WKRetainPtr&lt;WKStringRef&gt; hasLinkKey = adoptWK(WKStringCreateWithUTF8CString(&quot;hasLinkURL&quot;));
-        WKTypeRef hasLinkValue = WKDictionaryGetItemForKey((WKDictionaryRef)userData, hasLinkKey.get());
-        EXPECT_NOT_NULL(hasLinkValue);
-        EXPECT_EQ(WKBooleanGetTypeID(), WKGetTypeID(hasLinkValue));
-        WKRetainPtr&lt;WKURLRef&gt; absoluteLinkURL = adoptWK(WKHitTestResultCopyAbsoluteLinkURL(hitTestResult));
-        EXPECT_EQ(!!absoluteLinkURL, WKBooleanGetValue((WKBooleanRef)hasLinkValue));
-    } else
-        EXPECT_NULL(userData);
-
-    _actionMenuResult.hitTestResult = hitTestResult;
-    _actionMenuResult.type = type;
-    _actionMenuResult.defaultMenuItems = defaultMenuItems;
-    _actionMenuResult.userData = userData;
-    return _overrideItems ? _overrideItems.get() : defaultMenuItems;
-}
-
-- (void)runMenuSequenceAtPoint:(NSPoint)point preDidCloseMenuHandler:(void(^)(void))preDidCloseMenuHandler
-{
-    __block bool didFinishSequence = false;
-
-    NSMenu *actionMenu = self._actionMenu;
-    RetainPtr&lt;NSEvent&gt; event = [NSEvent mouseEventWithType:NSLeftMouseDown location:point modifierFlags:0 timestamp:0 windowNumber:self.window.windowNumber context:0 eventNumber:0 clickCount:0 pressure:0];
-
-    dispatch_async(dispatch_get_main_queue(), ^{
-        [self prepareForMenu:actionMenu withEvent:event.get()];
-    });
-
-    dispatch_async(dispatch_get_main_queue(), ^{
-        _shouldHaveUserData = YES;
-        [[actionMenu delegate] menuNeedsUpdate:actionMenu];
-        _shouldHaveUserData = NO;
-    });
-
-    dispatch_async(dispatch_get_main_queue(), ^{
-        [self willOpenMenu:actionMenu withEvent:event.get()];
-    });
-
-    void (^copiedPreDidCloseMenuHandler)() = Block_copy(preDidCloseMenuHandler);
-    dispatch_async(dispatch_get_main_queue(), ^{
-        copiedPreDidCloseMenuHandler();
-        Block_release(copiedPreDidCloseMenuHandler);
-        [self didCloseMenu:actionMenu withEvent:event.get()];
-        [self mouseDown:event.get()];
-        didFinishSequence = true;
-    });
-
-    TestWebKitAPI::Util::run(&amp;didFinishSequence);
-}
-
-- (void)_setOverrideActionMenuItems:(NSArray *)overrideItems
-{
-    _overrideItems = overrideItems;
-}
-
-@end
-
-namespace TestWebKitAPI {
-
-struct ActiveDownloadContext {
-    WKRetainPtr&lt;WKStringRef&gt; path;
-    bool shouldCheckForImage = 0;
-};
-
-static void didFinishLoadForFrameCallback(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
-{
-    didFinishLoad = true;
-}
-
-static void didFinishDownloadCallback(WKContextRef context, WKDownloadRef download, const void *clientInfo)
-{
-    WKStringRef wkActiveDownloadPath = ((ActiveDownloadContext*)clientInfo)-&gt;path.get();
-    size_t length = WKStringGetLength(wkActiveDownloadPath) + 1;
-    char *activeDownloadPath = (char *)calloc(1, length);
-    WKStringGetUTF8CString(wkActiveDownloadPath, activeDownloadPath, length);
-
-    if (((ActiveDownloadContext*)clientInfo)-&gt;shouldCheckForImage) {
-        RetainPtr&lt;NSImage&gt; image = adoptNS([[NSImage alloc] initWithContentsOfFile:[NSString stringWithUTF8String:activeDownloadPath]]);
-
-        EXPECT_EQ(215, [image size].width);
-        EXPECT_EQ(174, [image size].height);
-    }
-
-    didFinishDownload = true;
-}
-
-static void didCreateDownloadDestinationCallback(WKContextRef context, WKDownloadRef download, WKStringRef path, const void *clientInfo)
-{
-    ((ActiveDownloadContext*)clientInfo)-&gt;path = path;
-}
-
-static NSString *watchPasteboardForString()
-{
-    [[NSPasteboard generalPasteboard] clearContents];
-
-    while (true) {
-        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
-        NSString *pasteboardString = [[NSPasteboard generalPasteboard] stringForType:NSPasteboardTypeString];
-        if (pasteboardString)
-            return pasteboardString;
-    }
-}
-
-static NSImage *watchPasteboardForImage()
-{
-    [[NSPasteboard generalPasteboard] clearContents];
-
-    while (true) {
-        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
-        NSArray *pasteboardItems = [[NSPasteboard generalPasteboard] readObjectsForClasses:@[ [NSImage class] ] options:nil];
-        if (pasteboardItems &amp;&amp; pasteboardItems.count)
-            return pasteboardItems.lastObject;
-    }
-}
-
-struct JavaScriptStringCallbackContext {
-    JavaScriptStringCallbackContext()
-        : didFinish(false)
-    {
-    }
-
-    bool didFinish;
-    JSRetainPtr&lt;JSStringRef&gt; actualString;
-};
-
-struct JavaScriptBoolCallbackContext {
-    JavaScriptBoolCallbackContext()
-        : didFinish(false)
-    {
-    }
-
-    bool didFinish;
-    bool value;
-};
-
-static void javaScriptStringCallback(WKSerializedScriptValueRef resultSerializedScriptValue, WKErrorRef error, void* ctx)
-{
-    EXPECT_NOT_NULL(resultSerializedScriptValue);
-
-    JavaScriptStringCallbackContext* context = static_cast&lt;JavaScriptStringCallbackContext*&gt;(ctx);
-
-    JSGlobalContextRef scriptContext = JSGlobalContextCreate(0);
-    EXPECT_NOT_NULL(scriptContext);
-
-    JSValueRef scriptValue = WKSerializedScriptValueDeserialize(resultSerializedScriptValue, scriptContext, 0);
-    EXPECT_NOT_NULL(scriptValue);
-
-    context-&gt;actualString.adopt(JSValueToStringCopy(scriptContext, scriptValue, 0));
-    EXPECT_NOT_NULL(context-&gt;actualString.get());
-
-    context-&gt;didFinish = true;
-    
-    JSGlobalContextRelease(scriptContext);
-    
-    EXPECT_NULL(error);
-}
-
-static void javaScriptBoolCallback(WKSerializedScriptValueRef resultSerializedScriptValue, WKErrorRef error, void* ctx)
-{
-    EXPECT_NOT_NULL(resultSerializedScriptValue);
-
-    JavaScriptBoolCallbackContext* context = static_cast&lt;JavaScriptBoolCallbackContext*&gt;(ctx);
-
-    JSGlobalContextRef scriptContext = JSGlobalContextCreate(0);
-    EXPECT_NOT_NULL(scriptContext);
-
-    JSValueRef scriptValue = WKSerializedScriptValueDeserialize(resultSerializedScriptValue, scriptContext, 0);
-    EXPECT_NOT_NULL(scriptValue);
-
-    EXPECT_TRUE(JSValueIsBoolean(scriptContext, scriptValue));
-
-    context-&gt;value = JSValueToBoolean(scriptContext, scriptValue);
-    context-&gt;didFinish = true;
-    
-    JSGlobalContextRelease(scriptContext);
-    
-    EXPECT_NULL(error);
-}
-
-static std::unique_ptr&lt;char[]&gt; callJavaScriptReturningString(WKPageRef page, const char* js)
-{
-    JavaScriptStringCallbackContext context;
-    WKPageRunJavaScriptInMainFrame(page, Util::toWK(js).get(), &amp;context, javaScriptStringCallback);
-    Util::run(&amp;context.didFinish);
-
-    size_t bufferSize = JSStringGetMaximumUTF8CStringSize(context.actualString.get());
-    auto buffer = std::make_unique&lt;char[]&gt;(bufferSize);
-    JSStringGetUTF8CString(context.actualString.get(), buffer.get(), bufferSize);
-    return buffer;
-}
-
-static bool callJavaScriptReturningBool(WKPageRef page, const char* js)
-{
-    JavaScriptBoolCallbackContext context;
-    WKPageRunJavaScriptInMainFrame(page, Util::toWK(js).get(), &amp;context, javaScriptBoolCallback);
-    Util::run(&amp;context.didFinish);
-    return context.value;
-}
-
-static void watchEditableAreaForString(WKPageRef page, const char *areaName, const char *watchString)
-{
-    while (true) {
-        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
-        auto buffer = callJavaScriptReturningString(page, [[NSString stringWithFormat:@&quot;editableAreaString('%s')&quot;, areaName] UTF8String]);
-
-        if (!strcmp(buffer.get(), watchString))
-            return;
-    }
-}
-
-static void waitForVideoReady(WKPageRef page)
-{
-    while (true) {
-        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
-        if (callJavaScriptReturningBool(page, &quot;isVideoReady()&quot;))
-            return;
-    }
-}
-
-static NSString *retrieveSelection(WKPageRef page)
-{
-    auto buffer = callJavaScriptReturningString(page, &quot;stringifySelection()&quot;);
-    return [NSString stringWithUTF8String:buffer.get()];
-}
-
-static NSString *retrieveSelectionInElement(WKPageRef page, const char *areaName)
-{
-    auto buffer = callJavaScriptReturningString(page, [[NSString stringWithFormat:@&quot;stringifySelectionInElement('%s')&quot;, areaName] UTF8String]);
-    return [NSString stringWithUTF8String:buffer.get()];
-}
-
-static void performMenuItemAtIndexOfTypeAsync(NSMenu *menu, NSInteger index, int type)
-{
-    EXPECT_LT(index, menu.numberOfItems);
-    if (index &gt;= menu.numberOfItems)
-        return;
-    NSMenuItem *menuItem = [menu itemAtIndex:index];
-    EXPECT_NOT_NULL(menuItem);
-    EXPECT_EQ(type, [menuItem tag]);
-    EXPECT_TRUE([menuItem isEnabled]);
-    [menuItem.target performSelector:menuItem.action withObject:menuItem afterDelay:0];
-}
-
-static void ensureMenuItemAtIndexOfTypeIsDisabled(NSMenu *menu, NSInteger index, int type)
-{
-    EXPECT_LT(index, menu.numberOfItems);
-    if (index &gt;= menu.numberOfItems)
-        return;
-    NSMenuItem *menuItem = [menu itemAtIndex:index];
-    EXPECT_NOT_NULL(menuItem);
-    EXPECT_EQ(type, [menuItem tag]);
-    EXPECT_FALSE([menuItem isEnabled]);
-}
-
-enum class TargetType {
-    Word,
-    Phrase,
-    Address,
-    Date,
-    PhoneNumber,
-    ContentEditableWords,
-    ContentEditablePhrase,
-    TextInputWords,
-    TextInputPhrase,
-    TextAreaWords,
-    TextAreaPhrase,
-    Image,
-    ImageAsLink,
-    HTTPLink,
-    FTPLink,
-    MailtoLink,
-    JavaScriptLink,
-    PageOverlay,
-    PageWhitespace,
-    Video,
-    MSEVideo,
-    PDFEmbed,
-    PDFDocument
-};
-
-static NSPoint windowPointForTarget(TargetType target)
-{
-    NSPoint contentPoint;
-    switch (target) {
-    case TargetType::Word:
-        contentPoint = NSMakePoint(0, 0);
-        break;
-    case TargetType::Phrase:
-        contentPoint = NSMakePoint(200, 0);
-        break;
-    case TargetType::Address:
-        contentPoint = NSMakePoint(0, 50);
-        break;
-    case TargetType::Date:
-        contentPoint = NSMakePoint(200, 50);
-        break;
-    case TargetType::PhoneNumber:
-        contentPoint = NSMakePoint(400, 50);
-        break;
-    case TargetType::ContentEditableWords:
-        contentPoint = NSMakePoint(0, 150);
-        break;
-    case TargetType::ContentEditablePhrase:
-        contentPoint = NSMakePoint(0, 200);
-        break;
-    case TargetType::TextInputWords:
-        contentPoint = NSMakePoint(200, 150);
-        break;
-    case TargetType::TextInputPhrase:
-        contentPoint = NSMakePoint(200, 200);
-        break;
-    case TargetType::TextAreaWords:
-        contentPoint = NSMakePoint(400, 150);
-        break;
-    case TargetType::TextAreaPhrase:
-        contentPoint = NSMakePoint(400, 200);
-        break;
-    case TargetType::Image:
-        contentPoint = NSMakePoint(0, 250);
-        break;
-    case TargetType::ImageAsLink:
-        contentPoint = NSMakePoint(200, 250);
-        break;
-    case TargetType::HTTPLink:
-        contentPoint = NSMakePoint(0, 300);
-        break;
-    case TargetType::FTPLink:
-        contentPoint = NSMakePoint(100, 300);
-        break;
-    case TargetType::MailtoLink:
-        contentPoint = NSMakePoint(200, 300);
-        break;
-    case TargetType::JavaScriptLink:
-        contentPoint = NSMakePoint(300, 300);
-        break;
-    case TargetType::PageOverlay:
-        contentPoint = NSMakePoint(750, 100);
-        break;
-    case TargetType::PageWhitespace:
-        contentPoint = NSMakePoint(650, 0);
-        break;
-    case TargetType::Video:
-        contentPoint = NSMakePoint(0, 350);
-        break;
-    case TargetType::MSEVideo:
-        contentPoint = NSMakePoint(200, 350);
-        break;
-    case TargetType::PDFEmbed:
-        contentPoint = NSMakePoint(522, 363);
-        break;
-    case TargetType::PDFDocument:
-        contentPoint = NSMakePoint(141, 374);
-        break;
-    }
-
-    return NSMakePoint(contentPoint.x + 8, 600 - contentPoint.y - 8);
-}
-
-static void waitForPDFToLoad(ActionMenusTestWKView* wkView)
-{
-    __block bool pdfSeemsLoaded = false;
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::PDFEmbed) preDidCloseMenuHandler:^() {
-        pdfSeemsLoaded = kWKActionMenuReadOnlyText == [wkView _actionMenuResult].type;
-    }];
-    Util::run(&amp;didFinishLoad);
-}
-
-// FIXME: Ideally, each of these would be able to run as its own subtest in a suite, sharing a WKView (for performance reasons),
-// but we cannot because run-api-tests explicitly runs each test in a separate process. So, we use a single test for many tests instead.
-TEST(WebKit2, DISABLED_ActionMenusTest)
-{
-    WKRetainPtr&lt;WKContextRef&gt; context = adoptWK(Util::createContextForInjectedBundleTest(&quot;ActionMenusTest&quot;));
-
-    WKRetainPtr&lt;WKPageGroupRef&gt; pageGroup = adoptWK(WKPageGroupCreateWithIdentifier(Util::toWK(&quot;ActionMenusTestGroup&quot;).get()));
-    WKPreferencesRef preferences = WKPageGroupGetPreferences(pageGroup.get());
-    WKPreferencesSetMediaSourceEnabled(preferences, true);
-    WKPreferencesSetFileAccessFromFileURLsAllowed(preferences, true);
-
-    PlatformWebView platformWebView(context.get(), pageGroup.get(), [ActionMenusTestWKView class]);
-    RetainPtr&lt;ActionMenusTestWKView&gt; wkView = (ActionMenusTestWKView *)platformWebView.platformView();
-
-    if (![wkView respondsToSelector:@selector(_setActionMenu:)])
-        return;
-
-    WKPageLoaderClientV0 loaderClient;
-    memset(&amp;loaderClient, 0, sizeof(loaderClient));
-    loaderClient.base.version = 0;
-    loaderClient.didFinishLoadForFrame = didFinishLoadForFrameCallback;
-    WKPageSetPageLoaderClient([wkView pageRef], &amp;loaderClient.base);
-
-    ActiveDownloadContext activeDownloadContext;
-
-    WKContextDownloadClientV0 downloadClient;
-    memset(&amp;downloadClient, 0, sizeof(downloadClient));
-    downloadClient.base.version = 0;
-    downloadClient.base.clientInfo = &amp;activeDownloadContext;
-    downloadClient.didFinish = didFinishDownloadCallback;
-    downloadClient.didCreateDestination = didCreateDownloadDestinationCallback;
-    WKContextSetDownloadClient(context.get(), &amp;downloadClient.base);
-
-    WKRetainPtr&lt;WKURLRef&gt; url(AdoptWK, Util::createURLForResource(&quot;action-menu-targets&quot;, &quot;html&quot;));
-    WKPageLoadURL([wkView pageRef], url.get());
-
-    Util::run(&amp;didFinishLoad);
-
-    waitForVideoReady([wkView pageRef]);
-
-    // PDF embeds should have selectable/copyable text.
-    waitForPDFToLoad(wkView.get());
-
-    // Read-only text.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Word) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuReadOnlyText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;word&quot;, retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
-        EXPECT_WK_STREQ(@&quot;word&quot;, watchPasteboardForString());
-    }];
-
-    // Read-only text, on a phrase.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Phrase) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuReadOnlyText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;New York&quot;, retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
-        EXPECT_WK_STREQ(@&quot;New York&quot;, watchPasteboardForString());
-    }];
-
-    // Read-only text, on an address.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Address) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuReadOnlyText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;1 Infinite Loop, Cupertino, CA 95014&quot;, retrieveSelection([wkView pageRef]));
-    }];
-
-    // Read-only text, on a date.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Date) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuReadOnlyText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;May 17th, 2012&quot;, retrieveSelection([wkView pageRef]));
-    }];
-
-    // Read-only text, on a phone number.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::PhoneNumber) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuDataDetectedItem, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;(408) 996-1010&quot;, retrieveSelection([wkView pageRef]));
-    }];
-
-    // Copy from a contentEditable div.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::ContentEditableWords) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;editable&quot;, retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
-        EXPECT_WK_STREQ(@&quot;editable&quot;, watchPasteboardForString());
-    }];
-
-    // Copy a phrase from a contentEditable div.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::ContentEditablePhrase) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;New York&quot;, retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
-        EXPECT_WK_STREQ(@&quot;New York&quot;, watchPasteboardForString());
-    }];
-
-    // Paste on top of the text in the contentEditable div.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::ContentEditableWords) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        [[NSPasteboard generalPasteboard] clearContents];
-        [[NSPasteboard generalPasteboard] setString:@&quot;pasted string&quot; forType:NSPasteboardTypeString];
-        EXPECT_WK_STREQ(@&quot;editable&quot;, retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
-
-        // Now check and see if our paste succeeded. It should only replace one 'editable'.
-        watchEditableAreaForString([wkView pageRef], &quot;editable1&quot;, &quot;pasted string editable editable editable&quot;);
-    }];
-
-    // Paste on top of a phrase in the contentEditable div.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::ContentEditablePhrase) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        [[NSPasteboard generalPasteboard] clearContents];
-        [[NSPasteboard generalPasteboard] setString:@&quot;pasted over phrase&quot; forType:NSPasteboardTypeString];
-        EXPECT_WK_STREQ(@&quot;New York&quot;, retrieveSelection([wkView pageRef]));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
-
-        // Now check and see if our paste succeeded, and replaced the whole phrase.
-        watchEditableAreaForString([wkView pageRef], &quot;editable2&quot;, &quot;pasted over phrase some words&quot;);
-    }];
-
-    // Copy from an &lt;input&gt;.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextInputWords) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;editable&quot;, retrieveSelectionInElement([wkView pageRef], &quot;input1&quot;));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
-        EXPECT_WK_STREQ(@&quot;editable&quot;, watchPasteboardForString());
-    }];
-
-    // Copy a phrase from an &lt;input&gt;.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextInputPhrase) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;New York&quot;, retrieveSelectionInElement([wkView pageRef], &quot;input2&quot;));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
-        EXPECT_WK_STREQ(@&quot;New York&quot;, watchPasteboardForString());
-    }];
-
-    // Paste on top of the editable text in an &lt;input&gt;.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextInputWords) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        [[NSPasteboard generalPasteboard] clearContents];
-        [[NSPasteboard generalPasteboard] setString:@&quot;pasted string&quot; forType:NSPasteboardTypeString];
-        EXPECT_WK_STREQ(@&quot;editable&quot;, retrieveSelectionInElement([wkView pageRef], &quot;input1&quot;));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
-
-        // Now check and see if our paste succeeded. It should only replace one 'editable'.
-        watchEditableAreaForString([wkView pageRef], &quot;input1&quot;, &quot;pasted string editable editable editable&quot;);
-    }];
-
-    // Paste on top of the editable text, on a phrase in an &lt;input&gt;.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextInputPhrase) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        [[NSPasteboard generalPasteboard] clearContents];
-        [[NSPasteboard generalPasteboard] setString:@&quot;pasted over phrase&quot; forType:NSPasteboardTypeString];
-        EXPECT_WK_STREQ(@&quot;New York&quot;, retrieveSelectionInElement([wkView pageRef], &quot;input2&quot;));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
-
-        // Now check and see if our paste succeeded, and replaced the whole phrase.
-        watchEditableAreaForString([wkView pageRef], &quot;input2&quot;, &quot;pasted over phrase some words&quot;);
-    }];
-
-    // Copy from a &lt;textarea&gt;.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextAreaWords) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;editable&quot;, retrieveSelectionInElement([wkView pageRef], &quot;textarea1&quot;));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
-        EXPECT_WK_STREQ(@&quot;editable&quot;, watchPasteboardForString());
-    }];
-
-    // Copy a phrase from a &lt;textarea&gt;.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextAreaPhrase) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;New York&quot;, retrieveSelectionInElement([wkView pageRef], &quot;textarea2&quot;));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
-        EXPECT_WK_STREQ(@&quot;New York&quot;, watchPasteboardForString());
-    }];
-
-    // Paste on top of the editable text in a &lt;textarea&gt;.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextAreaWords) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        [[NSPasteboard generalPasteboard] clearContents];
-        [[NSPasteboard generalPasteboard] setString:@&quot;pasted&quot; forType:NSPasteboardTypeString];
-        EXPECT_WK_STREQ(@&quot;editable&quot;, retrieveSelectionInElement([wkView pageRef], &quot;textarea1&quot;));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
-
-        // Now check and see if our paste succeeded. It should only replace one 'editable'.
-        watchEditableAreaForString([wkView pageRef], &quot;textarea1&quot;, &quot;pasted editable editable editable&quot;);
-    }];
-
-    // Paste on top of the editable text, on a phrase in a &lt;textarea&gt;.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::TextAreaPhrase) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuEditableText, [wkView _actionMenuResult].type);
-        [[NSPasteboard generalPasteboard] clearContents];
-        [[NSPasteboard generalPasteboard] setString:@&quot;pasted over phrase&quot; forType:NSPasteboardTypeString];
-        EXPECT_WK_STREQ(@&quot;New York&quot;, retrieveSelectionInElement([wkView pageRef], &quot;textarea2&quot;));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagPaste);
-
-        // Now check and see if our paste succeeded, and replaced the whole phrase.
-        watchEditableAreaForString([wkView pageRef], &quot;textarea2&quot;, &quot;pasted over phrase some words&quot;);
-    }];
-
-    // Copy an image.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Image) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuImage, [wkView _actionMenuResult].type);
-
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyImage);
-        NSImage *image = watchPasteboardForImage();
-
-        EXPECT_EQ(215, image.size.width);
-        EXPECT_EQ(174, image.size.height);
-    }];
-
-    // Download a local image (should be disabled)
-    activeDownloadContext.shouldCheckForImage = true;
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Image) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuImage, [wkView _actionMenuResult].type);
-        ensureMenuItemAtIndexOfTypeIsDisabled([wkView _actionMenu], 2, kWKContextActionItemTagSaveImageToDownloads);
-    }];
-    activeDownloadContext.shouldCheckForImage = false;
-
-    // Images that are also links should be treated as links.
-    // http://trac.webkit.org/changeset/175701
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::ImageAsLink) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuLink, [wkView _actionMenuResult].type);
-    }];
-
-    // Copy a video URL.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Video) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuVideo, [wkView _actionMenuResult].type);
-
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyVideoURL);
-        NSString *videoURL = watchPasteboardForString();
-        EXPECT_WK_STREQ(@&quot;test.mp4&quot;, [videoURL lastPathComponent]);
-
-        // Since this video is a local file, it should be disabled.
-        ensureMenuItemAtIndexOfTypeIsDisabled([wkView _actionMenu], 2, kWKContextActionItemTagSaveVideoToDownloads);
-    }];
-
-    // Copying a video URL for a non-downloadable video should result in copying the page URL instead.
-    // http://trac.webkit.org/changeset/176131
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::MSEVideo) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuVideo, [wkView _actionMenuResult].type);
-
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyVideoURL);
-        NSString *videoURL = watchPasteboardForString();
-        EXPECT_WK_STREQ(@&quot;action-menu-targets.html&quot;, [videoURL lastPathComponent]);
-
-        // Also, the download menu item should be disabled for non-downloadable video.
-        ensureMenuItemAtIndexOfTypeIsDisabled([wkView _actionMenu], 2, kWKContextActionItemTagSaveVideoToDownloads);
-    }];
-
-    // HTTP link.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::HTTPLink) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuLink, [wkView _actionMenuResult].type);
-
-        // Invoking an action menu should dismiss any existing selection.
-        // http://trac.webkit.org/changeset/175753
-        EXPECT_WK_STREQ(@&quot;&lt;no selection&gt;&quot;, retrieveSelection([wkView pageRef]));
-    }];
-
-    // Mailto link.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::MailtoLink) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuMailtoLink, [wkView _actionMenuResult].type);
-
-        // Data detected links don't get a selection nor special indication, for consistency with HTTP links.
-        EXPECT_WK_STREQ(@&quot;&lt;no selection&gt;&quot;, retrieveSelection([wkView pageRef]));
-    }];
-
-    // Non-HTTP(S), non-mailto links should fall back to the text menu.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::FTPLink) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuReadOnlyText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;ftp&quot;, retrieveSelection([wkView pageRef]));
-    }];
-
-    // JavaScript links should not be executed, and should fall back to the text menu.
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::JavaScriptLink) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuReadOnlyText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(@&quot;javascript&quot;, retrieveSelection([wkView pageRef]));
-        EXPECT_FALSE(callJavaScriptReturningBool([wkView pageRef], &quot;wasFailCalled()&quot;));
-    }];
-
-    // PDF text content
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::PDFEmbed) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuReadOnlyText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(&quot;separation&quot;, WKHitTestResultCopyLookupText([wkView _actionMenuResult].hitTestResult.get()));
-    
-        // FIXME(144008): You cannot copy from PDFs hosted in &lt;embed&gt; tags. When this is fixed, we should test it works here.
-    }];
-
-    // Clients should be able to customize the menu by overriding WKView's _actionMenuItemsForHitTestResult.
-    // http://trac.webkit.org/changeset/174908
-    RetainPtr&lt;NSMenuItem&gt; item = adoptNS([[NSMenuItem alloc] initWithTitle:@&quot;Some Action&quot; action:@selector(copy:) keyEquivalent:@&quot;&quot;]);
-    [wkView _setOverrideActionMenuItems:@[ item.get() ]];
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Image) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(1, [wkView _actionMenu].numberOfItems);
-        EXPECT_WK_STREQ(@&quot;Some Action&quot;, [[wkView _actionMenu] itemAtIndex:0].title);
-    }];
-    [wkView _setOverrideActionMenuItems:nil];
-
-    // Clients should be able to customize the DataDetectors actions by implementing
-    // WKBundlePageOverlayClient's prepareForActionMenu callback.
-    // http://trac.webkit.org/changeset/176086
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::PageOverlay) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuDataDetectedItem, [wkView _actionMenuResult].type);
-    }];
-
-    // No menu should be built for whitespace (except in editable areas).
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::PageWhitespace) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuNone, [wkView _actionMenuResult].type);
-        EXPECT_EQ(0, [wkView _actionMenu].numberOfItems);
-    }];
-}
-
-TEST(WebKit2, DISABLED_ActionMenusPDFTest)
-{
-    WKRetainPtr&lt;WKContextRef&gt; context = adoptWK(Util::createContextForInjectedBundleTest(&quot;ActionMenusTest&quot;));
-    
-    WKRetainPtr&lt;WKPageGroupRef&gt; pageGroup = adoptWK(WKPageGroupCreateWithIdentifier(Util::toWK(&quot;ActionMenusPDFTestGroup&quot;).get()));
-    WKPreferencesRef preferences = WKPageGroupGetPreferences(pageGroup.get());
-    WKPreferencesSetMediaSourceEnabled(preferences, true);
-    WKPreferencesSetFileAccessFromFileURLsAllowed(preferences, true);
-    
-    PlatformWebView platformWebView(context.get(), pageGroup.get(), [ActionMenusTestWKView class]);
-    RetainPtr&lt;ActionMenusTestWKView&gt; wkView = (ActionMenusTestWKView *)platformWebView.platformView();
-    
-    if (![wkView respondsToSelector:@selector(_setActionMenu:)])
-        return;
-    
-    WKPageLoaderClientV0 loaderClient;
-    memset(&amp;loaderClient, 0, sizeof(loaderClient));
-    loaderClient.base.version = 0;
-    loaderClient.didFinishLoadForFrame = didFinishLoadForFrameCallback;
-    WKPageSetPageLoaderClient([wkView pageRef], &amp;loaderClient.base);
-    
-    ActiveDownloadContext activeDownloadContext;
-    
-    WKRetainPtr&lt;WKURLRef&gt; url(AdoptWK, Util::createURLForResource(&quot;action-menu-target&quot;, &quot;pdf&quot;));
-    WKPageLoadURL([wkView pageRef], url.get());
-    
-    Util::run(&amp;didFinishLoad);
-
-    [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::PDFDocument) preDidCloseMenuHandler:^() {
-        EXPECT_EQ(kWKActionMenuReadOnlyText, [wkView _actionMenuResult].type);
-        EXPECT_WK_STREQ(&quot;Happiness&quot;, WKHitTestResultCopyLookupText([wkView _actionMenuResult].hitTestResult.get()));
-        performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 0, kWKContextActionItemTagCopyText);
-        EXPECT_WK_STREQ(@&quot;Happiness&quot;, watchPasteboardForString());
-    }];
-}
-
-} // namespace TestWebKitAPI
-
-#endif
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2ObjCActionMenusBundlemm"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,145 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import &quot;config.h&quot;
-
-#if WK_HAVE_C_SPI
-
-#import &quot;ActionMenusBundleSPI.h&quot;
-#import &quot;InjectedBundleTest.h&quot;
-#import &quot;PlatformUtilities.h&quot;
-#import &quot;Test.h&quot;
-#import &lt;Foundation/Foundation.h&gt;
-#import &lt;WebKit/WKBundleFramePrivate.h&gt;
-#import &lt;WebKit/WKBundleHitTestResult.h&gt;
-#import &lt;WebKit/WKBundleNodeHandlePrivate.h&gt;
-#import &lt;WebKit/WKBundlePage.h&gt;
-#import &lt;WebKit/WKBundlePageOverlay.h&gt;
-#import &lt;WebKit/WKBundleRangeHandlePrivate.h&gt;
-#import &lt;WebKit/WKDictionary.h&gt;
-#import &lt;WebKit/WKNumber.h&gt;
-#import &lt;wtf/RetainPtr.h&gt;
-
-namespace TestWebKitAPI {
-
-RetainPtr&lt;DDActionContext&gt; createActionContextForPhoneNumber()
-{
-    RetainPtr&lt;CFStringRef&gt; plainText = CFSTR(&quot;(408) 996-1010&quot;);
-    RetainPtr&lt;DDScannerRef&gt; scanner = adoptCF(DDScannerCreate(DDScannerTypeStandard, 0, nullptr));
-    RetainPtr&lt;DDScanQueryRef&gt; scanQuery = adoptCF(DDScanQueryCreateFromString(kCFAllocatorDefault, plainText.get(), CFRangeMake(0, CFStringGetLength(plainText.get()))));
-
-    if (!DDScannerScanQuery(scanner.get(), scanQuery.get()))
-        return nullptr;
-
-    RetainPtr&lt;CFArrayRef&gt; results = adoptCF(DDScannerCopyResultsWithOptions(scanner.get(), DDScannerCopyResultsOptionsNoOverlap));
-
-    CFIndex resultCount = CFArrayGetCount(results.get());
-    if (resultCount != 1)
-        return nullptr;
-
-    DDResultRef mainResult = (DDResultRef)CFArrayGetValueAtIndex(results.get(), 0);
-
-    if (!mainResult)
-        return nullptr;
-
-    RetainPtr&lt;DDActionContext&gt; actionContext = adoptNS([[getDDActionContextClass() alloc] init]);
-    [actionContext setAllResults:@[ (id)mainResult ]];
-    [actionContext setMainResult:mainResult];
-
-    return actionContext;
-}
-    
-class ActionMenuTest : public InjectedBundleTest {
-public:
-    ActionMenuTest(const std::string&amp; identifier)
-        : InjectedBundleTest(identifier)
-    {
-    }
-
-    static void prepareForActionMenu(WKBundlePageRef page, WKBundleHitTestResultRef hitTestResult, WKTypeRef* userData, const void* clientInfo)
-    {
-        WKStringRef keys[1];
-        WKTypeRef values[1];
-
-        WKRetainPtr&lt;WKStringRef&gt; hasLinkKey = adoptWK(WKStringCreateWithUTF8CString(&quot;hasLinkURL&quot;));
-        WKRetainPtr&lt;WKURLRef&gt; absoluteLinkURL = adoptWK(WKBundleHitTestResultCopyAbsoluteLinkURL(hitTestResult));
-        WKRetainPtr&lt;WKBooleanRef&gt; hasLinkValue = adoptWK(WKBooleanCreate(!!absoluteLinkURL));
-        keys[0] = hasLinkKey.get();
-        values[0] = hasLinkValue.get();
-
-        *userData = WKDictionaryCreate(keys, values, 1);
-    }
-
-    static void* actionContextForResultAtPoint(WKBundlePageOverlayRef pageOverlay, WKPoint position, WKBundleRangeHandleRef* rangeHandle, _WKBundlePageOverlayActionContextRequestType requestType, const void* clientInfo)
-    {
-        if (position.x &gt; 700) {
-            RetainPtr&lt;DDActionContext&gt; actionContext = createActionContextForPhoneNumber();
-            *rangeHandle = (WKBundleRangeHandleRef)clientInfo;
-            return (void*)actionContext.autorelease();
-        }
-        return nullptr;
-    }
-
-    static void drawRect(WKBundlePageOverlayRef pageOverlay, void* graphicsContext, WKRect dirtyRect, const void* clientInfo)
-    {
-        CGContextRef ctx = static_cast&lt;CGContextRef&gt;(graphicsContext);
-        CGContextSetRGBFillColor(ctx, 0, 1, 0, 1);
-        CGContextFillRect(ctx, CGRectMake(700, 0, 100, 600));
-    }
-
-    virtual void didCreatePage(WKBundleRef bundle, WKBundlePageRef page)
-    {
-        WKBundlePageContextMenuClientV1 contextMenuClient;
-        memset(&amp;contextMenuClient, 0, sizeof(contextMenuClient));
-        contextMenuClient.base.version = 1;
-        contextMenuClient.prepareForActionMenu = prepareForActionMenu;
-        WKBundlePageSetContextMenuClient(page, &amp;contextMenuClient.base);
-
-        WKRetainPtr&lt;WKBundleHitTestResultRef&gt; hitTestResult = adoptWK(WKBundleFrameCreateHitTestResult(WKBundlePageGetMainFrame(page), WKPointMake(708, 8)));
-        WKRetainPtr&lt;WKBundleNodeHandleRef&gt; nodeHandle = adoptWK(WKBundleHitTestResultCopyNodeHandle(hitTestResult.get()));
-        _rangeHandle = adoptWK(WKBundleNodeHandleCopyVisibleRange(nodeHandle.get()));
-
-        WKBundlePageOverlayClientV1 pageOverlayClient;
-        memset(&amp;pageOverlayClient, 0, sizeof(pageOverlayClient));
-        pageOverlayClient.base.version = 1;
-        pageOverlayClient.base.clientInfo = _rangeHandle.get();
-
-        pageOverlayClient.drawRect = drawRect;
-        pageOverlayClient.actionContextForResultAtPoint = actionContextForResultAtPoint;
-
-        _bundlePageOverlay = adoptWK(WKBundlePageOverlayCreate(&amp;pageOverlayClient.base));
-        WKBundlePageInstallPageOverlay(page, _bundlePageOverlay.get());
-        WKBundlePageOverlaySetNeedsDisplay(_bundlePageOverlay.get(), WKRectMake(0, 0, 800, 600));
-    }
-
-    WKRetainPtr&lt;WKBundlePageOverlayRef&gt; _bundlePageOverlay;
-    WKRetainPtr&lt;WKBundleRangeHandleRef&gt; _rangeHandle;
-};
-
-static InjectedBundleTest::Register&lt;ActionMenuTest&gt; registrar(&quot;ActionMenusTest&quot;);
-
-} // namespace TestWebKitAPI
-
-#endif // PLATFORM(MAC)
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2ObjCActionMenusBundleSPIh"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundleSPI.h (184779 => 184780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundleSPI.h        2015-05-22 17:41:46 UTC (rev 184779)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundleSPI.h        2015-05-22 18:43:42 UTC (rev 184780)
</span><span class="lines">@@ -1,112 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import &quot;config.h&quot;
-#import &lt;Foundation/Foundation.h&gt;
-#import &lt;dlfcn.h&gt;
-#import &lt;objc/runtime.h&gt;
-#import &lt;wtf/Assertions.h&gt;
-
-#define SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(framework) \
-    static void* framework##Library() \
-    { \
-        static void* frameworkLibrary = dlopen(&quot;/System/Library/PrivateFrameworks/&quot; #framework &quot;.framework/&quot; #framework, RTLD_NOW); \
-        return frameworkLibrary; \
-    }
-
-#define SOFT_LINK(framework, functionName, resultType, parameterDeclarations, parameterNames) \
-    static resultType init##functionName parameterDeclarations; \
-    static resultType (*softLink##functionName) parameterDeclarations = init##functionName; \
-    \
-    static resultType init##functionName parameterDeclarations \
-    { \
-        softLink##functionName = (resultType (*) parameterDeclarations) dlsym(framework##Library(), #functionName); \
-        ASSERT_WITH_MESSAGE(softLink##functionName, &quot;%s&quot;, dlerror()); \
-        return softLink##functionName parameterNames; \
-    }\
-    \
-    inline resultType functionName parameterDeclarations \
-    {\
-        return softLink##functionName parameterNames; \
-    }
-
-#define SOFT_LINK_CLASS(framework, className) \
-    static Class init##className(); \
-    static Class (*get##className##Class)() = init##className; \
-    static Class class##className; \
-    \
-    static Class className##Function() \
-    { \
-        return class##className; \
-    }\
-    \
-    static Class init##className() \
-    { \
-        framework##Library(); \
-        class##className = objc_getClass(#className); \
-        ASSERT(class##className); \
-        get##className##Class = className##Function; \
-        return class##className; \
-    }
-
-typedef struct __DDScanner DDScanner, *DDScannerRef;
-typedef struct __DDScanQuery *DDScanQueryRef;
-typedef struct __DDResult *DDResultRef;
-
-typedef enum {
-    DDScannerTypeStandard = 0,
-} DDScannerType;
-
-enum {
-    DDScannerOptionStopAtFirstMatch = 1,
-};
-typedef CFIndex DDScannerOptions;
-
-enum {
-    DDScannerCopyResultsOptionsNone = 0,
-    DDScannerCopyResultsOptionsNoOverlap = 1 &lt;&lt; 0,
-};
-typedef CFIndex DDScannerCopyResultsOptions;
-
-SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(DataDetectors)
-SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(DataDetectorsCore)
-
-extern &quot;C&quot; {
-
-SOFT_LINK(DataDetectorsCore, DDScannerCreate, DDScannerRef, (DDScannerType type, DDScannerOptions options, CFErrorRef* errorRef), (type, options, errorRef))
-SOFT_LINK(DataDetectorsCore, DDScanQueryCreateFromString, DDScanQueryRef, (CFAllocatorRef allocator, CFStringRef string, CFRange range), (allocator, string, range))
-SOFT_LINK(DataDetectorsCore, DDScannerScanQuery, DDScanQueryRef, (DDScannerRef scanner, DDScanQueryRef query), (scanner, query))
-SOFT_LINK(DataDetectorsCore, DDScannerCopyResultsWithOptions, CFArrayRef, (DDScannerRef scanner, DDScannerCopyResultsOptions options), (scanner, options))
-
-}
-
-SOFT_LINK_CLASS(DataDetectors, DDActionContext)
-
-@interface DDActionContext : NSObject &lt;NSCopying, NSSecureCoding&gt;
-
-@property (retain) NSArray *allResults;
-@property (retain) __attribute__((NSObject)) DDResultRef mainResult;
-
-@end
</del></span></pre>
</div>
</div>

</body>
</html>