<!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>[177300] trunk/Source/WebKit/mac</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/177300">177300</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2014-12-15 11:49:24 -0800 (Mon, 15 Dec 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implement Data Detectors immediate actions for Legacy WebKit
https://bugs.webkit.org/show_bug.cgi?id=139619
&lt;rdar://problem/19198539&gt;

Reviewed by Eric Carlson.

* WebView/WebHTMLView.mm:
(-[WebHTMLView mouseDown:mouseDown:]):
Send mouseDown along to the WebImmediateActionController too.

* WebView/WebImmediateActionController.h:
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController webViewClosed]):
(-[WebImmediateActionController webView:willHandleMouseDown:]):
(-[WebImmediateActionController _cancelImmediateAction]):
(-[WebImmediateActionController _clearImmediateActionState]):
(-[WebImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WebImmediateActionController _defaultAnimationController]):
(-[WebImmediateActionController _updateImmediateActionItem]):
(-[WebImmediateActionController _menuItemForDataDetectedText]):
(-[WebImmediateActionController _showTextIndicator]):
(-[WebImmediateActionController _hideTextIndicator]):
Copy most of the DataDetectors implementation into WebImmediateActionController.

* WebView/WebUIDelegatePrivate.h:
Add a new type.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
Temporarily disable action menus.

