<rdar://problem/10328474> Text highlight changes to gray selection color when menu...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2011 18:48:43 +0000 (18:48 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Dec 2011 18:48:43 +0000 (18:48 +0000)
commit5bc54a0af700325df17a998c3c030147f7bebbaa
tree7a663cbccd8f1258c2bac2b9c32f5d5408db6a33
parentffface67da0627e796defa95e601700a39995cbe
<rdar://problem/10328474> Text highlight changes to gray selection color when menu extra is shown

Reviewed by John Sullivan.

* WebView/WebView.mm:
(-[WebView _updateActiveState]): Changed to use -[NSWindow _hasKeyAppearance] instead
of -isKeyWindow. The former also returns YES when a menu extra is open.
(-[WebView addWindowObserversForWindow:]): Removed code to observe
NSWindowDidBecomeKeyNotification and NSWindowDidResignKeyNotification.
(-[WebView removeWindowObservers]): Removed code to stop observing the above.
(-[WebView _windowChangedKeyState]): Overridden this to call _updateActiveState.
This is called when the result of -_hasKeyAppearance changes.
(-[WebView _windowWillOrderOnScreen:]): Removed call to _updateActiveState,
previously needed for popovers, because _windowChangedKeyState is invoked
at the right time for them.
(-[WebView _windowWillOrderOffScreen:]): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm