Title: [151645] trunk/Source/WebKit2
Revision
151645
Author
mr...@apple.com
Date
2013-06-17 09:40:22 -0700 (Mon, 17 Jun 2013)

Log Message

<rdar://problem/14051357> Web processes sometimes remain in a suppressed
state after their window is unoccluded.

The code in WKView that responds to occlusion notifications was incorrectly
treating the window's occlusion state as being an enum rather than the set of
flags that it is.

Reviewed by Oliver Hunt.

* UIProcess/API/mac/WKView.mm:
(-[WKView _windowDidChangeOcclusionState:]): Test only the visibility state.
(-[WKView setWindowOcclusionDetectionEnabled:]): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (151644 => 151645)


--- trunk/Source/WebKit2/ChangeLog	2013-06-17 16:22:06 UTC (rev 151644)
+++ trunk/Source/WebKit2/ChangeLog	2013-06-17 16:40:22 UTC (rev 151645)
@@ -1,3 +1,18 @@
+2013-06-17  Mark Rowe  <mr...@apple.com>
+
+        <rdar://problem/14051357> Web processes sometimes remain in a suppressed
+        state after their window is unoccluded.
+
+        The code in WKView that responds to occlusion notifications was incorrectly
+        treating the window's occlusion state as being an enum rather than the set of
+        flags that it is.
+
+        Reviewed by Oliver Hunt.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _windowDidChangeOcclusionState:]): Test only the visibility state.
+        (-[WKView setWindowOcclusionDetectionEnabled:]): Ditto.
+
 2013-06-17  Michael BrĂ¼ning  <michael.brun...@digia.com>
 
         [Qt] Remove Qt specific QTKIT flagged code.

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


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2013-06-17 16:22:06 UTC (rev 151644)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2013-06-17 16:40:22 UTC (rev 151645)
@@ -2117,7 +2117,7 @@
     if (!_data->_windowOcclusionDetectionEnabled)
         return;
 
-    [self _setIsWindowOccluded:[self.window occlusionState] != NSWindowOcclusionStateVisible];
+    [self _setIsWindowOccluded:([self.window occlusionState] & NSWindowOcclusionStateVisible) != NSWindowOcclusionStateVisible];
 }
 #endif
 
@@ -3415,7 +3415,7 @@
         // When enabling window occlusion detection, update the view's current occluded state
         // immediately, as the notification only fires when it changes.
         if (self.window)
-            [self _setIsWindowOccluded:[self.window occlusionState] != NSWindowOcclusionStateVisible];
+            [self _setIsWindowOccluded:([self.window occlusionState] & NSWindowOcclusionStateVisible) != NSWindowOcclusionStateVisible];
     } else {
         // When disabling window occlusion detection, force the view to think it is not occluded,
         // as it may already be occluded at the time of calling.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to