<!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>[176281] branches/safari-600.3-branch/Source</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/176281">176281</a></dd>
<dt>Author</dt> <dd>dburkart@apple.com</dd>
<dt>Date</dt> <dd>2014-11-18 13:28:10 -0800 (Tue, 18 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/176164">r176164</a>. rdar://problem/18953982</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6003branchSourceWebCoreChangeLog">branches/safari-600.3-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreWebCoreexpin">branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreeditingmacDictionaryLookupmm">branches/safari-600.3-branch/Source/WebCore/editing/mac/DictionaryLookup.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreplatformmacWebCoreSystemInterfaceh">branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreplatformmacWebCoreSystemInterfacemm">branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKitmacChangeLog">branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebKitmacWebCoreSupportWebSystemInterfacemm">branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKitmacWebViewWebActionMenuControllermm">branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2ChangeLog">branches/safari-600.3-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2ConfigurationsBaseTargetxcconfig">branches/safari-600.3-branch/Source/WebKit2/Configurations/BaseTarget.xcconfig</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2SharedDictionaryPopupInfocpp">branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2SharedDictionaryPopupInfoh">branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessAPImacWKViewmm">branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessAPImacWKViewInternalh">branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessPageClienth">branches/safari-600.3-branch/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessWebPageProxymessagesin">branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessiosWebPageProxyIOSmm">branches/safari-600.3-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessmacPageClientImplh">branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessmacPageClientImplmm">branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessmacTextIndicatorWindowh">branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessmacTextIndicatorWindowmm">branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessmacWKActionMenuControllermm">branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessmacWebPageProxyMacmm">branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessPluginsPDFPDFPluginmm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportmacWebSystemInterfacemm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagemacWebPageMacmm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6003branchSourceWebCoreplatformspimacLookupSPIh">branches/safari-600.3-branch/Source/WebCore/platform/spi/mac/LookupSPI.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6003branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/ChangeLog (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/ChangeLog        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebCore/ChangeLog        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -1,5 +1,35 @@
</span><span class="cx"> 2014-11-18  Dana Burkart  &lt;dburkart@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r176164. rdar://problem/18953982
+
+    2014-11-16  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+            Use TextIndicator instead of the built in Lookup highlight
+            https://bugs.webkit.org/show_bug.cgi?id=138775
+            &lt;rdar://problem/18953982&gt;
+
+            Reviewed by Anders Carlsson.
+
+            * WebCore.exp.in:
+            * platform/mac/WebCoreSystemInterface.h:
+            * platform/mac/WebCoreSystemInterface.mm:
+            Remove a WKSI import/export that we don't need anymore.
+            
+            * platform/spi/mac/LookupSPI.h: Added.
+            (WebCore::canDisableLookupIndicator):
+            Add Lookup SPI header.
+            Add a 'canDisableLookupIndicator', which must be called in any translation
+            unit that wants to use either of the soft-linked constants related to
+            that functionality, before calling the get* function.
+
+            * WebCore.xcodeproj/project.pbxproj:
+            * editing/mac/DictionaryLookup.mm:
+            (WebCore::rangeForDictionaryLookupForSelection):
+            (WebCore::rangeForDictionaryLookupAtHitTestResult):
+            Adopt the Lookup SPI header.
+
+2014-11-18  Dana Burkart  &lt;dburkart@apple.com&gt;
+
</ins><span class="cx">         Merge r176108. rdar://problem/19005904
</span><span class="cx"> 
</span><span class="cx">     2014-11-13  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -2420,7 +2420,6 @@
</span><span class="cx"> _wkDrawMediaUIPart
</span><span class="cx"> _wkDrawTextFieldCellFocusRing
</span><span class="cx"> _wkExecutableWasLinkedOnOrBeforeSnowLeopard
</span><del>-_wkExtractWordDefinitionTokenRangeFromContextualString
</del><span class="cx"> _wkGetAXTextMarkerRangeTypeID
</span><span class="cx"> _wkGetAXTextMarkerTypeID
</span><span class="cx"> _wkGetBytesFromAXTextMarker
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -1083,6 +1083,7 @@
</span><span class="cx">                 2D3EF4491917915C00034184 /* WebActionDisablingCALayerDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D3EF4451917915C00034184 /* WebActionDisablingCALayerDelegate.mm */; };
</span><span class="cx">                 2D3EF44A1917915C00034184 /* WebCoreCALayerExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D3EF4461917915C00034184 /* WebCoreCALayerExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2D3EF44B1917915C00034184 /* WebCoreCALayerExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D3EF4471917915C00034184 /* WebCoreCALayerExtras.mm */; };
</span><ins>+                2D413F611A187A3F0041A521 /* LookupSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D413F601A187A3F0041A521 /* LookupSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 2D46F04E17B96FBD005647F0 /* IntPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D46F04D17B96FBD005647F0 /* IntPoint.cpp */; };
</span><span class="cx">                 2D46F05017B96FD2005647F0 /* IntSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D46F04F17B96FD2005647F0 /* IntSize.cpp */; };
</span><span class="cx">                 2D481F00146B5C4C00AA7834 /* CrossfadeGeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D2FC0541460CD6F00263633 /* CrossfadeGeneratedImage.cpp */; };
</span><span class="lines">@@ -8106,6 +8107,7 @@
</span><span class="cx">                 2D3EF4451917915C00034184 /* WebActionDisablingCALayerDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebActionDisablingCALayerDelegate.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D3EF4461917915C00034184 /* WebCoreCALayerExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreCALayerExtras.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D3EF4471917915C00034184 /* WebCoreCALayerExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreCALayerExtras.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                2D413F601A187A3F0041A521 /* LookupSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LookupSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2D46F04D17B96FBD005647F0 /* IntPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntPoint.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D46F04F17B96FD2005647F0 /* IntSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntSize.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D58D8531A15F65F00A5F726 /* DataDetection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataDetection.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17629,6 +17631,7 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 2D59F1BE1A0044C6001F3D29 /* DataDetectorsSPI.h */,
</span><ins>+                                2D413F601A187A3F0041A521 /* LookupSPI.h */,
</ins><span class="cx">                                 2DCB837719F99BBA00A7FBE4 /* NSSharingServicePickerSPI.h */,
</span><span class="cx">                                 2DCB837819F99BBA00A7FBE4 /* NSSharingServiceSPI.h */,
</span><span class="cx">                                 9348428119F1A9190009D5AE /* NSViewSPI.h */,
</span><span class="lines">@@ -23626,6 +23629,7 @@
</span><span class="cx">                                 A584FE2C1863870F00843B10 /* CommandLineAPIModule.h in Headers */,
</span><span class="cx">                                 A584FE2618637DAB00843B10 /* CommandLineAPIModuleSource.h in Headers */,
</span><span class="cx">                                 2D29ECC8192ECC8300984B78 /* DisplayRefreshMonitorManager.h in Headers */,
</span><ins>+                                2D413F611A187A3F0041A521 /* LookupSPI.h in Headers */,
</ins><span class="cx">                                 6550B6A2099DF0270090D781 /* Comment.h in Headers */,
</span><span class="cx">                                 E1FE137518402A6700892F13 /* CommonCryptoUtilities.h in Headers */,
</span><span class="cx">                                 37C236111097EE7700EF9F72 /* ComplexTextController.h in Headers */,
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreeditingmacDictionaryLookupmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/editing/mac/DictionaryLookup.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/editing/mac/DictionaryLookup.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebCore/editing/mac/DictionaryLookup.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #import &quot;FrameSelection.h&quot;
</span><span class="cx"> #import &quot;HTMLConverter.h&quot;
</span><span class="cx"> #import &quot;HitTestResult.h&quot;
</span><ins>+#import &quot;LookupSPI.h&quot;
</ins><span class="cx"> #import &quot;Page.h&quot;
</span><span class="cx"> #import &quot;Range.h&quot;
</span><span class="cx"> #import &quot;RenderObject.h&quot;
</span><span class="lines">@@ -115,8 +116,9 @@
</span><span class="cx">     String fullPlainTextString = plainText(makeRange(paragraphStart, paragraphEnd).get());
</span><span class="cx"> 
</span><span class="cx">     // Since we already have the range we want, we just need to grab the returned options.
</span><del>-    wkExtractWordDefinitionTokenRangeFromContextualString(fullPlainTextString, rangeToPass, options);
-    
</del><ins>+    if (Class luLookupDefinitionModule = getLULookupDefinitionModuleClass())
+        [luLookupDefinitionModule tokenRangeForString:fullPlainTextString range:rangeToPass options:options];
+
</ins><span class="cx">     return selectedRange.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -155,7 +157,9 @@
</span><span class="cx"> 
</span><span class="cx">     String fullPlainTextString = plainText(fullCharacterRange.get());
</span><span class="cx"> 
</span><del>-    NSRange extractedRange = wkExtractWordDefinitionTokenRangeFromContextualString(fullPlainTextString, rangeToPass, options);
</del><ins>+    NSRange extractedRange = NSMakeRange(rangeToPass.location, 0);
+    if (Class luLookupDefinitionModule = getLULookupDefinitionModuleClass())
+        extractedRange = [luLookupDefinitionModule tokenRangeForString:fullPlainTextString range:rangeToPass options:options];
</ins><span class="cx"> 
</span><span class="cx">     // This function sometimes returns {NSNotFound, 0} if it was unable to determine a good string.
</span><span class="cx">     if (extractedRange.location == NSNotFound)
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreplatformmacWebCoreSystemInterfaceh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -288,8 +288,6 @@
</span><span class="cx"> 
</span><span class="cx"> extern bool (*wkExecutableWasLinkedOnOrBeforeSnowLeopard)(void);
</span><span class="cx"> 
</span><del>-extern NSRange (*wkExtractWordDefinitionTokenRangeFromContextualString)(NSString *contextString, NSRange range, NSDictionary **options);
-
</del><span class="cx"> extern CFStringRef (*wkCopyDefaultSearchProviderDisplayName)(void);
</span><span class="cx"> 
</span><span class="cx"> extern NSCursor *(*wkCursor)(const char*);
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreplatformmacWebCoreSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -146,8 +146,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool (*wkExecutableWasLinkedOnOrBeforeSnowLeopard)(void);
</span><span class="cx"> 
</span><del>-NSRange (*wkExtractWordDefinitionTokenRangeFromContextualString)(NSString *contextString, NSRange range, NSDictionary **options);
-
</del><span class="cx"> CFStringRef (*wkCopyDefaultSearchProviderDisplayName)(void);
</span><span class="cx"> void (*wkSetCrashReportApplicationSpecificInformation)(CFStringRef);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreplatformspimacLookupSPIhfromrev176164trunkSourceWebCoreplatformspimacLookupSPIh"></a>
<div class="copfile"><h4>Copied: branches/safari-600.3-branch/Source/WebCore/platform/spi/mac/LookupSPI.h (from rev 176164, trunk/Source/WebCore/platform/spi/mac/LookupSPI.h) (0 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/platform/spi/mac/LookupSPI.h                                (rev 0)
+++ branches/safari-600.3-branch/Source/WebCore/platform/spi/mac/LookupSPI.h        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+/*
+ * 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. ``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
+ * 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;SoftLinking.h&quot;
+#import &lt;objc/runtime.h&gt;
+
+#if PLATFORM(MAC)
+
+SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(Lookup)
+SOFT_LINK_CLASS_OPTIONAL(Lookup, LULookupDefinitionModule)
+
+SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUTermOptionDisableSearchTermIndicator, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUNotificationPopoverWillClose, NSString *)
+
+namespace WebCore {
+inline bool canDisableLookupIndicator()
+{
+    return canLoadLUTermOptionDisableSearchTermIndicator() &amp;&amp; canLoadLUNotificationPopoverWillClose();
+}
+};
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import &lt;Lookup/Lookup.h&gt;
+
+#else
+
+@interface LULookupDefinitionModule : NSObject
+
++ (NSRange)tokenRangeForString:(NSString *)string range:(NSRange)range options:(NSDictionary **)options;
++ (void)showDefinitionForTerm:(NSAttributedString *)term atLocation:(NSPoint)screenPoint options:(NSDictionary *)options;
++ (void)hideDefinition;
+
+@end
+
+#endif // !USE(APPLE_INTERNAL_SDK)
+
+#endif // PLATFORM(MAC)
</ins></span></pre></div>
<a id="branchessafari6003branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2014-11-18  Dana Burkart  &lt;dburkart@apple.com&gt;
+
+        Merge r176164. rdar://problem/18953982
+        
+    2014-11-16  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+            Use TextIndicator instead of the built in Lookup highlight
+            https://bugs.webkit.org/show_bug.cgi?id=138775
+            &lt;rdar://problem/18953982&gt;
+
+            Reviewed by Anders Carlsson.
+
+            * WebCoreSupport/WebSystemInterface.mm:
+            (InitWebCoreSystemInterface):
+            Remove a WKSI import.
+
+            * WebView/WebActionMenuController.mm:
+            (-[WebActionMenuController _lookupText:]):
+            (-[WebActionMenuController _createActionMenuItemForTag:]):
+            Make use of the new Lookup SPI header.
+            Disable the Lookup item if lookup is not available.
+
</ins><span class="cx"> 2014-11-17  Dana Burkart  &lt;dburkart@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r176145. &lt;rdar://problem/18989840&gt;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKitmacWebCoreSupportWebSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -163,7 +163,6 @@
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">     INIT(RecommendedScrollerStyle);
</span><span class="cx">     INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
</span><del>-    INIT(ExtractWordDefinitionTokenRangeFromContextualString);
</del><span class="cx">     INIT(CopyDefaultSearchProviderDisplayName);
</span><span class="cx">     INIT(Cursor);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKitmacWebViewWebActionMenuControllermm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> #import &lt;WebCore/FrameView.h&gt;
</span><span class="cx"> #import &lt;WebCore/HTMLConverter.h&gt;
</span><span class="cx"> #import &lt;WebCore/LocalizedStrings.h&gt;
</span><ins>+#import &lt;WebCore/LookupSPI.h&gt;
</ins><span class="cx"> #import &lt;WebCore/NSSharingServicePickerSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/NSSharingServiceSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/NSViewSPI.h&gt;
</span><span class="lines">@@ -564,7 +565,7 @@
</span><span class="cx">     // Convert to screen coordinates.
</span><span class="cx">     textBaselineOrigin = [_webView.window convertRectToScreen:NSMakeRect(textBaselineOrigin.x, textBaselineOrigin.y, 0, 0)].origin;
</span><span class="cx"> 
</span><del>-    WKShowWordDefinitionWindow(popupInfo.attributedString.get(), textBaselineOrigin, popupInfo.options.get());
</del><ins>+    [getLULookupDefinitionModuleClass() showDefinitionForTerm:popupInfo.attributedString.get() atLocation:textBaselineOrigin options:popupInfo.options.get()];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_paste:(id)sender
</span><span class="lines">@@ -690,6 +691,7 @@
</span><span class="cx">     SEL selector = nullptr;
</span><span class="cx">     NSString *title = nil;
</span><span class="cx">     NSImage *image = nil;
</span><ins>+    bool enabled = true;
</ins><span class="cx"> 
</span><span class="cx">     switch (tag) {
</span><span class="cx">     case WebActionMenuItemTagOpenLinkInDefaultBrowser:
</span><span class="lines">@@ -720,6 +722,7 @@
</span><span class="cx">         selector = @selector(_lookupText:);
</span><span class="cx">         title = WEB_UI_STRING_KEY(&quot;Look Up&quot;, &quot;Look Up (action menu item)&quot;, &quot;action menu item&quot;);
</span><span class="cx">         image = [NSImage imageNamed:@&quot;NSActionMenuLookup&quot;];
</span><ins>+        enabled = getLULookupDefinitionModuleClass();
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case WebActionMenuItemTagPaste:
</span><span class="lines">@@ -782,6 +785,7 @@
</span><span class="cx">     [item setImage:image];
</span><span class="cx">     [item setTarget:self];
</span><span class="cx">     [item setTag:tag];
</span><ins>+    [item setEnabled:enabled];
</ins><span class="cx">     return item;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/ChangeLog (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/ChangeLog        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/ChangeLog        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -1,5 +1,100 @@
</span><span class="cx"> 2014-11-18  Dana Burkart  &lt;dburkart@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r176164. rdar://problem/18953982
+
+    2014-11-16  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+            Use TextIndicator instead of the built in Lookup highlight
+            https://bugs.webkit.org/show_bug.cgi?id=138775
+            &lt;rdar://problem/18953982&gt;
+
+            Reviewed by Anders Carlsson.
+
+            In order to make the yellow highlight for Lookup more accurately match the
+            painted content of the web page (in light of e.g. Web fonts, and interesting
+            text features that only WebKit implements and cannot round-trip through
+            NSAttributedString), use a TextIndicator instead of the built-in Lookup
+            highlight where possible.
+
+            * Configurations/BaseTarget.xcconfig:
+            Make it possible to include headers from private frameworks. This matches WebCore.
+
+            * Shared/DictionaryPopupInfo.cpp:
+            (WebKit::DictionaryPopupInfo::encode):
+            (WebKit::DictionaryPopupInfo::decode):
+            * Shared/DictionaryPopupInfo.h:
+            Include the attributed string inside the DictionaryPopupInfo, instead of
+            as a secondary argument to DidPerformDictionaryLookup.
+            Add a TextIndicator to DictionaryPopupInfo, which can be used to highlight
+            the text in the UI process.
+
+            * UIProcess/API/mac/WKView.mm:
+            (-[WKView dealloc]):
+            (-[WKView viewDidMoveToWindow]):
+            (-[WKView _dictionaryLookupPopoverWillClose:]):
+            (-[WKView _setTextIndicator:fadeOut:animate:animationCompletionHandler:]):
+            (-[WKView _setTextIndicator:fadeOut:animate:]):
+            (-[WKView initWithFrame:context:configuration:webView:]):
+            (+[WKView hideWordDefinitionWindow]):
+            * UIProcess/API/mac/WKViewInternal.h:
+            Adopt the Lookup SPI header.
+            If we have the requisite API, register the notification that Lookup sends
+            when the popover closes, and hook that up to hide the text indicator.
+            Add a version of _setTextIndicator: that takes an animation completion handler.
+
+            * UIProcess/PageClient.h:
+            * UIProcess/WebPageProxy.h:
+            * UIProcess/WebPageProxy.messages.in:
+            * UIProcess/ios/WebPageProxyIOS.mm:
+            (WebKit::WebPageProxy::didPerformDictionaryLookup):
+            * UIProcess/mac/WebPageProxyMac.mm:
+            (WebKit::WebPageProxy::didPerformDictionaryLookup):
+            Adjust to the new didPerformDictionaryLookup signature.
+
+            * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+            (InitWebCoreSystemInterface):
+            Remove a WKSI import.
+
+            * UIProcess/mac/PageClientImpl.h:
+            * UIProcess/mac/PageClientImpl.mm:
+            (WebKit::PageClientImpl::didPerformDictionaryLookup):
+            If we have the requisite API, disable Lookup's built-in highlight and
+            present a TextIndicator instead.
+            We currently have to run the animations serially (first bounce the TextIndicator,
+            then animate in the Lookup popover) because the act of adding the Lookup popover
+            blocks us from getting any animation events for the TextIndicator, and breaks
+            the bounce. We could also fix this by using a threaded animation for the TextIndicator,
+            but it's not clear that it's safe to do so.
+
+            (WebKit::PageClientImpl::dismissDictionaryLookupPanel):
+            When explicitly dismissing the Lookup panel, also hide the text indicator.
+
+            * UIProcess/mac/TextIndicatorWindow.h:
+            * UIProcess/mac/TextIndicatorWindow.mm:
+            (WebKit::TextIndicatorWindow::setTextIndicator):
+            Store the completion handler.
+
+            (WebKit::TextIndicatorWindow::bounceAnimationDidEnd):
+            Call the completion handler when the animation completes.
+
+            * UIProcess/mac/WKActionMenuController.mm:
+            (-[WKActionMenuController _createActionMenuItemForTag:]):
+            Disable the Lookup item if lookup is not available.
+
+            * WebProcess/Plugins/PDF/PDFPlugin.mm:
+            (WebKit::PDFPlugin::showDefinitionForAttributedString):
+            Adjust to the new didPerformDictionaryLookup signature.
+            Since PDFPlugin can't trivially repaint the required part of the PDF,
+            we don't build a TextIndicator. This will result in PDFPlugin continuing
+            to use Lookup's built-in highlight.
+            
+            * WebProcess/WebPage/mac/WebPageMac.mm:
+            (WebKit::WebPage::performDictionaryLookupForRange):
+            Build a TextIndicator from the Lookup range and pass it along with
+            the DictionaryPopupInfo.
+
+2014-11-18  Dana Burkart  &lt;dburkart@apple.com&gt;
+
</ins><span class="cx">         Merge r176108. rdar://problem/19005904
</span><span class="cx"> 
</span><span class="cx">     2014-11-13  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2ConfigurationsBaseTargetxcconfig"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/Configurations/BaseTarget.xcconfig (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/Configurations/BaseTarget.xcconfig        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/Configurations/BaseTarget.xcconfig        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) FRAMEWORK_NAME=WebKit
</span><span class="cx"> HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(WEBCORE_PRIVATE_HEADERS_DIR)/icu $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2 $(HEADER_SEARCH_PATHS);
</span><span class="cx"> 
</span><del>-OTHER_CFLAGS = $(inherited) -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks;
</del><ins>+OTHER_CFLAGS = $(inherited) -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
</ins><span class="cx"> OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS);
</span><span class="cx"> 
</span><span class="cx"> NORMAL_WEBKIT_FRAMEWORKS_DIR = $(SYSTEM_LIBRARY_DIR)/Frameworks;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2SharedDictionaryPopupInfocpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.cpp (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.cpp        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.cpp        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -37,12 +37,15 @@
</span><span class="cx"> void DictionaryPopupInfo::encode(IPC::ArgumentEncoder&amp; encoder) const
</span><span class="cx"> {
</span><span class="cx">     encoder &lt;&lt; origin;
</span><ins>+    encoder &lt;&lt; textIndicator;
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     bool hadOptions = options;
</span><span class="cx">     encoder &lt;&lt; hadOptions;
</span><span class="cx">     if (hadOptions)
</span><span class="cx">         IPC::encode(encoder, options.get());
</span><ins>+
+    encoder &lt;&lt; attributedString;
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -50,6 +53,10 @@
</span><span class="cx"> {
</span><span class="cx">     if (!decoder.decode(result.origin))
</span><span class="cx">         return false;
</span><ins>+
+    if (!decoder.decode(result.textIndicator))
+        return false;
+
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     bool hadOptions;
</span><span class="cx">     if (!decoder.decode(hadOptions))
</span><span class="lines">@@ -58,6 +65,9 @@
</span><span class="cx">         if (!IPC::decode(decoder, result.options))
</span><span class="cx">             return false;
</span><span class="cx">     }
</span><ins>+
+    if (!decoder.decode(result.attributedString))
+        return false;
</ins><span class="cx"> #endif
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2SharedDictionaryPopupInfoh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.h (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.h        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/Shared/DictionaryPopupInfo.h        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -26,15 +26,17 @@
</span><span class="cx"> #ifndef DictionaryPopupInfo_h
</span><span class="cx"> #define DictionaryPopupInfo_h
</span><span class="cx"> 
</span><ins>+#include &quot;TextIndicator.h&quot;
</ins><span class="cx"> #include &lt;WebCore/FloatPoint.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><ins>+#include &quot;AttributedString.h&quot;
</ins><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace IPC {
</span><del>-    class ArgumentDecoder;
-    class ArgumentEncoder;
</del><ins>+class ArgumentDecoder;
+class ArgumentEncoder;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -44,8 +46,10 @@
</span><span class="cx">     static bool decode(IPC::ArgumentDecoder&amp;, DictionaryPopupInfo&amp;);
</span><span class="cx"> 
</span><span class="cx">     WebCore::FloatPoint origin;
</span><ins>+    TextIndicator::Data textIndicator;
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     RetainPtr&lt;CFDictionaryRef&gt; options;
</span><ins>+    AttributedString attributedString;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -88,6 +88,7 @@
</span><span class="cx"> #import &lt;WebCore/FileSystem.h&gt;
</span><span class="cx"> #import &lt;WebCore/KeyboardEvent.h&gt;
</span><span class="cx"> #import &lt;WebCore/LocalizedStrings.h&gt;
</span><ins>+#import &lt;WebCore/LookupSPI.h&gt;
</ins><span class="cx"> #import &lt;WebCore/NSViewSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/PlatformEventFactoryMac.h&gt;
</span><span class="cx"> #import &lt;WebCore/PlatformScreen.h&gt;
</span><span class="lines">@@ -325,6 +326,9 @@
</span><span class="cx"> 
</span><span class="cx">     [[NSNotificationCenter defaultCenter] removeObserver:self name:NSApplicationWillTerminateNotification object:NSApp];
</span><span class="cx"> 
</span><ins>+    if (canDisableLookupIndicator())
+        [[NSNotificationCenter defaultCenter] removeObserver:self name:getLUNotificationPopoverWillClose() object:nil];
+
</ins><span class="cx">     WebContext::statistics().wkViewCount--;
</span><span class="cx"> 
</span><span class="cx">     [super dealloc];
</span><span class="lines">@@ -2553,7 +2557,8 @@
</span><span class="cx">         [NSEvent removeMonitor:_data-&gt;_flagsChangedEventMonitor];
</span><span class="cx">         _data-&gt;_flagsChangedEventMonitor = nil;
</span><span class="cx"> 
</span><del>-        WKHideWordDefinitionWindow();
</del><ins>+        if (getLULookupDefinitionModuleClass())
+            [getLULookupDefinitionModuleClass() hideDefinition];
</ins><span class="cx">         [self _dismissActionMenuPopovers];
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2689,6 +2694,11 @@
</span><span class="cx">     _data-&gt;_page-&gt;process().context().applicationWillTerminate();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)_dictionaryLookupPopoverWillClose:(NSNotification *)notification
+{
+    [self _setTextIndicator:nil fadeOut:NO animate:NO];
+}
+
</ins><span class="cx"> - (void)_accessibilityRegisterUIProcessTokens
</span><span class="cx"> {
</span><span class="cx">     // Initialize remote accessibility when the window connection has been established.
</span><span class="lines">@@ -3057,7 +3067,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_setTextIndicator:(PassRefPtr&lt;TextIndicator&gt;)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate
</del><ins>+- (void)_setTextIndicator:(PassRefPtr&lt;TextIndicator&gt;)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate animationCompletionHandler:(std::function&lt;void ()&gt;)completionHandler
</ins><span class="cx"> {
</span><span class="cx">     if (!textIndicator) {
</span><span class="cx">         _data-&gt;_textIndicatorWindow = nullptr;
</span><span class="lines">@@ -3067,9 +3077,14 @@
</span><span class="cx">     if (!_data-&gt;_textIndicatorWindow)
</span><span class="cx">         _data-&gt;_textIndicatorWindow = std::make_unique&lt;TextIndicatorWindow&gt;(self);
</span><span class="cx"> 
</span><del>-    _data-&gt;_textIndicatorWindow-&gt;setTextIndicator(textIndicator, fadeOut, animate);
</del><ins>+    _data-&gt;_textIndicatorWindow-&gt;setTextIndicator(textIndicator, fadeOut, animate, WTF::move(completionHandler));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)_setTextIndicator:(PassRefPtr&lt;TextIndicator&gt;)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate
+{
+    [self _setTextIndicator:textIndicator fadeOut:fadeOut animate:animate animationCompletionHandler:[] {}];
+}
+
</ins><span class="cx"> - (CALayer *)_rootLayer
</span><span class="cx"> {
</span><span class="cx">     return [_data-&gt;_layerHostingView layer];
</span><span class="lines">@@ -3559,6 +3574,9 @@
</span><span class="cx"> 
</span><span class="cx">     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:NSApp];
</span><span class="cx"> 
</span><ins>+    if (canDisableLookupIndicator())
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:getLUNotificationPopoverWillClose() object:nil];
+
</ins><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><span class="cx">     if ([self respondsToSelector:@selector(setActionMenu:)]) {
</span><span class="cx">         RetainPtr&lt;NSMenu&gt; menu = adoptNS([[NSMenu alloc] init]);
</span><span class="lines">@@ -3801,7 +3819,9 @@
</span><span class="cx"> 
</span><span class="cx"> + (void)hideWordDefinitionWindow
</span><span class="cx"> {
</span><del>-    WKHideWordDefinitionWindow();
</del><ins>+    if (!getLULookupDefinitionModuleClass())
+        return;
+    [getLULookupDefinitionModuleClass() hideDefinition];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (CGFloat)minimumLayoutWidth
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessAPImacWKViewInternalh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -81,6 +81,7 @@
</span><span class="cx"> - (NSRect)_convertToDeviceSpace:(NSRect)rect;
</span><span class="cx"> - (NSRect)_convertToUserSpace:(NSRect)rect;
</span><span class="cx"> - (void)_setTextIndicator:(PassRefPtr&lt;WebKit::TextIndicator&gt;)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate;
</span><ins>+- (void)_setTextIndicator:(PassRefPtr&lt;WebKit::TextIndicator&gt;)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate animationCompletionHandler:(std::function&lt;void ()&gt;)completionHandler;
</ins><span class="cx"> 
</span><span class="cx"> - (void)_setAcceleratedCompositingModeRootLayer:(CALayer *)rootLayer;
</span><span class="cx"> - (CALayer *)_acceleratedCompositingModeRootLayer;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/PageClient.h (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/PageClient.h        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/PageClient.h        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -223,7 +223,7 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     virtual void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus) = 0;
</span><span class="cx">     virtual void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, PluginComplexTextInputState) = 0;
</span><del>-    virtual void didPerformDictionaryLookup(const AttributedString&amp;, const DictionaryPopupInfo&amp;) = 0;
</del><ins>+    virtual void didPerformDictionaryLookup(const DictionaryPopupInfo&amp;) = 0;
</ins><span class="cx">     virtual void dismissDictionaryLookupPanel() = 0;
</span><span class="cx">     virtual void dismissActionMenuPopovers() = 0;
</span><span class="cx">     virtual void showCorrectionPanel(WebCore::AlternativeTextType, const WebCore::FloatRect&amp; boundingBoxOfReplacedString, const String&amp; replacedString, const String&amp; replacementString, const Vector&lt;String&gt;&amp; alternativeReplacementStrings) = 0;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.h (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -1148,7 +1148,7 @@
</span><span class="cx">     void searchTheWeb(const String&amp;);
</span><span class="cx"> 
</span><span class="cx">     // Dictionary.
</span><del>-    void didPerformDictionaryLookup(const AttributedString&amp;, const DictionaryPopupInfo&amp;);
</del><ins>+    void didPerformDictionaryLookup(const DictionaryPopupInfo&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // Spelling and grammar.
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -287,7 +287,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     # Dictionary support.
</span><del>-    DidPerformDictionaryLookup(WebKit::AttributedString text, WebKit::DictionaryPopupInfo dictionaryPopupInfo)
</del><ins>+    DidPerformDictionaryLookup(WebKit::DictionaryPopupInfo dictionaryPopupInfo)
</ins><span class="cx"> 
</span><span class="cx">     # Keyboard input support messages
</span><span class="cx">     ExecuteSavedCommandBySelector(String selector) -&gt; (bool handled)
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -750,7 +750,7 @@
</span><span class="cx">     process().send(Messages::WebPage::SetAssistedNodeSelectedIndex(index, allowMultipleSelection), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::didPerformDictionaryLookup(const AttributedString&amp;, const DictionaryPopupInfo&amp;)
</del><ins>+void WebPageProxy::didPerformDictionaryLookup(const DictionaryPopupInfo&amp;)
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void makeFirstResponder();
</span><span class="cx">     
</span><del>-    virtual void didPerformDictionaryLookup(const AttributedString&amp;, const DictionaryPopupInfo&amp;);
</del><ins>+    virtual void didPerformDictionaryLookup(const DictionaryPopupInfo&amp;);
</ins><span class="cx">     virtual void dismissDictionaryLookupPanel();
</span><span class="cx">     virtual void dismissActionMenuPopovers();
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx"> #import &lt;WebCore/GraphicsContext.h&gt;
</span><span class="cx"> #import &lt;WebCore/Image.h&gt;
</span><span class="cx"> #import &lt;WebCore/KeyboardEvent.h&gt;
</span><ins>+#import &lt;WebCore/LookupSPI.h&gt;
</ins><span class="cx"> #import &lt;WebCore/NotImplemented.h&gt;
</span><span class="cx"> #import &lt;WebCore/SharedBuffer.h&gt;
</span><span class="cx"> #import &lt;WebCore/TextUndoInsertionMarkupMac.h&gt;
</span><span class="lines">@@ -529,22 +530,39 @@
</span><span class="cx">     [m_wkView _setPluginComplexTextInputState:pluginComplexTextInputState pluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void PageClientImpl::didPerformDictionaryLookup(const AttributedString&amp; text, const DictionaryPopupInfo&amp; dictionaryPopupInfo)
</del><ins>+void PageClientImpl::didPerformDictionaryLookup(const DictionaryPopupInfo&amp; dictionaryPopupInfo)
</ins><span class="cx"> {
</span><del>-    RetainPtr&lt;NSAttributedString&gt; attributedString = text.string;
</del><ins>+    if (!getLULookupDefinitionModuleClass())
+        return;
+
</ins><span class="cx">     NSPoint textBaselineOrigin = dictionaryPopupInfo.origin;
</span><span class="cx"> 
</span><span class="cx">     // Convert to screen coordinates.
</span><span class="cx">     textBaselineOrigin = [m_wkView convertPoint:textBaselineOrigin toView:nil];
</span><span class="cx">     textBaselineOrigin = [m_wkView.window convertRectToScreen:NSMakeRect(textBaselineOrigin.x, textBaselineOrigin.y, 0, 0)].origin;
</span><span class="cx"> 
</span><del>-    WKShowWordDefinitionWindow(attributedString.get(), textBaselineOrigin, (NSDictionary *)dictionaryPopupInfo.options.get());
</del><ins>+    RetainPtr&lt;NSMutableDictionary&gt; mutableOptions = adoptNS([(NSDictionary *)dictionaryPopupInfo.options.get() mutableCopy]);
+
+    if (canDisableLookupIndicator() &amp;&amp; dictionaryPopupInfo.textIndicator.contentImage) {
+        // Run the animations serially because attaching another subwindow breaks the bounce animation.
+        // We could consider making the bounce NSAnimationNonblockingThreaded instead, which seems
+        // to work, but need to consider all of the implications.
+        [m_wkView _setTextIndicator:TextIndicator::create(dictionaryPopupInfo.textIndicator) fadeOut:NO animate:YES animationCompletionHandler:[dictionaryPopupInfo, textBaselineOrigin, mutableOptions] {
+            [mutableOptions setObject:@YES forKey:getLUTermOptionDisableSearchTermIndicator()];
+            [getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.string.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
+        }];
+    } else
+        [getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.string.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::dismissDictionaryLookupPanel()
</span><span class="cx"> {
</span><ins>+    if (!getLULookupDefinitionModuleClass())
+        return;
+
</ins><span class="cx">     // FIXME: We don't know which panel we are dismissing, it may not even be in the current page (see &lt;rdar://problem/13875766&gt;).
</span><del>-    WKHideWordDefinitionWindow();
</del><ins>+    [getLULookupDefinitionModuleClass() hideDefinition];
+    setTextIndicator(nil, false, true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::dismissActionMenuPopovers()
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessmacTextIndicatorWindowh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> 
</span><span class="cx"> #import &quot;WebKitSystemInterface.h&quot;
</span><ins>+#import &lt;functional&gt;
</ins><span class="cx"> #import &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #import &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="lines">@@ -48,7 +49,7 @@
</span><span class="cx">     explicit TextIndicatorWindow(WKView *);
</span><span class="cx">     ~TextIndicatorWindow();
</span><span class="cx"> 
</span><del>-    void setTextIndicator(PassRefPtr&lt;TextIndicator&gt;, bool fadeOut, bool animate);
</del><ins>+    void setTextIndicator(PassRefPtr&lt;TextIndicator&gt;, bool fadeOut, bool animate, std::function&lt;void ()&gt; animationCompletionHandler);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void closeWindow();
</span><span class="lines">@@ -70,6 +71,8 @@
</span><span class="cx"> 
</span><span class="cx">     RunLoop::Timer&lt;TextIndicatorWindow&gt; m_startFadeOutTimer;
</span><span class="cx">     RetainPtr&lt;WKTextIndicatorWindowAnimation&gt; m_fadeOutAnimation;
</span><ins>+
+    std::function&lt;void ()&gt; m_bounceAnimationCompletionHandler;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessmacTextIndicatorWindowmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">     closeWindow();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TextIndicatorWindow::setTextIndicator(PassRefPtr&lt;TextIndicator&gt; textIndicator, bool fadeOut, bool animate)
</del><ins>+void TextIndicatorWindow::setTextIndicator(PassRefPtr&lt;TextIndicator&gt; textIndicator, bool fadeOut, bool animate, std::function&lt;void ()&gt; animationCompletionHandler)
</ins><span class="cx"> {
</span><span class="cx">     if (m_textIndicator == textIndicator)
</span><span class="cx">         return;
</span><span class="lines">@@ -154,6 +154,7 @@
</span><span class="cx">     [m_textIndicatorWindow setReleasedWhenClosed:NO];
</span><span class="cx"> 
</span><span class="cx">     if (animate) {
</span><ins>+        m_bounceAnimationCompletionHandler = WTF::move(animationCompletionHandler);
</ins><span class="cx">         // Start the bounce animation.
</span><span class="cx">         m_bounceAnimationContext = WKWindowBounceAnimationContextCreate(m_textIndicatorWindow.get());
</span><span class="cx">         m_bounceAnimation = adoptNS([[WKTextIndicatorWindowAnimation alloc] _initWithTextIndicatorWindow:this animationDuration:bounceAnimationDuration
</span><span class="lines">@@ -230,6 +231,7 @@
</span><span class="cx"> 
</span><span class="cx">     WKWindowBounceAnimationContextDestroy(m_bounceAnimationContext);
</span><span class="cx">     m_bounceAnimationContext = 0;
</span><ins>+    m_bounceAnimationCompletionHandler();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessmacWKActionMenuControllermm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> #import &lt;WebCore/DataDetectorsSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/GeometryUtilities.h&gt;
</span><span class="cx"> #import &lt;WebCore/LocalizedStrings.h&gt;
</span><ins>+#import &lt;WebCore/LookupSPI.h&gt;
</ins><span class="cx"> #import &lt;WebCore/NSSharingServiceSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/NSSharingServicePickerSPI.h&gt;
</span><span class="cx"> #import &lt;WebCore/NSViewSPI.h&gt;
</span><span class="lines">@@ -756,6 +757,7 @@
</span><span class="cx">     SEL selector = nullptr;
</span><span class="cx">     NSString *title = nil;
</span><span class="cx">     NSImage *image = nil;
</span><ins>+    bool enabled = true;
</ins><span class="cx"> 
</span><span class="cx">     switch (tag) {
</span><span class="cx">     case kWKContextActionItemTagOpenLinkInDefaultBrowser:
</span><span class="lines">@@ -811,6 +813,7 @@
</span><span class="cx">         selector = @selector(_lookupText:);
</span><span class="cx">         title = WEB_UI_STRING_KEY(&quot;Look Up&quot;, &quot;Look Up (action menu item)&quot;, &quot;action menu item&quot;);
</span><span class="cx">         image = [NSImage imageNamed:@&quot;NSActionMenuLookup&quot;];
</span><ins>+        enabled = getLULookupDefinitionModuleClass();
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case kWKContextActionItemTagPaste:
</span><span class="lines">@@ -850,6 +853,7 @@
</span><span class="cx">     [item setImage:image];
</span><span class="cx">     [item setTarget:self];
</span><span class="cx">     [item setTag:tag];
</span><ins>+    [item setEnabled:enabled];
</ins><span class="cx">     return item;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -450,9 +450,9 @@
</span><span class="cx">     process().send(Messages::WebPage::SetSmartInsertDeleteEnabled(isSmartInsertDeleteEnabled), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::didPerformDictionaryLookup(const AttributedString&amp; text, const DictionaryPopupInfo&amp; dictionaryPopupInfo)
</del><ins>+void WebPageProxy::didPerformDictionaryLookup(const DictionaryPopupInfo&amp; dictionaryPopupInfo)
</ins><span class="cx"> {
</span><del>-    m_pageClient.didPerformDictionaryLookup(text, dictionaryPopupInfo);
</del><ins>+    m_pageClient.didPerformDictionaryLookup(dictionaryPopupInfo);
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> void WebPageProxy::registerWebProcessAccessibilityToken(const IPC::DataReference&amp; data)
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessPluginsPDFPDFPluginmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -1700,11 +1700,9 @@
</span><span class="cx"> {
</span><span class="cx">     DictionaryPopupInfo dictionaryPopupInfo;
</span><span class="cx">     dictionaryPopupInfo.origin = convertFromPDFViewToRootView(IntPoint(point));
</span><ins>+    dictionaryPopupInfo.attributedString.string = string;
</ins><span class="cx"> 
</span><del>-    AttributedString attributedString;
-    attributedString.string = string;
-
-    webFrame()-&gt;page()-&gt;send(Messages::WebPageProxy::DidPerformDictionaryLookup(attributedString, dictionaryPopupInfo));
</del><ins>+    webFrame()-&gt;page()-&gt;send(Messages::WebPageProxy::DidPerformDictionaryLookup(dictionaryPopupInfo));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned PDFPlugin::countFindMatches(const String&amp; target, WebCore::FindOptions options, unsigned maxMatchCount)
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportmacWebSystemInterfacemm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -153,7 +153,6 @@
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">         INIT(RecommendedScrollerStyle);
</span><span class="cx">         INIT(ExecutableWasLinkedOnOrBeforeSnowLeopard);
</span><del>-        INIT(ExtractWordDefinitionTokenRangeFromContextualString);
</del><span class="cx">         INIT(CopyDefaultSearchProviderDisplayName);
</span><span class="cx">         INIT(Cursor);
</span><span class="cx">         INIT(WindowSetScaledFrame);
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (176280 => 176281)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2014-11-18 21:01:15 UTC (rev 176280)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2014-11-18 21:28:10 UTC (rev 176281)
</span><span class="lines">@@ -543,10 +543,14 @@
</span><span class="cx">         [scaledNSAttributedString addAttributes:scaledAttributes.get() range:range];
</span><span class="cx">     }];
</span><span class="cx"> 
</span><del>-    AttributedString attributedString;
-    attributedString.string = scaledNSAttributedString;
</del><ins>+    RefPtr&lt;TextIndicator&gt; textIndicator = TextIndicator::createWithRange(range);
+    if (!textIndicator)
+        return;
</ins><span class="cx"> 
</span><del>-    send(Messages::WebPageProxy::DidPerformDictionaryLookup(attributedString, dictionaryPopupInfo));
</del><ins>+    dictionaryPopupInfo.textIndicator = textIndicator-&gt;data();
+    dictionaryPopupInfo.attributedString.string = scaledNSAttributedString;
+
+    send(Messages::WebPageProxy::DidPerformDictionaryLookup(dictionaryPopupInfo));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebPage::performNonEditingBehaviorForSelector(const String&amp; selector, KeyboardEvent* event)
</span></span></pre>
</div>
</div>

</body>
</html>