Title: [144415] trunk/Tools
Revision
144415
Author
[email protected]
Date
2013-02-28 21:46:21 -0800 (Thu, 28 Feb 2013)

Log Message

Disable window occlusion detection for WebKitTestRunner Web View on Mac
https://bugs.webkit.org/show_bug.cgi?id=111116

Patch by Kiran Muppala <[email protected]> on 2013-02-28
Reviewed by Simon Fraser.

Window occlusion notifications were causing WebKitTestRunner's Web View
to be detected as occluded and causing a few _javascript_ timer layout
tests to fail.  https://bugs.webkit.org/show_bug.cgi?id=111025, fixed this
by initializing the page visibility to "visible" after creating the view.
But a better solution is to disable window occlusion detection, so that
not only the page but also the view is treated as visible.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions): Remove call to
setVisibilityState, since it is no longer necessary.
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView): Disable window occlusion
detection for the created WKView.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (144414 => 144415)


--- trunk/Tools/ChangeLog	2013-03-01 05:41:23 UTC (rev 144414)
+++ trunk/Tools/ChangeLog	2013-03-01 05:46:21 UTC (rev 144415)
@@ -1,3 +1,24 @@
+2013-02-28  Kiran Muppala  <[email protected]>
+
+        Disable window occlusion detection for WebKitTestRunner Web View on Mac
+        https://bugs.webkit.org/show_bug.cgi?id=111116
+
+        Reviewed by Simon Fraser.
+
+        Window occlusion notifications were causing WebKitTestRunner's Web View
+        to be detected as occluded and causing a few _javascript_ timer layout
+        tests to fail.  https://bugs.webkit.org/show_bug.cgi?id=111025, fixed this
+        by initializing the page visibility to "visible" after creating the view.
+        But a better solution is to disable window occlusion detection, so that
+        not only the page but also the view is treated as visible.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::createWebViewWithOptions): Remove call to
+        setVisibilityState, since it is no longer necessary.
+        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+        (WTR::PlatformWebView::PlatformWebView): Disable window occlusion
+        detection for the created WKView.
+
 2013-02-28  Li Yin  <[email protected]>
 
         [chromium] Events can't be triggered on MediaStreamTrack

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (144414 => 144415)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2013-03-01 05:41:23 UTC (rev 144414)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2013-03-01 05:46:21 UTC (rev 144415)
@@ -482,10 +482,6 @@
         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)

Modified: trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm (144414 => 144415)


--- trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm	2013-03-01 05:41:23 UTC (rev 144414)
+++ trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm	2013-03-01 05:46:21 UTC (rev 144415)
@@ -115,6 +115,7 @@
 
     NSRect rect = NSMakeRect(0, 0, 800, 600);
     m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef useTiledDrawing:useTiledDrawing];
+    [m_view setWindowOcclusionDetectionEnabled:NO];
 
     NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000);
     m_window = [[WebKitTestRunnerWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to