Title: [155188] trunk/Tools
Revision
155188
Author
[email protected]
Date
2013-09-06 06:33:03 -0700 (Fri, 06 Sep 2013)

Log Message

[Qt] REGRESSION(r155140) Pixel tests is still broken on Qt with QT_WEBKIT_DISABLE_UIPROCESS_DUMPPIXELS=1
https://bugs.webkit.org/show_bug.cgi?id=120847

Patch by Gabor Abraham <[email protected]> on 2013-09-06
Reviewed by Csaba Osztrogonác.

Move the force repaint code back to if (PlatformWebView::windowSnapshotEnabled()) block to support Qt.
Typo fixed: windowShapshotEnabled -> windowSnapshotEnabled.
Add a default PlatformWebView::windowSnapshotEnabled() to the !PLATFORM(QT).

* WebKitTestRunner/PlatformWebView.h:
(WTR::PlatformWebView::windowSnapshotEnabled):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults):
* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::WrapperWindow::handleStatusChanged):
(WTR::PlatformWebView::windowSnapshotEnabled):
* WebKitTestRunner/qt/TestInvocationQt.cpp:
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (155187 => 155188)


--- trunk/Tools/ChangeLog	2013-09-06 12:07:47 UTC (rev 155187)
+++ trunk/Tools/ChangeLog	2013-09-06 13:33:03 UTC (rev 155188)
@@ -1,3 +1,24 @@
+2013-09-06  Gabor Abraham  <[email protected]>
+
+        [Qt] REGRESSION(r155140) Pixel tests is still broken on Qt with QT_WEBKIT_DISABLE_UIPROCESS_DUMPPIXELS=1
+        https://bugs.webkit.org/show_bug.cgi?id=120847
+
+        Reviewed by Csaba Osztrogonác.
+
+        Move the force repaint code back to if (PlatformWebView::windowSnapshotEnabled()) block to support Qt.
+        Typo fixed: windowShapshotEnabled -> windowSnapshotEnabled.
+        Add a default PlatformWebView::windowSnapshotEnabled() to the !PLATFORM(QT).
+
+        * WebKitTestRunner/PlatformWebView.h:
+        (WTR::PlatformWebView::windowSnapshotEnabled):
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::dumpResults):
+        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+        (WTR::WrapperWindow::handleStatusChanged):
+        (WTR::PlatformWebView::windowSnapshotEnabled):
+        * WebKitTestRunner/qt/TestInvocationQt.cpp:
+        (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
 2013-09-06  Allan Sandfeld Jensen  <[email protected]>
 
         REGRESSION(r155140) Broke pixel tests on EFL/GTK/Qt

Modified: trunk/Tools/WebKitTestRunner/PlatformWebView.h (155187 => 155188)


--- trunk/Tools/WebKitTestRunner/PlatformWebView.h	2013-09-06 12:07:47 UTC (rev 155187)
+++ trunk/Tools/WebKitTestRunner/PlatformWebView.h	2013-09-06 13:33:03 UTC (rev 155188)
@@ -81,7 +81,11 @@
     bool sendEvent(QEvent*);
     void postEvent(QEvent*);
     void setModalEventLoop(QEventLoop* eventLoop) { m_modalEventLoop = eventLoop; }
-    static bool windowShapshotEnabled();
+    // Window snapshot can be disabled on Qt with QT_WEBKIT_DISABLE_UIPROCESS_DUMPPIXELS=1 environment variable (necessary for xvfb)
+    static bool windowSnapshotEnabled();
+#else
+    // Window snapshot is always enabled by default on all other platform.
+    static bool windowSnapshotEnabled() { return true; }
 #endif
 
     WKRect windowFrame();

Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (155187 => 155188)


--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2013-09-06 12:07:47 UTC (rev 155187)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2013-09-06 13:33:03 UTC (rev 155188)
@@ -325,13 +325,15 @@
         dumpAudio(m_audioResult.get());
 
     if (m_dumpPixels && m_pixelResult) {
-        m_gotRepaint = false;
-        WKPageForceRepaint(TestController::shared().mainWebView()->page(), this, TestInvocation::forceRepaintDoneCallback);
-        TestController::shared().runUntil(m_gotRepaint, TestController::ShortTimeout);
-        if (!m_gotRepaint) {
-            m_errorMessage = "Timed out waiting for pre-pixel dump repaint\n";
-            m_webProcessIsUnresponsive = true;
-            return;
+        if (PlatformWebView::windowSnapshotEnabled()) {
+            m_gotRepaint = false;
+            WKPageForceRepaint(TestController::shared().mainWebView()->page(), this, TestInvocation::forceRepaintDoneCallback);
+            TestController::shared().runUntil(m_gotRepaint, TestController::ShortTimeout);
+            if (!m_gotRepaint) {
+                m_errorMessage = "Timed out waiting for pre-pixel dump repaint\n";
+                m_webProcessIsUnresponsive = true;
+                return;
+            }
         }
         dumpPixelsAndCompareWithExpected(m_pixelResult.get(), m_repaintRects.get());
     }

Modified: trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp (155187 => 155188)


--- trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2013-09-06 12:07:47 UTC (rev 155187)
+++ trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2013-09-06 13:33:03 UTC (rev 155188)
@@ -65,7 +65,7 @@
         m_view->setParentItem(rootObject());
         QQmlProperty::write(m_view, "anchors.fill", qVariantFromValue(rootObject()));
 
-        if (PlatformWebView::windowShapshotEnabled()) {
+        if (PlatformWebView::windowSnapshotEnabled()) {
             setSurfaceType(OpenGLSurface);
             create();
 #if QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
@@ -175,7 +175,7 @@
     return adoptWK(WKImageCreateFromQImage(m_window->grabWindow()));
 }
 
-bool PlatformWebView::windowShapshotEnabled()
+bool PlatformWebView::windowSnapshotEnabled()
 {
     // We need a way to disable UI side rendering for tests because it is
     // too slow without appropriate hardware.

Modified: trunk/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp (155187 => 155188)


--- trunk/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp	2013-09-06 12:07:47 UTC (rev 155187)
+++ trunk/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp	2013-09-06 13:33:03 UTC (rev 155188)
@@ -67,7 +67,7 @@
 void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef imageRef, WKArrayRef repaintRects)
 {
     QImage image;
-    if (PlatformWebView::windowShapshotEnabled()) {
+    if (PlatformWebView::windowSnapshotEnabled()) {
         image = WKImageCreateQImage(TestController::shared().mainWebView()->windowSnapshotImage().get());
     } else
         image = WKImageCreateQImage(imageRef);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to