(-[WebView _immediateActionController]):
* WebView/WebViewInternal.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebHTMLViewmm">trunk/Source/WebKit/mac/WebView/WebHTMLView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebImmediateActionControllerh">trunk/Source/WebKit/mac/WebView/WebImmediateActionController.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebImmediateActionControllermm">trunk/Source/WebKit/mac/WebView/WebImmediateActionController.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="#trunkSourceWebKitmacWebViewWebViewInternalh">trunk/Source/WebKit/mac/WebView/WebViewInternal.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (177299 => 177300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-12-15 19:46:34 UTC (rev 177299)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-12-15 19:49:24 UTC (rev 177300)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-12-15  Timothy Horton  &lt;timothy_horton@apple.com&gt;
+
+        Implement Data Detectors immediate actions for Legacy WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=139619
+        &lt;rdar://problem/19198539&gt;
+
+        Reviewed by Eric Carlson.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView mouseDown:mouseDown:]):
+        Send mouseDown along to the WebImmediateActionController too.
+
+        * WebView/WebImmediateActionController.h:
+        * WebView/WebImmediateActionController.mm:
+        (-[WebImmediateActionController webViewClosed]):
+        (-[WebImmediateActionController webView:willHandleMouseDown:]):
+        (-[WebImmediateActionController _cancelImmediateAction]):
+        (-[WebImmediateActionController _clearImmediateActionState]):
+        (-[WebImmediateActionController immediateActionRecognizerWillPrepare:]):
+        (-[WebImmediateActionController _defaultAnimationController]):
+        (-[WebImmediateActionController _updateImmediateActionItem]):
+        (-[WebImmediateActionController _menuItemForDataDetectedText]):
+        (-[WebImmediateActionController _showTextIndicator]):
+        (-[WebImmediateActionController _hideTextIndicator]):
+        Copy most of the DataDetectors implementation into WebImmediateActionController.
+
+        * WebView/WebUIDelegatePrivate.h:
+        Add a new type.
+
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+        Temporarily disable action menus.
+
+        (-[WebView _immediateActionController]):
+        * WebView/WebViewInternal.h:
+
</ins><span class="cx"> 2014-12-15  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Delete Notation because we don't use it
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebHTMLViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (177299 => 177300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2014-12-15 19:46:34 UTC (rev 177299)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm        2014-12-15 19:49:24 UTC (rev 177300)
</span><span class="lines">@@ -3822,6 +3822,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><span class="cx">     [[[self _webView] _actionMenuController] webView:[self _webView] willHandleMouseDown:event];
</span><ins>+    [[[self _webView] _immediateActionController] webView:[self _webView] willHandleMouseDown:event];
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebImmediateActionControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebImmediateActionController.h (177299 => 177300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebImmediateActionController.h        2014-12-15 19:46:34 UTC (rev 177299)
+++ trunk/Source/WebKit/mac/WebView/WebImmediateActionController.h        2014-12-15 19:49:24 UTC (rev 177300)
</span><span class="lines">@@ -30,19 +30,33 @@
</span><span class="cx"> #import &lt;WebCore/NSImmediateActionGestureRecognizerSPI.h&gt;
</span><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><ins>+@class DDActionContext;
</ins><span class="cx"> @class WebView;
</span><span class="cx"> 
</span><ins>+namespace WebCore {
+class Range;
+class TextIndicator;
+}
+
</ins><span class="cx"> @interface WebImmediateActionController : NSObject &lt;NSImmediateActionGestureRecognizerDelegate&gt; {
</span><span class="cx"> @private
</span><span class="cx">     WebView *_webView;
</span><span class="cx">     WebImmediateActionType _type;
</span><span class="cx">     WebCore::HitTestResult _hitTestResult;
</span><span class="cx">     NSImmediateActionGestureRecognizer *_immediateActionRecognizer;
</span><ins>+
+    RetainPtr&lt;DDActionContext&gt; _currentActionContext;
+    RefPtr&lt;WebCore::Range&gt; _currentDetectedDataRange;
+    RefPtr&lt;WebCore::TextIndicator&gt; _currentDetectedDataTextIndicator;
+    BOOL _isShowingTextIndicator;
+    BOOL _hasActivatedActionContext;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (instancetype)initWithWebView:(WebView *)webView recognizer:(NSImmediateActionGestureRecognizer *)immediateActionRecognizer;
</span><span class="cx"> - (void)webViewClosed;
</span><span class="cx"> 
</span><ins>+- (void)webView:(WebView *)webView willHandleMouseDown:(NSEvent *)event;
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebImmediateActionControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebImmediateActionController.mm (177299 => 177300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebImmediateActionController.mm        2014-12-15 19:46:34 UTC (rev 177299)
+++ trunk/Source/WebKit/mac/WebView/WebImmediateActionController.mm        2014-12-15 19:49:24 UTC (rev 177300)
</span><span class="lines">@@ -27,16 +27,22 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><span class="cx"> 
</span><ins>+#import &quot;DOMElementInternal.h&quot;
+#import &quot;DOMNodeInternal.h&quot;
+#import &quot;DOMRangeInternal.h&quot;
</ins><span class="cx"> #import &quot;WebElementDictionary.h&quot;
</span><span class="cx"> #import &quot;WebFrameInternal.h&quot;
</span><span class="cx"> #import &quot;WebHTMLView.h&quot;
</span><span class="cx"> #import &quot;WebHTMLViewInternal.h&quot;
</span><span class="cx"> #import &quot;WebUIDelegatePrivate.h&quot;
</span><span class="cx"> #import &quot;WebViewInternal.h&quot;
</span><ins>+#import &lt;WebCore/DataDetection.h&gt;
+#import &lt;WebCore/DataDetectorsSPI.h&gt;
</ins><span class="cx"> #import &lt;WebCore/EventHandler.h&gt;
</span><span class="cx"> #import &lt;WebCore/Frame.h&gt;
</span><span class="cx"> #import &lt;WebCore/NSMenuSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/SoftLinking.h&gt;
</span><ins>+#import &lt;WebCore/TextIndicator.h&gt;
</ins><span class="cx"> #import &lt;objc/objc-class.h&gt;
</span><span class="cx"> #import &lt;objc/objc.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -66,11 +72,28 @@
</span><span class="cx"> {
</span><span class="cx">     _webView = nil;
</span><span class="cx">     _immediateActionRecognizer = nil;
</span><ins>+    _currentActionContext = nil;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)webView:(WebView *)webView willHandleMouseDown:(NSEvent *)event
+{
+    [self _clearImmediateActionState];
+}
+
+- (void)_cancelImmediateAction
+{
+    // Reset the recognizer by turning it off and on again.
+    _immediateActionRecognizer.enabled = NO;
+    _immediateActionRecognizer.enabled = YES;
+
+    [self _clearImmediateActionState];
+}
+
</ins><span class="cx"> - (void)_clearImmediateActionState
</span><span class="cx"> {
</span><span class="cx">     _type = WebImmediateActionNone;
</span><ins>+    _currentActionContext = nil;
+    _immediateActionRecognizer.animationController = nil;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)performHitTestAtPoint:(NSPoint)viewPoint
</span><span class="lines">@@ -95,6 +118,17 @@
</span><span class="cx">     NSPoint locationInDocumentView = [immediateActionRecognizer locationInView:documentView];
</span><span class="cx">     [self performHitTestAtPoint:locationInDocumentView];
</span><span class="cx">     [self _updateImmediateActionItem];
</span><ins>+
+    if (!_immediateActionRecognizer.animationController) {
+        [self _cancelImmediateAction];
+        return;
+    }
+
+    if (_currentActionContext) {
+        _hasActivatedActionContext = YES;
+        if (![getDDActionsManagerClass() shouldUseActionsWithContext:_currentActionContext.get()])
+            [self _cancelImmediateAction];
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)immediateActionRecognizerWillBeginAnimation:(NSImmediateActionGestureRecognizer *)immediateActionRecognizer
</span><span class="lines">@@ -123,12 +157,8 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma mark Immediate actions
</span><span class="cx"> 
</span><del>-- (void)_updateImmediateActionItem
</del><ins>+- (id &lt;NSImmediateActionAnimationController&gt;)_defaultAnimationController
</ins><span class="cx"> {
</span><del>-    _type = WebImmediateActionNone;
-    _immediateActionRecognizer.animationController = nil;
-    id &lt;NSImmediateActionAnimationController&gt; defaultAnimationController = nil;
-
</del><span class="cx">     NSURL *url = _hitTestResult.absoluteLinkURL();
</span><span class="cx">     NSString *absoluteURLString = [url absoluteString];
</span><span class="cx">     if (url &amp;&amp; WebCore::protocolIsInHTTPFamily(absoluteURLString)) {
</span><span class="lines">@@ -137,9 +167,26 @@
</span><span class="cx">         RetainPtr&lt;QLPreviewMenuItem&gt; qlPreviewLinkItem = [NSMenuItem standardQuickLookMenuItem];
</span><span class="cx">         [qlPreviewLinkItem setPreviewStyle:QLPreviewStylePopover];
</span><span class="cx">         [qlPreviewLinkItem setDelegate:self];
</span><del>-        defaultAnimationController = (id &lt;NSImmediateActionAnimationController&gt;)qlPreviewLinkItem.get();
</del><ins>+        return (id &lt;NSImmediateActionAnimationController&gt;)qlPreviewLinkItem.get();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    Node* node = _hitTestResult.innerNode();
+    if ((node &amp;&amp; node-&gt;isTextNode()) || _hitTestResult.isOverTextInsideFormControlElement()) {
+        if (NSMenuItem *immediateActionItem = [self _menuItemForDataDetectedText]) {
+            _type = WebImmediateActionDataDetectedItem;
+            return (id&lt;NSImmediateActionAnimationController&gt;)immediateActionItem;
+        }
+    }
+
+    return nil;
+}
+
+- (void)_updateImmediateActionItem
+{
+    _type = WebImmediateActionNone;
+
+    id &lt;NSImmediateActionAnimationController&gt; defaultAnimationController = [self _defaultAnimationController];
+
</ins><span class="cx">     // Allow clients the opportunity to override the default immediate action.
</span><span class="cx">     id customClientAnimationController = nil;
</span><span class="cx">     if ([[_webView UIDelegate] respondsToSelector:@selector(_webView:immediateActionAnimationControllerForHitTestResult:withType:)]) {
</span><span class="lines">@@ -147,8 +194,10 @@
</span><span class="cx">         customClientAnimationController = [[_webView UIDelegate] _webView:_webView immediateActionAnimationControllerForHitTestResult:webHitTestResult.get() withType:_type];
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (customClientAnimationController == [NSNull null])
</del><ins>+    if (customClientAnimationController == [NSNull null]) {
+        [self _cancelImmediateAction];
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx">     if (customClientAnimationController &amp;&amp; [customClientAnimationController conformsToProtocol:@protocol(NSImmediateActionAnimationController)])
</span><span class="cx">         _immediateActionRecognizer.animationController = (id &lt;NSImmediateActionAnimationController&gt;)customClientAnimationController;
</span><span class="cx">     else
</span><span class="lines">@@ -175,6 +224,80 @@
</span><span class="cx">     return NSMaxYEdge;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#pragma mark Data Detectors actions
+
+- (NSMenuItem *)_menuItemForDataDetectedText
+{
+    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 = [[_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 nil;
+
+    [actionContext setAltMode:YES];
+    if ([[getDDActionsManagerClass() sharedManager] respondsToSelector:@selector(hasActionsForResult:actionContext:)]) {
+        if (![[getDDActionsManagerClass() sharedManager] hasActionsForResult:[actionContext mainResult] actionContext:actionContext.get()])
+            return nil;
+    }
+
+    _currentDetectedDataTextIndicator = TextIndicator::createWithRange(*detectedDataRange, TextIndicatorPresentationTransition::BounceAndCrossfade);
+
+    _currentActionContext = [actionContext contextForView:_webView altMode:YES interactionStartedHandler:^() {
+    } interactionChangedHandler:^() {
+        [self _showTextIndicator];
+    } interactionStoppedHandler:^() {
+        [self _hideTextIndicator];
+    }];
+    _currentDetectedDataRange = detectedDataRange;
+
+    [_currentActionContext setHighlightFrame:[_webView.window convertRectToScreen:detectedDataBoundingBox]];
+
+    NSArray *menuItems = [[getDDActionsManagerClass() sharedManager] menuItemsForResult:[_currentActionContext mainResult] actionContext:_currentActionContext.get()];
+    if (menuItems.count != 1)
+        return nil;
+
+    if (_currentDetectedDataTextIndicator)
+        _currentDetectedDataTextIndicator-&gt;setPresentationTransition(TextIndicatorPresentationTransition::Bounce);
+    return menuItems.lastObject;
+}
+
+#pragma mark Text Indicator
+
+- (void)_showTextIndicator
+{
+    if (_isShowingTextIndicator)
+        return;
+
+    if (_type == WebImmediateActionDataDetectedItem &amp;&amp; _currentDetectedDataTextIndicator) {
+        [_webView _setTextIndicator:_currentDetectedDataTextIndicator.get() fadeOut:NO animationCompletionHandler:^ { }];
+        _isShowingTextIndicator = YES;
+    }
+}
+
+- (void)_hideTextIndicator
+{
+    if (!_isShowingTextIndicator)
+        return;
+
+    [_webView _clearTextIndicator];
+    _isShowingTextIndicator = NO;
+}
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(MAC) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebUIDelegatePrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h (177299 => 177300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h        2014-12-15 19:46:34 UTC (rev 177299)
+++ trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h        2014-12-15 19:49:24 UTC (rev 177300)
</span><span class="lines">@@ -146,7 +146,8 @@
</span><span class="cx"> 
</span><span class="cx"> typedef enum {
</span><span class="cx">     WebImmediateActionNone = 0,
</span><del>-    WebImmediateActionLinkPreview
</del><ins>+    WebImmediateActionLinkPreview,
+    WebImmediateActionDataDetectedItem
</ins><span class="cx"> } WebImmediateActionType;
</span><span class="cx"> 
</span><span class="cx"> // Message Sources.
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (177299 => 177300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2014-12-15 19:46:34 UTC (rev 177299)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2014-12-15 19:49:24 UTC (rev 177300)
</span><span class="lines">@@ -886,12 +886,13 @@
</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:)]) {
</del><ins>+    // FIXME: Temporarily disable action menu installation.
+    /*if ([self respondsToSelector:@selector(setActionMenu:)]) {
</ins><span class="cx">         RetainPtr&lt;NSMenu&gt; actionMenu = adoptNS([[NSMenu alloc] init]);
</span><span class="cx">         self.actionMenu = actionMenu.get();
</span><span class="cx">         _private-&gt;actionMenuController = [[WebActionMenuController alloc] initWithWebView:self];
</span><span class="cx">         self.actionMenu.autoenablesItems = NO;
</span><del>-    }
</del><ins>+    }*/
</ins><span class="cx"> 
</span><span class="cx">     if (Class gestureClass = NSClassFromString(@&quot;NSImmediateActionGestureRecognizer&quot;)) {
</span><span class="cx">         RetainPtr&lt;NSImmediateActionGestureRecognizer&gt; recognizer = adoptNS([(NSImmediateActionGestureRecognizer *)[gestureClass alloc] initWithTarget:nil action:NULL]);
</span><span class="lines">@@ -8605,6 +8606,11 @@
</span><span class="cx"> {
</span><span class="cx">     return _private-&gt;actionMenuController;
</span><span class="cx"> }
</span><ins>+
+- (WebImmediateActionController *)_immediateActionController
+{
+    return _private-&gt;immediateActionController;
+}
</ins><span class="cx"> #endif // __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><span class="cx"> 
</span><span class="cx"> - (void)_setTextIndicator:(TextIndicator *)textIndicator fadeOut:(BOOL)fadeOut animationCompletionHandler:(std::function&lt;void ()&gt;)completionHandler
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewInternal.h (177299 => 177300)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewInternal.h        2014-12-15 19:46:34 UTC (rev 177299)
+++ trunk/Source/WebKit/mac/WebView/WebViewInternal.h        2014-12-15 19:49:24 UTC (rev 177300)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx"> @class WebActionMenuController;
</span><span class="cx"> @class WebBasePluginPackage;
</span><span class="cx"> @class WebDownload;
</span><ins>+@class WebImmediateActionController;
</ins><span class="cx"> @class WebNodeHighlight;
</span><span class="cx"> 
</span><span class="cx"> #ifdef __cplusplus
</span><span class="lines">@@ -263,6 +264,7 @@
</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"> - (WebActionMenuController *)_actionMenuController;
</span><ins>+- (WebImmediateActionController *)_immediateActionController;
</ins><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>