<!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>[176866] 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/176866">176866</a></dd>
<dt>Author</dt> <dd>dburkart@apple.com</dd>
<dt>Date</dt> <dd>2014-12-05 13:16:49 -0800 (Fri, 05 Dec 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/176810">r176810</a>. rdar://problems/19140827</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="#branchessafari6003branchSourceWebCorepageTextIndicatorcpp">branches/safari-600.3-branch/Source/WebCore/page/TextIndicator.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepageTextIndicatorh">branches/safari-600.3-branch/Source/WebCore/page/TextIndicator.h</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepagemacTextIndicatorWindowh">branches/safari-600.3-branch/Source/WebCore/page/mac/TextIndicatorWindow.h</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepagemacTextIndicatorWindowmm">branches/safari-600.3-branch/Source/WebCore/page/mac/TextIndicatorWindow.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKitmacChangeLog">branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebKitmacWebViewWebViewmm">branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2ChangeLog">branches/safari-600.3-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2SharedWebCoreArgumentCoderscpp">branches/safari-600.3-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessAPImacWKViewmm">branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageFindControllercpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.cpp</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 (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/ChangeLog        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebCore/ChangeLog        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2014-12-05 Dana Burkart <dburkart@apple.com>
+
+ Merge r176810. <rdar://problem/19140827>
+
+ 2014-12-04 Tim Horton <timothy_horton@apple.com>
+
+ TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=139252
+ <rdar://problem/19140827>
+
+ Reviewed by Anders Carlsson.
+
+ * WebCore.exp.in:
+ * page/TextIndicator.cpp:
+ (WebCore::TextIndicator::createWithSelectionInFrame):
+ (WebCore::TextIndicator::TextIndicator):
+ * page/TextIndicator.h:
+ (WebCore::TextIndicator::selectionRectInWindowCoordinates):
+ (WebCore::TextIndicator::textBoundingRectInWindowCoordinates):
+ (WebCore::TextIndicator::selectionRectInScreenCoordinates): Deleted.
+ (WebCore::TextIndicator::textBoundingRectInScreenCoordinates): Deleted.
+ Go back to keeping the rects in "window" coordinates.
+
+ * page/mac/TextIndicatorWindow.h:
+ * page/mac/TextIndicatorWindow.mm:
+ (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
+ (WebCore::TextIndicatorWindow::setTextIndicator):
+ Let callers pass in the contentRect instead of trying to share the code
+ to compute it, since it needs to be different for legacy and modern WebKit.
+
+
</ins><span class="cx"> 2014-12-05 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r176855.
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -2296,7 +2296,7 @@
</span><span class="cx"> __ZN7WebCore17ScrollbarThemeMac24removeOverhangAreaShadowEP7CALayer
</span><span class="cx"> __ZN7WebCore17ScrollbarThemeMac27setUpOverhangAreaBackgroundEP7CALayerRKNS_5ColorE
</span><span class="cx"> __ZN7WebCore17ScrollbarThemeMac28removeOverhangAreaBackgroundEP7CALayer
</span><del>-__ZN7WebCore19TextIndicatorWindow16setTextIndicatorEN3WTF10PassRefPtrINS_13TextIndicatorEEEbNSt3__18functionIFvvEEE
</del><ins>+__ZN7WebCore19TextIndicatorWindow16setTextIndicatorEN3WTF10PassRefPtrINS_13TextIndicatorEEE6CGRectbNSt3__18functionIFvvEEE
</ins><span class="cx"> __ZN7WebCore19TextIndicatorWindowC1EP6NSView
</span><span class="cx"> __ZN7WebCore19TextIndicatorWindowD1Ev
</span><span class="cx"> __ZN7WebCore19applicationIsSafariEv
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepageTextIndicatorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/TextIndicator.cpp (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/TextIndicator.cpp        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebCore/page/TextIndicator.cpp        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx">
</span><span class="cx"> // Store the selection rect in window coordinates, to be used subsequently
</span><span class="cx"> // to determine if the indicator and selection still precisely overlap.
</span><del>- IntRect selectionRectInScreenCoordinates = frame.view()->contentsToScreen(selectionRect);
</del><ins>+ IntRect selectionRectInWindowCoordinates = frame.view()->contentsToWindow(selectionRect);
</ins><span class="cx">
</span><span class="cx"> Vector<FloatRect> textRects;
</span><span class="cx"> frame.selection().getClippedVisibleTextRectangles(textRects);
</span><span class="lines">@@ -154,23 +154,23 @@
</span><span class="cx"> // The bounding rect of all the text rects can be different than the selection
</span><span class="cx"> // rect when the selection spans multiple lines; the indicator doesn't actually
</span><span class="cx"> // care where the selection highlight goes, just where the text actually is.
</span><del>- FloatRect textBoundingRectInScreenCoordinates;
- Vector<FloatRect> textRectsInScreenCoordinates;
</del><ins>+ FloatRect textBoundingRectInWindowCoordinates;
+ Vector<FloatRect> textRectsInWindowCoordinates;
</ins><span class="cx"> for (const FloatRect& textRect : textRects) {
</span><del>- FloatRect textRectInScreenCoordinates = frame.view()->contentsToScreen(enclosingIntRect(textRect));
- textRectsInScreenCoordinates.append(textRectInScreenCoordinates);
- textBoundingRectInScreenCoordinates.unite(textRectInScreenCoordinates);
</del><ins>+ FloatRect textRectInWindowCoordinates = frame.view()->contentsToWindow(enclosingIntRect(textRect));
+ textRectsInWindowCoordinates.append(textRectInWindowCoordinates);
+ textBoundingRectInWindowCoordinates.unite(textRectInWindowCoordinates);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Vector<FloatRect> textRectsInBoundingRectCoordinates;
</span><del>- for (auto rect : textRectsInScreenCoordinates) {
- rect.moveBy(-textBoundingRectInScreenCoordinates.location());
</del><ins>+ for (auto rect : textRectsInWindowCoordinates) {
+ rect.moveBy(-textBoundingRectInWindowCoordinates.location());
</ins><span class="cx"> textRectsInBoundingRectCoordinates.append(rect);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> TextIndicatorData data;
</span><del>- data.selectionRectInScreenCoordinates = selectionRectInScreenCoordinates;
- data.textBoundingRectInScreenCoordinates = textBoundingRectInScreenCoordinates;
</del><ins>+ data.selectionRectInWindowCoordinates = selectionRectInWindowCoordinates;
+ data.textBoundingRectInWindowCoordinates = textBoundingRectInWindowCoordinates;
</ins><span class="cx"> data.textRectsInBoundingRectCoordinates = textRectsInBoundingRectCoordinates;
</span><span class="cx"> data.contentImageScaleFactor = frame.page()->deviceScaleFactor();
</span><span class="cx"> data.contentImage = indicatorBitmap;
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx"> TextIndicator::TextIndicator(const TextIndicatorData& data)
</span><span class="cx"> : m_data(data)
</span><span class="cx"> {
</span><del>- ASSERT(m_data.contentImageScaleFactor != 1 || m_data.contentImage->size() == enclosingIntRect(m_data.selectionRectInScreenCoordinates).size());
</del><ins>+ ASSERT(m_data.contentImageScaleFactor != 1 || m_data.contentImage->size() == enclosingIntRect(m_data.selectionRectInWindowCoordinates).size());
</ins><span class="cx">
</span><span class="cx"> if (textIndicatorsForTextRectsOverlap(m_data.textRectsInBoundingRectCoordinates)) {
</span><span class="cx"> m_data.textRectsInBoundingRectCoordinates[0] = unionRect(m_data.textRectsInBoundingRectCoordinates);
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepageTextIndicatorh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/TextIndicator.h (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/TextIndicator.h        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebCore/page/TextIndicator.h        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -51,8 +51,8 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> struct TextIndicatorData {
</span><del>- FloatRect selectionRectInScreenCoordinates;
- FloatRect textBoundingRectInScreenCoordinates;
</del><ins>+ FloatRect selectionRectInWindowCoordinates;
+ FloatRect textBoundingRectInWindowCoordinates;
</ins><span class="cx"> Vector<FloatRect> textRectsInBoundingRectCoordinates;
</span><span class="cx"> float contentImageScaleFactor;
</span><span class="cx"> RefPtr<Image> contentImageWithHighlight;
</span><span class="lines">@@ -68,8 +68,8 @@
</span><span class="cx">
</span><span class="cx"> ~TextIndicator();
</span><span class="cx">
</span><del>- FloatRect selectionRectInScreenCoordinates() const { return m_data.selectionRectInScreenCoordinates; }
- FloatRect textBoundingRectInScreenCoordinates() const { return m_data.textBoundingRectInScreenCoordinates; }
</del><ins>+ FloatRect selectionRectInWindowCoordinates() const { return m_data.selectionRectInWindowCoordinates; }
+ FloatRect textBoundingRectInWindowCoordinates() const { return m_data.textBoundingRectInWindowCoordinates; }
</ins><span class="cx"> const Vector<FloatRect>& textRectsInBoundingRectCoordinates() const { return m_data.textRectsInBoundingRectCoordinates; }
</span><span class="cx"> float contentImageScaleFactor() const { return m_data.contentImageScaleFactor; }
</span><span class="cx"> Image *contentImageWithHighlight() const { return m_data.contentImageWithHighlight.get(); }
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepagemacTextIndicatorWindowh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/mac/TextIndicatorWindow.h (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/mac/TextIndicatorWindow.h        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebCore/page/mac/TextIndicatorWindow.h        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> explicit TextIndicatorWindow(NSView *);
</span><span class="cx"> ~TextIndicatorWindow();
</span><span class="cx">
</span><del>- void setTextIndicator(PassRefPtr<TextIndicator>, bool fadeOut, std::function<void ()> animationCompletionHandler);
</del><ins>+ void setTextIndicator(PassRefPtr<TextIndicator>, NSRect contentRect, bool fadeOut, std::function<void ()> animationCompletionHandler);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> void closeWindow();
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepagemacTextIndicatorWindowmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/mac/TextIndicatorWindow.mm (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/mac/TextIndicatorWindow.mm        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebCore/page/mac/TextIndicatorWindow.mm        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx"> [textLayer setContents:(id)contentsImage.get()];
</span><span class="cx">
</span><span class="cx"> FloatRect imageRect = textRect;
</span><del>- imageRect.move(_textIndicator->textBoundingRectInScreenCoordinates().location() - _textIndicator->selectionRectInScreenCoordinates().location());
</del><ins>+ imageRect.move(_textIndicator->textBoundingRectInWindowCoordinates().location() - _textIndicator->selectionRectInWindowCoordinates().location());
</ins><span class="cx"> [textLayer setContentsRect:CGRectMake(imageRect.x() / contentsImageLogicalSize.width(), imageRect.y() / contentsImageLogicalSize.height(), imageRect.width() / contentsImageLogicalSize.width(), imageRect.height() / contentsImageLogicalSize.height())];
</span><span class="cx"> [textLayer setContentsGravity:kCAGravityCenter];
</span><span class="cx"> [textLayer setContentsScale:_textIndicator->contentImageScaleFactor()];
</span><span class="lines">@@ -266,7 +266,7 @@
</span><span class="cx"> closeWindow();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void TextIndicatorWindow::setTextIndicator(PassRefPtr<TextIndicator> textIndicator, bool fadeOut, std::function<void ()> animationCompletionHandler)
</del><ins>+void TextIndicatorWindow::setTextIndicator(PassRefPtr<TextIndicator> textIndicator, NSRect contentRect, bool fadeOut, std::function<void ()> animationCompletionHandler)
</ins><span class="cx"> {
</span><span class="cx"> if (m_textIndicator == textIndicator)
</span><span class="cx"> return;
</span><span class="lines">@@ -279,7 +279,6 @@
</span><span class="cx"> if (!m_textIndicator)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- NSRect contentRect = m_textIndicator->textBoundingRectInScreenCoordinates();
</del><span class="cx"> CGFloat horizontalMargin = std::max(dropShadowBlurRadius * 2 + horizontalBorder, contentRect.size.width * 2);
</span><span class="cx"> CGFloat verticalMargin = std::max(dropShadowBlurRadius * 2 + verticalBorder, contentRect.size.height * 2);
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2014-12-05 Dana Burkart <dburkart@apple.com>
+
+ Merge r176810. <rdar://problem/19140827>
+
+ 2014-12-04 Tim Horton <timothy_horton@apple.com>
+
+ TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=139252
+ <rdar://problem/19140827>
+
+ Reviewed by Anders Carlsson.
+
+ * WebView/WebView.mm:
+ (-[WebView _setTextIndicator:fadeOut:animationCompletionHandler:]):
+ Adjust to the WebCore changes.
+
+
</ins><span class="cx"> 2014-12-04 Dana Burkart <dburkart@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r173235. <rdar://problem/19072083>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebView.mm (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebView.mm        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebView.mm        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -8604,7 +8604,8 @@
</span><span class="cx"> if (!_private->textIndicatorWindow)
</span><span class="cx"> _private->textIndicatorWindow = std::make_unique<TextIndicatorWindow>(self);
</span><span class="cx">
</span><del>- _private->textIndicatorWindow->setTextIndicator(textIndicator, fadeOut, WTF::move(completionHandler));
</del><ins>+ NSRect contentRect = [self.window convertRectToScreen:textIndicator->textBoundingRectInWindowCoordinates()];
+ _private->textIndicatorWindow->setTextIndicator(textIndicator, contentRect, fadeOut, WTF::move(completionHandler));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_clearTextIndicator
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/ChangeLog (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/ChangeLog        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebKit2/ChangeLog        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -1,5 +1,35 @@
</span><span class="cx"> 2014-12-05 Dana Burkart <dburkart@apple.com>
</span><span class="cx">
</span><ins>+ Merge r176810. <rdar://problem/19140827>
+
+ 2014-12-04 Tim Horton <timothy_horton@apple.com>
+
+ TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=139252
+ <rdar://problem/19140827>
+
+ Reviewed by Anders Carlsson.
+
+ It turns out contentsToScreen requires sync IPC in Mac WebKit2, which we
+ really don't want to be doing here (especially since the UI process will often
+ be sitting in waitForAndDispatchImmediately waiting for didPerformActionMenuHitTest).
+
+ Go back to keeping TextIndicator rects in "window" coordinates and do the conversion
+ in each of the WebKits instead of trying to share that code.
+
+ * Shared/WebCoreArgumentCoders.cpp:
+ (IPC::ArgumentCoder<TextIndicatorData>::encode):
+ (IPC::ArgumentCoder<TextIndicatorData>::decode):
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
+ * WebProcess/WebPage/FindController.cpp:
+ (WebKit::FindController::updateFindIndicator):
+ (WebKit::FindController::drawRect):
+ Adjust to the WebCore changes.
+
+
+2014-12-05 Dana Burkart <dburkart@apple.com>
+
</ins><span class="cx"> Merge r173566. <rdar://problem/19150984>
</span><span class="cx">
</span><span class="cx"> 2014-09-11 Andy Estes <aestes@apple.com>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -2172,8 +2172,8 @@
</span><span class="cx">
</span><span class="cx"> void ArgumentCoder<TextIndicatorData>::encode(ArgumentEncoder& encoder, const TextIndicatorData& textIndicatorData)
</span><span class="cx"> {
</span><del>- encoder << textIndicatorData.selectionRectInScreenCoordinates;
- encoder << textIndicatorData.textBoundingRectInScreenCoordinates;
</del><ins>+ encoder << textIndicatorData.selectionRectInWindowCoordinates;
+ encoder << textIndicatorData.textBoundingRectInWindowCoordinates;
</ins><span class="cx"> encoder << textIndicatorData.textRectsInBoundingRectCoordinates;
</span><span class="cx"> encoder << textIndicatorData.contentImageScaleFactor;
</span><span class="cx"> encoder.encodeEnum(textIndicatorData.presentationTransition);
</span><span class="lines">@@ -2191,10 +2191,10 @@
</span><span class="cx">
</span><span class="cx"> bool ArgumentCoder<TextIndicatorData>::decode(ArgumentDecoder& decoder, TextIndicatorData& textIndicatorData)
</span><span class="cx"> {
</span><del>- if (!decoder.decode(textIndicatorData.selectionRectInScreenCoordinates))
</del><ins>+ if (!decoder.decode(textIndicatorData.selectionRectInWindowCoordinates))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (!decoder.decode(textIndicatorData.textBoundingRectInScreenCoordinates))
</del><ins>+ if (!decoder.decode(textIndicatorData.textBoundingRectInWindowCoordinates))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (!decoder.decode(textIndicatorData.textRectsInBoundingRectCoordinates))
</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 (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -3081,7 +3081,8 @@
</span><span class="cx"> if (!_data->_textIndicatorWindow)
</span><span class="cx"> _data->_textIndicatorWindow = std::make_unique<TextIndicatorWindow>(self);
</span><span class="cx">
</span><del>- _data->_textIndicatorWindow->setTextIndicator(textIndicator, fadeOut, WTF::move(completionHandler));
</del><ins>+ NSRect contentRect = [self.window convertRectToScreen:[self convertRect:textIndicator->textBoundingRectInWindowCoordinates() toView:nil]];
+ _data->_textIndicatorWindow->setTextIndicator(textIndicator, contentRect, fadeOut, WTF::move(completionHandler));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_setTextIndicator:(PassRefPtr<TextIndicator>)textIndicator fadeOut:(BOOL)fadeOut
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageFindControllercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.cpp (176865 => 176866)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.cpp        2014-12-05 21:10:39 UTC (rev 176865)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.cpp        2014-12-05 21:16:49 UTC (rev 176866)
</span><span class="lines">@@ -318,7 +318,7 @@
</span><span class="cx"> if (!indicator)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- m_findIndicatorRect = enclosingIntRect(indicator->selectionRectInScreenCoordinates());
</del><ins>+ m_findIndicatorRect = enclosingIntRect(indicator->selectionRectInWindowCoordinates());
</ins><span class="cx"> m_webPage->send(Messages::WebPageProxy::SetTextIndicator(indicator->data(), !isShowingOverlay));
</span><span class="cx"> m_isShowingFindIndicator = true;
</span><span class="cx">
</span><span class="lines">@@ -450,7 +450,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (Frame* selectedFrame = frameWithSelection(m_webPage->corePage())) {
</span><del>- IntRect findIndicatorRect = selectedFrame->view()->contentsToScreen(enclosingIntRect(selectedFrame->selection().selectionBounds()));
</del><ins>+ IntRect findIndicatorRect = selectedFrame->view()->contentsToWindow(enclosingIntRect(selectedFrame->selection().selectionBounds()));
</ins><span class="cx">
</span><span class="cx"> if (findIndicatorRect != m_findIndicatorRect)
</span><span class="cx"> hideFindIndicator();
</span></span></pre>
</div>
</div>
</body>
</html>