<!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>[177242] trunk/Source/WebKit2</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/177242">177242</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2014-12-12 15:16:04 -0800 (Fri, 12 Dec 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>TextIndicator (and other view-relative subwindows) is not dismissed on zoom gesture
https://bugs.webkit.org/show_bug.cgi?id=139580
<rdar://problem/19226350>
Reviewed by Anders Carlsson.
* UIProcess/PageClient.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::dismissContentRelativeChildWindows):
(WebKit::PageClientImpl::dismissDictionaryLookupPanel): Deleted.
(WebKit::PageClientImpl::dismissActionMenuPopovers): Deleted.
Merge dismissDictionaryLookupPanel and dismissActionMenuPopovers into
_dismissContentRelativeChildWindows, which also dismisses TextIndicator and the
text correction panel. Dismissal of any child windows which are anchored to
the page content now bottlenecks through this function.
(WebKit::PageClientImpl::navigationGestureDidBegin):
Dismiss all anchored subwindows when starting a navigation gesture, not
just TextIndicator and action menu popovers.
* UIProcess/API/mac/WKView.mm:
(-[WKView scrollWheel:]):
No need to dismiss TextIndicator here; we've got this covered in the more-inclusive
WebPageProxy::pageDidScroll, and will now dismiss more things.
(-[WKView mouseDown:]):
Dismiss more things.
(-[WKView viewDidMoveToWindow]):
Dismiss more things.
(-[WKView _dismissContentRelativeChildWindows]):
The aforementioned combined dismissal function.
(-[WKView magnifyWithEvent:]):
(-[WKView smartMagnifyWithEvent:]):
(-[WKView setMagnification:centeredAtPoint:]):
(-[WKView setMagnification:]):
Any time the page magnification changes, dismiss all the things.
* UIProcess/API/mac/WKViewPrivate.h:
Expose _dismissContentRelativeChildWindows instead of _dismissActionMenuPopovers;
for all existing clients, it makes more sense to dismiss all view-relative subwindows
than just a subset of them.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Make use of dismissAnchoredSubwindows.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Dismiss more things.
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
(-[WKActionMenuController dismissActionMenuPopovers]): Deleted.
dismissActionMenuPopovers is folded into WKView's _dismissContentRelativeChildWindows.
(-[WKActionMenuController _showTextIndicator]): Deleted.
(-[WKActionMenuController _hideTextIndicator]): Deleted.
Fold _showTextIndicator and _hideTextIndicator into their only callers.
_isShowingTextIndicator was never necessary, because it's OK to change
the current TextIndicator at any time, and a newer one is always more relevant.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKViewPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplh">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplmm">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWKActionMenuControllerh">trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWKActionMenuControllermm">trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (177241 => 177242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-12-12 23:12:04 UTC (rev 177241)
+++ trunk/Source/WebKit2/ChangeLog        2014-12-12 23:16:04 UTC (rev 177242)
</span><span class="lines">@@ -1,3 +1,72 @@
</span><ins>+2014-12-12 Timothy Horton <timothy_horton@apple.com>
+
+ TextIndicator (and other view-relative subwindows) is not dismissed on zoom gesture
+ https://bugs.webkit.org/show_bug.cgi?id=139580
+ <rdar://problem/19226350>
+
+ Reviewed by Anders Carlsson.
+
+ * UIProcess/PageClient.h:
+ * UIProcess/mac/PageClientImpl.h:
+ * UIProcess/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
+ (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Deleted.
+ (WebKit::PageClientImpl::dismissActionMenuPopovers): Deleted.
+ Merge dismissDictionaryLookupPanel and dismissActionMenuPopovers into
+ _dismissContentRelativeChildWindows, which also dismisses TextIndicator and the
+ text correction panel. Dismissal of any child windows which are anchored to
+ the page content now bottlenecks through this function.
+
+ (WebKit::PageClientImpl::navigationGestureDidBegin):
+ Dismiss all anchored subwindows when starting a navigation gesture, not
+ just TextIndicator and action menu popovers.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView scrollWheel:]):
+ No need to dismiss TextIndicator here; we've got this covered in the more-inclusive
+ WebPageProxy::pageDidScroll, and will now dismiss more things.
+
+ (-[WKView mouseDown:]):
+ Dismiss more things.
+
+ (-[WKView viewDidMoveToWindow]):
+ Dismiss more things.
+
+ (-[WKView _dismissContentRelativeChildWindows]):
+ The aforementioned combined dismissal function.
+
+ (-[WKView magnifyWithEvent:]):
+ (-[WKView smartMagnifyWithEvent:]):
+ (-[WKView setMagnification:centeredAtPoint:]):
+ (-[WKView setMagnification:]):
+ Any time the page magnification changes, dismiss all the things.
+
+ * UIProcess/API/mac/WKViewPrivate.h:
+ Expose _dismissContentRelativeChildWindows instead of _dismissActionMenuPopovers;
+ for all existing clients, it makes more sense to dismiss all view-relative subwindows
+ than just a subset of them.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didCommitLoadForFrame):
+ (WebKit::WebPageProxy::pageDidScroll):
+ (WebKit::WebPageProxy::resetStateAfterProcessExited):
+ Make use of dismissAnchoredSubwindows.
+
+ * UIProcess/mac/WKActionMenuController.h:
+ * UIProcess/mac/WKActionMenuController.mm:
+ (-[WKActionMenuController prepareForMenu:withEvent:]):
+ Dismiss more things.
+
+ (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
+ (-[WKActionMenuController dismissActionMenuPopovers]): Deleted.
+ dismissActionMenuPopovers is folded into WKView's _dismissContentRelativeChildWindows.
+
+ (-[WKActionMenuController _showTextIndicator]): Deleted.
+ (-[WKActionMenuController _hideTextIndicator]): Deleted.
+ Fold _showTextIndicator and _hideTextIndicator into their only callers.
+ _isShowingTextIndicator was never necessary, because it's OK to change
+ the current TextIndicator at any time, and a newer one is always more relevant.
+
</ins><span class="cx"> 2014-12-12 Gavin Barraclough <barraclough@apple.com>
</span><span class="cx">
</span><span class="cx"> Keep single RefCounter to track whether any pages in a context are process suppressible
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h (177241 => 177242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h        2014-12-12 23:12:04 UTC (rev 177241)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h        2014-12-12 23:16:04 UTC (rev 177242)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx"> - (void)_handleClickInPreviewView:(NSView *)previewView URL:(NSURL *)url;
</span><span class="cx"> - (BOOL)_shouldUseStandardQuickLookPreview;
</span><span class="cx">
</span><del>-- (void)_dismissActionMenuPopovers;
</del><ins>+- (void)_dismissContentRelativeChildWindows;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (177241 => 177242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-12-12 23:12:04 UTC (rev 177241)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-12-12 23:16:04 UTC (rev 177242)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx"> #import <QuartzCore/QuartzCore.h>
</span><span class="cx"> #import <WebCore/AXObjectCache.h>
</span><span class="cx"> #import <WebCore/ColorMac.h>
</span><ins>+#import <WebCore/DataDetectorsSPI.h>
</ins><span class="cx"> #import <WebCore/DragController.h>
</span><span class="cx"> #import <WebCore/DragData.h>
</span><span class="cx"> #import <WebCore/FloatRect.h>
</span><span class="lines">@@ -1192,9 +1193,6 @@
</span><span class="cx"> if (_data->_ignoresAllEvents)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- // Work around <rdar://problem/19086993> by always clearing the active text indicator on scroll.
- [self _setTextIndicator:nullptr fadeOut:NO];
-
</del><span class="cx"> if (_data->_allowsBackForwardNavigationGestures) {
</span><span class="cx"> [self _ensureGestureController];
</span><span class="cx"> if (_data->_gestureController->handleScrollWheelEvent(event))
</span><span class="lines">@@ -1243,8 +1241,7 @@
</span><span class="cx"> [self _setMouseDownEvent:event];
</span><span class="cx"> _data->_ignoringMouseDraggedEvents = NO;
</span><span class="cx">
</span><del>- // Work around <rdar://problem/19086993> by always clearing the active text indicator on mouseDown.
- [self _setTextIndicator:nullptr fadeOut:NO];
</del><ins>+ [self _dismissContentRelativeChildWindows];
</ins><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
</span><span class="cx"> [_data->_actionMenuController wkView:self willHandleMouseDown:event];
</span><span class="cx"> #endif
</span><span class="lines">@@ -2580,9 +2577,7 @@
</span><span class="cx"> [NSEvent removeMonitor:_data->_flagsChangedEventMonitor];
</span><span class="cx"> _data->_flagsChangedEventMonitor = nil;
</span><span class="cx">
</span><del>- if (getLULookupDefinitionModuleClass())
- [getLULookupDefinitionModuleClass() hideDefinition];
- [self _dismissActionMenuPopovers];
</del><ins>+ [self _dismissContentRelativeChildWindows];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> _data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]);
</span><span class="lines">@@ -4207,6 +4202,8 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ [self _dismissContentRelativeChildWindows];
+
</ins><span class="cx"> [self _ensureGestureController];
</span><span class="cx">
</span><span class="cx"> _data->_gestureController->handleMagnificationGesture(event.magnification, [self convertPoint:event.locationInWindow fromView:nil]);
</span><span class="lines">@@ -4219,6 +4216,8 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ [self _dismissContentRelativeChildWindows];
+
</ins><span class="cx"> [self _ensureGestureController];
</span><span class="cx">
</span><span class="cx"> _data->_gestureController->handleSmartMagnificationGesture([self convertPoint:event.locationInWindow fromView:nil]);
</span><span class="lines">@@ -4236,11 +4235,15 @@
</span><span class="cx">
</span><span class="cx"> - (void)setMagnification:(double)magnification centeredAtPoint:(NSPoint)point
</span><span class="cx"> {
</span><ins>+ [self _dismissContentRelativeChildWindows];
+
</ins><span class="cx"> _data->_page->scalePageInViewCoordinates(magnification, roundedIntPoint(point));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)setMagnification:(double)magnification
</span><span class="cx"> {
</span><ins>+ [self _dismissContentRelativeChildWindows];
+
</ins><span class="cx"> FloatPoint viewCenter(NSMidX([self bounds]), NSMidY([self bounds]));
</span><span class="cx"> _data->_page->scalePageInViewCoordinates(magnification, roundedIntPoint(viewCenter));
</span><span class="cx"> }
</span><span class="lines">@@ -4315,11 +4318,19 @@
</span><span class="cx"> return nil;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_dismissActionMenuPopovers
</del><ins>+- (void)_dismissContentRelativeChildWindows
</ins><span class="cx"> {
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
- [_data->_actionMenuController dismissActionMenuPopovers];
-#endif
</del><ins>+ // FIXME: We don't know which panel we are dismissing, it may not even be in the current page (see <rdar://problem/13875766>).
+ if (Class lookupDefinitionModuleClass = getLULookupDefinitionModuleClass())
+ [lookupDefinitionModuleClass hideDefinition];
+
+ DDActionsManager *actionsManager = [getDDActionsManagerClass() sharedManager];
+ if ([actionsManager respondsToSelector:@selector(requestBubbleClosureUnanchorOnFailure:)])
+ [actionsManager requestBubbleClosureUnanchorOnFailure:YES];
+
+ [self _setTextIndicator:nullptr fadeOut:NO];
+
+ static_cast<PageClient&>(*_data->_pageClient).dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSView *)_viewForPreviewingURL:(NSURL *)url initialFrameSize:(NSSize)initialFrameSize
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (177241 => 177242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2014-12-12 23:12:04 UTC (rev 177241)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2014-12-12 23:16:04 UTC (rev 177242)
</span><span class="lines">@@ -228,8 +228,7 @@
</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><span class="cx"> virtual void didPerformDictionaryLookup(const DictionaryPopupInfo&) = 0;
</span><del>- virtual void dismissDictionaryLookupPanel() = 0;
- virtual void dismissActionMenuPopovers() = 0;
</del><ins>+ virtual void dismissContentRelativeChildWindows() = 0;
</ins><span class="cx"> virtual void showCorrectionPanel(WebCore::AlternativeTextType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings) = 0;
</span><span class="cx"> virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingAlternativeText) = 0;
</span><span class="cx"> virtual String dismissCorrectionPanelSoon(WebCore::ReasonForDismissingAlternativeText) = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (177241 => 177242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-12-12 23:12:04 UTC (rev 177241)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-12-12 23:16:04 UTC (rev 177242)
</span><span class="lines">@@ -2678,9 +2678,7 @@
</span><span class="cx"> // FIXME (bug 59111): didCommitLoadForFrame comes too late when restoring a page from b/f cache, making us disable secure event mode in password fields.
</span><span class="cx"> // FIXME: A load going on in one frame shouldn't affect text editing in other frames on the page.
</span><span class="cx"> m_pageClient.resetSecureInputState();
</span><del>- dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
- m_pageClient.dismissDictionaryLookupPanel();
- m_pageClient.dismissActionMenuPopovers();
</del><ins>+ m_pageClient.dismissContentRelativeChildWindows();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> clearLoadDependentCallbacks();
</span><span class="lines">@@ -3375,8 +3373,7 @@
</span><span class="cx"> {
</span><span class="cx"> m_uiClient->pageDidScroll(this);
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>- m_pageClient.dismissActionMenuPopovers();
- dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
</del><ins>+ m_pageClient.dismissContentRelativeChildWindows();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4597,9 +4594,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>- dismissCorrectionPanel(ReasonForDismissingAlternativeTextIgnored);
- m_pageClient.dismissDictionaryLookupPanel();
- m_pageClient.dismissActionMenuPopovers();
</del><ins>+ m_pageClient.dismissContentRelativeChildWindows();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> PageLoadState::Transaction transaction = m_pageLoadState.transaction();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (177241 => 177242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2014-12-12 23:12:04 UTC (rev 177241)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2014-12-12 23:16:04 UTC (rev 177242)
</span><span class="lines">@@ -139,8 +139,7 @@
</span><span class="cx"> virtual void makeFirstResponder();
</span><span class="cx">
</span><span class="cx"> virtual void didPerformDictionaryLookup(const DictionaryPopupInfo&);
</span><del>- virtual void dismissDictionaryLookupPanel();
- virtual void dismissActionMenuPopovers();
</del><ins>+ virtual void dismissContentRelativeChildWindows();
</ins><span class="cx">
</span><span class="cx"> virtual void showCorrectionPanel(WebCore::AlternativeTextType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
</span><span class="cx"> virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingAlternativeText);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (177241 => 177242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2014-12-12 23:12:04 UTC (rev 177241)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2014-12-12 23:16:04 UTC (rev 177242)
</span><span class="lines">@@ -575,21 +575,11 @@
</span><span class="cx"> [getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.string.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PageClientImpl::dismissDictionaryLookupPanel()
</del><ins>+void PageClientImpl::dismissContentRelativeChildWindows()
</ins><span class="cx"> {
</span><del>- if (!getLULookupDefinitionModuleClass())
- return;
-
- // FIXME: We don't know which panel we are dismissing, it may not even be in the current page (see <rdar://problem/13875766>).
- [getLULookupDefinitionModuleClass() hideDefinition];
- setTextIndicator(nil, false);
</del><ins>+ [m_wkView _dismissContentRelativeChildWindows];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void PageClientImpl::dismissActionMenuPopovers()
-{
- [m_wkView _dismissActionMenuPopovers];
-}
-
</del><span class="cx"> void PageClientImpl::showCorrectionPanel(AlternativeTextType type, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
</span><span class="cx"> {
</span><span class="cx"> #if USE(AUTOCORRECTION_PANEL)
</span><span class="lines">@@ -716,9 +706,7 @@
</span><span class="cx">
</span><span class="cx"> void PageClientImpl::navigationGestureDidBegin()
</span><span class="cx"> {
</span><del>- // Hide the text indicator and action menu popovers if they are visible.
- setTextIndicator(nullptr, false);
- dismissActionMenuPopovers();
</del><ins>+ dismissContentRelativeChildWindows();
</ins><span class="cx">
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> if (m_webView)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWKActionMenuControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.h (177241 => 177242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.h        2014-12-12 23:12:04 UTC (rev 177241)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.h        2014-12-12 23:16:04 UTC (rev 177242)
</span><span class="lines">@@ -59,7 +59,6 @@
</span><span class="cx"> _WKActionMenuType _type;
</span><span class="cx"> RetainPtr<NSSharingServicePicker> _sharingServicePicker;
</span><span class="cx">
</span><del>- BOOL _isShowingTextIndicator;
</del><span class="cx"> BOOL _hasActivatedActionContext;
</span><span class="cx">
</span><span class="cx"> RetainPtr<DDActionContext> _currentActionContext;
</span><span class="lines">@@ -75,8 +74,6 @@
</span><span class="cx">
</span><span class="cx"> - (void)didPerformActionMenuHitTest:(const WebKit::ActionMenuHitTestResult&)hitTestResult userData:(API::Object*)userData;
</span><span class="cx">
</span><del>-- (void)dismissActionMenuPopovers;
-
</del><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> #endif // PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWKActionMenuControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (177241 => 177242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm        2014-12-12 23:12:04 UTC (rev 177241)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm        2014-12-12 23:16:04 UTC (rev 177242)
</span><span class="lines">@@ -59,8 +59,6 @@
</span><span class="cx"> @interface WKActionMenuController () <NSSharingServiceDelegate, NSSharingServicePickerDelegate>
</span><span class="cx"> - (void)_updateActionMenuItems;
</span><span class="cx"> - (BOOL)_canAddMediaToPhotos;
</span><del>-- (void)_showTextIndicator;
-- (void)_hideTextIndicator;
</del><span class="cx"> - (void)_clearActionMenuState;
</span><span class="cx"> @end
</span><span class="cx">
</span><span class="lines">@@ -102,7 +100,7 @@
</span><span class="cx"> if (menu != _wkView.actionMenu)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- [self dismissActionMenuPopovers];
</del><ins>+ [_wkView _dismissContentRelativeChildWindows];
</ins><span class="cx">
</span><span class="cx"> _page->performActionMenuHitTestAtLocation([_wkView convertPoint:event.locationInWindow fromView:nil]);
</span><span class="cx">
</span><span class="lines">@@ -181,37 +179,6 @@
</span><span class="cx"> [self _updateActionMenuItems];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)dismissActionMenuPopovers
-{
- DDActionsManager *actionsManager = [getDDActionsManagerClass() sharedManager];
- if ([actionsManager respondsToSelector:@selector(requestBubbleClosureUnanchorOnFailure:)])
- [actionsManager requestBubbleClosureUnanchorOnFailure:YES];
-
- [self _hideTextIndicator];
-}
-
-#pragma mark Text Indicator
-
-- (void)_showTextIndicator
-{
- if (_isShowingTextIndicator)
- return;
-
- if (_hitTestResult.detectedDataTextIndicator) {
- _page->setTextIndicator(_hitTestResult.detectedDataTextIndicator->data(), false);
- _isShowingTextIndicator = YES;
- }
-}
-
-- (void)_hideTextIndicator
-{
- if (!_isShowingTextIndicator)
- return;
-
- _page->clearTextIndicator();
- _isShowingTextIndicator = NO;
-}
-
</del><span class="cx"> #pragma mark Link actions
</span><span class="cx">
</span><span class="cx"> - (NSArray *)_defaultMenuItemsForLink
</span><span class="lines">@@ -422,11 +389,12 @@
</span><span class="cx"> _currentActionContext = [actionContext contextForView:_wkView altMode:YES interactionStartedHandler:^() {
</span><span class="cx"> page->send(Messages::WebPage::DataDetectorsDidPresentUI(overlayID));
</span><span class="cx"> } interactionChangedHandler:^() {
</span><del>- [self _showTextIndicator];
</del><ins>+ if (_hitTestResult.detectedDataTextIndicator)
+ _page->setTextIndicator(_hitTestResult.detectedDataTextIndicator->data(), false);
</ins><span class="cx"> page->send(Messages::WebPage::DataDetectorsDidChangeUI(overlayID));
</span><span class="cx"> } interactionStoppedHandler:^() {
</span><del>- [self _hideTextIndicator];
</del><span class="cx"> page->send(Messages::WebPage::DataDetectorsDidHideUI(overlayID));
</span><ins>+ page->clearTextIndicator();
</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>
</div>
</body>
</html>