<!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>[176338] 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/176338">176338</a></dd>
<dt>Author</dt> <dd>dburkart@apple.com</dd>
<dt>Date</dt> <dd>2014-11-19 14:03:35 -0800 (Wed, 19 Nov 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/176221">r176221</a>. rdar://problem/18991369</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6003branchSourceWebCoreChangeLog">branches/safari-600.3-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepagePageOverlaycpp">branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepagePageOverlayh">branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2ChangeLog">branches/safari-600.3-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2SharedmacActionMenuHitTestResulth">branches/safari-600.3-branch/Source/WebKit2/Shared/mac/ActionMenuHitTestResult.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2UIProcessmacWKActionMenuControllermm">branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageWebPageh">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageWebPagemessagesin">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagemacWebPageMacmm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm</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 (176337 => 176338)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/ChangeLog        2014-11-19 21:57:10 UTC (rev 176337)
+++ branches/safari-600.3-branch/Source/WebCore/ChangeLog        2014-11-19 22:03:35 UTC (rev 176338)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-11-19 Dana Burkart <dburkart@apple.com>
+
+ Merge r176221. rdar://problem/18991369
+
+ 2014-11-17 Tim Horton <timothy_horton@apple.com>
+
+ DataDetectors PageOverlay callbacks can come in to the wrong overlay
+ https://bugs.webkit.org/show_bug.cgi?id=138801
+ <rdar://problem/18991369>
+
+ Reviewed by Anders Carlsson.
+
+ * page/PageOverlay.cpp:
+ (WebCore::generatePageOverlayID):
+ (WebCore::PageOverlay::PageOverlay):
+ * page/PageOverlay.h:
+ Give each PageOverlay a unique ID.
+
</ins><span class="cx"> 2014-11-05 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> Fix crash introduced in r175656
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepagePageOverlaycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.cpp (176337 => 176338)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.cpp        2014-11-19 21:57:10 UTC (rev 176337)
+++ branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.cpp        2014-11-19 22:03:35 UTC (rev 176338)
</span><span class="lines">@@ -40,6 +40,12 @@
</span><span class="cx"> static const double fadeAnimationDuration = 0.2;
</span><span class="cx"> static const double fadeAnimationFrameRate = 30;
</span><span class="cx">
</span><ins>+static PageOverlay::PageOverlayID generatePageOverlayID()
+{
+ static PageOverlay::PageOverlayID pageOverlayID;
+ return ++pageOverlayID;
+}
+
</ins><span class="cx"> PassRefPtr<PageOverlay> PageOverlay::create(Client& client, OverlayType overlayType)
</span><span class="cx"> {
</span><span class="cx"> return adoptRef(new PageOverlay(client, overlayType));
</span><span class="lines">@@ -55,6 +61,7 @@
</span><span class="cx"> , m_fractionFadedIn(1)
</span><span class="cx"> , m_overlayType(overlayType)
</span><span class="cx"> , m_backgroundColor(Color::transparent)
</span><ins>+ , m_pageOverlayID(generatePageOverlayID())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepagePageOverlayh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.h (176337 => 176338)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.h        2014-11-19 21:57:10 UTC (rev 176337)
+++ branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.h        2014-11-19 22:03:35 UTC (rev 176338)
</span><span class="lines">@@ -74,6 +74,9 @@
</span><span class="cx">
</span><span class="cx"> PageOverlayController* controller() const;
</span><span class="cx">
</span><ins>+ typedef uint64_t PageOverlayID;
+ virtual PageOverlayID pageOverlayID() const { return m_pageOverlayID; }
+
</ins><span class="cx"> void setPage(Page*);
</span><span class="cx"> void setNeedsDisplay(const IntRect& dirtyRect);
</span><span class="cx"> void setNeedsDisplay();
</span><span class="lines">@@ -134,6 +137,7 @@
</span><span class="cx"> IntRect m_overrideFrame;
</span><span class="cx">
</span><span class="cx"> RGBA32 m_backgroundColor;
</span><ins>+ PageOverlayID m_pageOverlayID;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/ChangeLog (176337 => 176338)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/ChangeLog        2014-11-19 21:57:10 UTC (rev 176337)
+++ branches/safari-600.3-branch/Source/WebKit2/ChangeLog        2014-11-19 22:03:35 UTC (rev 176338)
</span><span class="lines">@@ -1,5 +1,43 @@
</span><span class="cx"> 2014-11-19 Dana Burkart <dburkart@apple.com>
</span><span class="cx">
</span><ins>+ Merge r176221. rdar://problem/18991369
+
+ 2014-11-17 Tim Horton <timothy_horton@apple.com>
+
+ DataDetectors PageOverlay callbacks can come in to the wrong overlay
+ https://bugs.webkit.org/show_bug.cgi?id=138801
+ <rdar://problem/18991369>
+
+ Reviewed by Anders Carlsson.
+
+ We can call dataDetectorsDidHideUI on the wrong (or no) PageOverlay,
+ because it's possible to have another performActionMenuHitTestAtLocation
+ between the first one and the dataDetectorsDid*UI that correspond to it.
+
+ To make sure that the callbacks come to the right PageOverlay, plumb
+ an integer ID through all of the callbacks and find the overlay based on that.
+
+ * Shared/mac/ActionMenuHitTestResult.h:
+ Store the ID of the PageOverlay that overrode data detection.
+
+ * UIProcess/mac/WKActionMenuController.mm:
+ (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
+ Send the ID back to the Web process when replying from DD callbacks.
+
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+ (WebKit::WebPage::performActionMenuHitTestAtLocation):
+ Store the ID of the PageOverlay that overrode data detection instead of
+ keeping the PageOverlay itself.
+
+ (WebKit::WebPage::dataDetectorsDidPresentUI):
+ (WebKit::WebPage::dataDetectorsDidChangeUI):
+ (WebKit::WebPage::dataDetectorsDidHideUI):
+ Find and reply to the correct page overlay.
+
+2014-11-19 Dana Burkart <dburkart@apple.com>
+
</ins><span class="cx"> Merge r176220. rdar://problem/18944893
</span><span class="cx">
</span><span class="cx"> 2014-11-17 Beth Dakin <bdakin@apple.com>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2SharedmacActionMenuHitTestResulth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/Shared/mac/ActionMenuHitTestResult.h (176337 => 176338)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/Shared/mac/ActionMenuHitTestResult.h        2014-11-19 21:57:10 UTC (rev 176337)
+++ branches/safari-600.3-branch/Source/WebKit2/Shared/mac/ActionMenuHitTestResult.h        2014-11-19 22:03:35 UTC (rev 176338)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "TextIndicator.h"
</span><span class="cx"> #include "WebHitTestResult.h"
</span><span class="cx"> #include <WebCore/FloatRect.h>
</span><ins>+#include <WebCore/PageOverlay.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> OBJC_CLASS DDActionContext;
</span><span class="lines">@@ -54,6 +55,7 @@
</span><span class="cx"> RetainPtr<DDActionContext> actionContext;
</span><span class="cx"> WebCore::FloatRect detectedDataBoundingBox;
</span><span class="cx"> RefPtr<TextIndicator> detectedDataTextIndicator;
</span><ins>+ WebCore::PageOverlay::PageOverlayID detectedDataOriginatingPageOverlay;
</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 (176337 => 176338)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm        2014-11-19 21:57:10 UTC (rev 176337)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm        2014-11-19 22:03:35 UTC (rev 176338)
</span><span class="lines">@@ -578,14 +578,15 @@
</span><span class="cx">
</span><span class="cx"> // Ref our WebPageProxy for use in the blocks below.
</span><span class="cx"> RefPtr<WebPageProxy> page = _page;
</span><ins>+ PageOverlay::PageOverlayID overlayID = _hitTestResult.detectedDataOriginatingPageOverlay;
</ins><span class="cx"> _currentActionContext = [actionContext contextForView:_wkView altMode:YES interactionStartedHandler:^() {
</span><del>- page->send(Messages::WebPage::DataDetectorsDidPresentUI());
</del><ins>+ page->send(Messages::WebPage::DataDetectorsDidPresentUI(overlayID));
</ins><span class="cx"> } interactionChangedHandler:^() {
</span><span class="cx"> [self _showTextIndicator];
</span><del>- page->send(Messages::WebPage::DataDetectorsDidChangeUI());
</del><ins>+ page->send(Messages::WebPage::DataDetectorsDidChangeUI(overlayID));
</ins><span class="cx"> } interactionStoppedHandler:^() {
</span><span class="cx"> [self _hideTextIndicator];
</span><del>- page->send(Messages::WebPage::DataDetectorsDidHideUI());
</del><ins>+ page->send(Messages::WebPage::DataDetectorsDidHideUI(overlayID));
</ins><span class="cx"> }];
</span><span class="cx">
</span><span class="cx"> [_currentActionContext setHighlightFrame:[_wkView.window convertRectToScreen:[_wkView convertRect:_hitTestResult.detectedDataBoundingBox toView:nil]]];
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (176337 => 176338)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-11-19 21:57:10 UTC (rev 176337)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-11-19 22:03:35 UTC (rev 176338)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> #include <WebCore/IntRect.h>
</span><span class="cx"> #include <WebCore/IntSizeHash.h>
</span><span class="cx"> #include <WebCore/Page.h>
</span><ins>+#include <WebCore/PageOverlay.h>
</ins><span class="cx"> #include <WebCore/PageVisibilityState.h>
</span><span class="cx"> #include <WebCore/ScrollTypes.h>
</span><span class="cx"> #include <WebCore/TextChecking.h>
</span><span class="lines">@@ -1045,9 +1046,9 @@
</span><span class="cx"> void selectLastActionMenuRange();
</span><span class="cx"> void focusAndSelectLastActionMenuHitTestResult();
</span><span class="cx">
</span><del>- void dataDetectorsDidPresentUI();
- void dataDetectorsDidChangeUI();
- void dataDetectorsDidHideUI();
</del><ins>+ void dataDetectorsDidPresentUI(WebCore::PageOverlay::PageOverlayID);
+ void dataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID);
+ void dataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> uint64_t m_pageID;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (176337 => 176338)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-11-19 21:57:10 UTC (rev 176337)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-11-19 22:03:35 UTC (rev 176338)
</span><span class="lines">@@ -391,8 +391,8 @@
</span><span class="cx"> PerformActionMenuHitTestAtLocation(WebCore::FloatPoint location)
</span><span class="cx"> SelectLastActionMenuRange()
</span><span class="cx"> FocusAndSelectLastActionMenuHitTestResult()
</span><del>- DataDetectorsDidPresentUI()
- DataDetectorsDidChangeUI()
- DataDetectorsDidHideUI()
</del><ins>+ DataDetectorsDidPresentUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
+ DataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
+ DataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
</ins><span class="cx"> #endif
</span><span class="cx"> }
</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 (176337 => 176338)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2014-11-19 21:57:10 UTC (rev 176337)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2014-11-19 22:03:35 UTC (rev 176338)
</span><span class="lines">@@ -969,8 +969,6 @@
</span><span class="cx">
</span><span class="cx"> void WebPage::performActionMenuHitTestAtLocation(WebCore::FloatPoint locationInViewCooordinates)
</span><span class="cx"> {
</span><del>- m_lastActionMenuHitPageOverlay = nullptr;
-
</del><span class="cx"> layoutIfNeeded();
</span><span class="cx">
</span><span class="cx"> MainFrame& mainFrame = corePage()->mainFrame();
</span><span class="lines">@@ -1034,8 +1032,8 @@
</span><span class="cx">
</span><span class="cx"> actionMenuResult.detectedDataBoundingBox = detectedDataBoundingBox;
</span><span class="cx"> actionMenuResult.detectedDataTextIndicator = TextIndicator::createWithRange(*mainResultRange);
</span><ins>+ actionMenuResult.detectedDataOriginatingPageOverlay = overlay->pageOverlayID();
</ins><span class="cx"> m_lastActionMenuRangeForSelection = mainResultRange;
</span><del>- m_lastActionMenuHitPageOverlay = webOverlay;
</del><span class="cx">
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -1095,23 +1093,40 @@
</span><span class="cx"> element->document().frame()->selection().setSelection(position);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPage::dataDetectorsDidPresentUI()
</del><ins>+void WebPage::dataDetectorsDidPresentUI(PageOverlay::PageOverlayID overlayID)
</ins><span class="cx"> {
</span><del>- if (m_lastActionMenuHitPageOverlay)
- m_lastActionMenuHitPageOverlay->dataDetectorsDidPresentUI();
</del><ins>+ MainFrame& mainFrame = corePage()->mainFrame();
+ for (const auto& overlay : mainFrame.pageOverlayController().pageOverlays()) {
+ if (overlay->pageOverlayID() == overlayID) {
+ if (WebPageOverlay* webOverlay = WebPageOverlay::fromCoreOverlay(*overlay))
+ webOverlay->dataDetectorsDidPresentUI();
+ return;
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPage::dataDetectorsDidChangeUI()
</del><ins>+void WebPage::dataDetectorsDidChangeUI(PageOverlay::PageOverlayID overlayID)
</ins><span class="cx"> {
</span><del>- if (m_lastActionMenuHitPageOverlay)
- m_lastActionMenuHitPageOverlay->dataDetectorsDidChangeUI();
</del><ins>+ MainFrame& mainFrame = corePage()->mainFrame();
+ for (const auto& overlay : mainFrame.pageOverlayController().pageOverlays()) {
+ if (overlay->pageOverlayID() == overlayID) {
+ if (WebPageOverlay* webOverlay = WebPageOverlay::fromCoreOverlay(*overlay))
+ webOverlay->dataDetectorsDidChangeUI();
+ return;
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPage::dataDetectorsDidHideUI()
</del><ins>+void WebPage::dataDetectorsDidHideUI(PageOverlay::PageOverlayID overlayID)
</ins><span class="cx"> {
</span><del>- if (m_lastActionMenuHitPageOverlay)
- m_lastActionMenuHitPageOverlay->dataDetectorsDidHideUI();
- m_lastActionMenuHitPageOverlay = nil;
</del><ins>+ MainFrame& mainFrame = corePage()->mainFrame();
+ for (const auto& overlay : mainFrame.pageOverlayController().pageOverlays()) {
+ if (overlay->pageOverlayID() == overlayID) {
+ if (WebPageOverlay* webOverlay = WebPageOverlay::fromCoreOverlay(*overlay))
+ webOverlay->dataDetectorsDidHideUI();
+ return;
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>
</body>
</html>