[wk2] WebKitTestRunner's window snapshots are blank with tiled drawing
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Sep 2013 20:47:19 +0000 (20:47 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Sep 2013 20:47:19 +0000 (20:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=122006
<rdar://problem/15095197>

Reviewed by Dean Jackson.

* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
Layer-back the root view in WebKitTestRunner's window, to work around a bug
where the window server snapshot API returns blank snapshots.

Add a test that ensures that WebKitTestRunner's snapshots are not
completely blank with tiled drawing enabled.

* platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html: Added.
* platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html [new file with mode: 0644]
LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html [new file with mode: 0644]
Tools/ChangeLog
Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm

index 446a66d..f0d3841 100644 (file)
@@ -1,3 +1,17 @@
+2013-09-27  Tim Horton  <timothy_horton@apple.com>
+
+        [wk2] WebKitTestRunner's window snapshots are blank with tiled drawing
+        https://bugs.webkit.org/show_bug.cgi?id=122006
+        <rdar://problem/15095197>
+
+        Reviewed by Dean Jackson.
+
+        Add a test that ensures that WebKitTestRunner's snapshots are not
+        completely blank with tiled drawing enabled.
+
+        * platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html: Added.
+        * platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html: Added.
+
 2013-09-27  Alexey Proskuryakov  <ap@apple.com>
 
         Layout Test fast/animation/request-animation-frame-time-unit.html is flaky
diff --git a/LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html b/LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work-expected-mismatch.html
new file mode 100644 (file)
index 0000000..90531a4
--- /dev/null
@@ -0,0 +1,2 @@
+<html>
+</html>
diff --git a/LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html b/LayoutTests/platform/mac-wk2/tiled-drawing/window-server-snapshots-work.html
new file mode 100644 (file)
index 0000000..f4039c5
--- /dev/null
@@ -0,0 +1,5 @@
+<html>
+<body style="background-color: black; color: white;">
+If this test passes (if WebKitTestRunner's snapshots are working correctly with tiled drawing), it will not match the pure-white mismatch expectation.
+</body>
+</html>
index 5eeae31..869e8e4 100644 (file)
@@ -1,3 +1,16 @@
+2013-09-27  Tim Horton  <timothy_horton@apple.com>
+
+        [wk2] WebKitTestRunner's window snapshots are blank with tiled drawing
+        https://bugs.webkit.org/show_bug.cgi?id=122006
+        <rdar://problem/15095197>
+
+        Reviewed by Dean Jackson.
+
+        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+        (WTR::PlatformWebView::PlatformWebView):
+        Layer-back the root view in WebKitTestRunner's window, to work around a bug
+        where the window server snapshot API returns blank snapshots.
+
 2013-09-27  Mario Sanchez Prada  <mario.prada@samsung.com>
 
         [GTK] GTK does not expose heading level correctly. Was: accessibility/heading-level.html is failing
index ba8d7f5..5275125 100644 (file)
@@ -147,6 +147,7 @@ PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGro
     m_window.platformWebView = this;
     [m_window setColorSpace:[[NSScreen mainScreen] colorSpace]];
     [m_window setCollectionBehavior:NSWindowCollectionBehaviorStationary];
+    [[m_window contentView] setWantsLayer:YES];
     [[m_window contentView] addSubview:m_view];
     [m_window orderBack:nil];
     [m_window setReleasedWhenClosed:NO];