[Mac] Tooltips do not honor some types of obscuring windows
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jan 2016 16:50:17 +0000 (16:50 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jan 2016 16:50:17 +0000 (16:50 +0000)
commitf469b48d71fe1f245b4f1efd40f9da35ae8252c2
tree27af8bd0d5f5c8a6e25d83cbd230996cc7de2526
parenta51e27101e61a2235074b15c6ed1f49195767c26
[Mac] Tooltips do not honor some types of obscuring windows
https://bugs.webkit.org/show_bug.cgi?id=153263
<rdar://problem/21423972>

Reviewed by Simon Fraser.

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView _updateMouseoverWithEvent:]): When the WebView is not the key window, don't
display tooltips.

Source/WebKit2:

Recognize that the current WebView is obscured by comparing the current event's Window Number against
the Window Number of the current WebView. If they don't match, something is in the way.

* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::windowIsFrontWindowUnderMouse): Added.
* UIProcess/PageClient.h:
(WebKit::PageClient::windowIsFrontWindowUnderMouse):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleMouseEvent): Check if the current WebView is obscured. If it
is, clear the tooltip and return.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::windowIsFrontWindowUnderMouse): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/mac/PageClientImpl.h
Source/WebKit2/UIProcess/mac/PageClientImpl.mm