Initialize page visibility after creating WebKitTestRunner WebView on Mac
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2013 03:51:43 +0000 (03:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2013 03:51:43 +0000 (03:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=111025

Patch by Kiran Muppala <cmuppala@apple.com> on 2013-02-27
Reviewed by Simon Fraser.

Set page visibility to "visible" after creating WebView to override
visibility state inferred from window occlusion notifications on Mac.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions): Add call to
setVisibilityState.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144259 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp

index a099647..68abe70 100644 (file)
@@ -1,3 +1,17 @@
+2013-02-27  Kiran Muppala  <cmuppala@apple.com>
+
+        Initialize page visibility after creating WebKitTestRunner WebView on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=111025
+
+        Reviewed by Simon Fraser.
+
+        Set page visibility to "visible" after creating WebView to override
+        visibility state inferred from window occlusion notifications on Mac.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::createWebViewWithOptions): Add call to
+        setVisibilityState.
+
 2013-02-27  Ryosuke Niwa  <rniwa@webkit.org>
 
         Merge PageLoadingPerfTest into ReplayPerfTest
index a05f1af..9729e9c 100644 (file)
@@ -482,6 +482,10 @@ void TestController::createWebViewWithOptions(WKDictionaryRef options)
         0, // unableToImplementPolicy
     };
     WKPageSetPagePolicyClient(m_mainWebView->page(), &pagePolicyClient);
+
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+    setVisibilityState(kWKPageVisibilityStateVisible, true);
+#endif
 }
 
 void TestController::ensureViewSupportsOptions(WKDictionaryRef options)