Title: [99894] trunk/Source/WebKit2
Revision
99894
Author
[email protected]
Date
2011-11-10 13:34:00 -0800 (Thu, 10 Nov 2011)

Log Message

Make WKViews in NSPopovers render as they would in active windows.

The NSWindowDid{Become,Resign}KeyNotifications are not fired when NSPopovers
are shown or hidden since they share key with the parent window. So WKView
needs to update the active state during order on/off screen notifications.

https://webkit.org/b/68435

Reviewed by John Sullivan.

* UIProcess/API/mac/WKView.mm:
(-[WKView _windowDidOrderOffScreen:]): Call viewStateDidChange with WebPageProxy::ViewWindowIsActive.
(-[WKView _windowDidOrderOnScreen:]): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (99893 => 99894)


--- trunk/Source/WebKit2/ChangeLog	2011-11-10 21:31:50 UTC (rev 99893)
+++ trunk/Source/WebKit2/ChangeLog	2011-11-10 21:34:00 UTC (rev 99894)
@@ -1,3 +1,19 @@
+2011-11-10  Timothy Hatcher  <[email protected]>
+
+        Make WKViews in NSPopovers render as they would in active windows.
+
+        The NSWindowDid{Become,Resign}KeyNotifications are not fired when NSPopovers
+        are shown or hidden since they share key with the parent window. So WKView
+        needs to update the active state during order on/off screen notifications.
+
+        https://webkit.org/b/68435
+
+        Reviewed by John Sullivan.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _windowDidOrderOffScreen:]): Call viewStateDidChange with WebPageProxy::ViewWindowIsActive.
+        (-[WKView _windowDidOrderOnScreen:]): Ditto.
+
 2011-11-10  Anders Carlsson  <[email protected]>
 
         Add a simple content layer to TiledCoreAnimationDrawingArea

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (99893 => 99894)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2011-11-10 21:31:50 UTC (rev 99893)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2011-11-10 21:34:00 UTC (rev 99894)
@@ -1887,11 +1887,17 @@
 
 - (void)_windowDidOrderOffScreen:(NSNotification *)notification
 {
+    // We want to make sure to update the active state while hidden, so since the view is about to be hidden,
+    // we hide it first and then update the active state.
     _data->_page->viewStateDidChange(WebPageProxy::ViewIsVisible);
+    _data->_page->viewStateDidChange(WebPageProxy::ViewWindowIsActive);
 }
 
 - (void)_windowDidOrderOnScreen:(NSNotification *)notification
 {
+    // We want to make sure to update the active state while hidden, so since the view is about to become visible,
+    // we update the active state first and then make it visible.
+    _data->_page->viewStateDidChange(WebPageProxy::ViewWindowIsActive);
     _data->_page->viewStateDidChange(WebPageProxy::ViewIsVisible);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to