Title: [131339] trunk
Revision
131339
Author
o...@webkit.org
Date
2012-10-15 12:53:00 -0700 (Mon, 15 Oct 2012)

Log Message

Unreviewed, rolling out r131306 and r131307.
http://trac.webkit.org/changeset/131306
http://trac.webkit.org/changeset/131307
https://bugs.webkit.org/show_bug.cgi?id=99354

It made layout testing extremely slow again (Requested by
Ossy_night on #webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2012-10-15

Source/WebKit2:

* Shared/API/c/qt/WKImageQt.cpp:
(WKImageCreateQImage):
* Shared/API/c/qt/WKImageQt.h:

Tools:

* WebKitTestRunner/Target.pri:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/TestInvocation.h:
(TestInvocation):
* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::WrapperWindow::handleStatusChanged):
(WTR::PlatformWebView::windowSnapshotImage):
* WebKitTestRunner/qt/TestInvocationQt.cpp:
(WTR::TestInvocation::dumpPixelsAndCompareWithExpected):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (131338 => 131339)


--- trunk/Source/WebKit2/ChangeLog	2012-10-15 19:47:07 UTC (rev 131338)
+++ trunk/Source/WebKit2/ChangeLog	2012-10-15 19:53:00 UTC (rev 131339)
@@ -1,3 +1,17 @@
+2012-10-15  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r131306 and r131307.
+        http://trac.webkit.org/changeset/131306
+        http://trac.webkit.org/changeset/131307
+        https://bugs.webkit.org/show_bug.cgi?id=99354
+
+        It made layout testing extremely slow again (Requested by
+        Ossy_night on #webkit).
+
+        * Shared/API/c/qt/WKImageQt.cpp:
+        (WKImageCreateQImage):
+        * Shared/API/c/qt/WKImageQt.h:
+
 2012-10-15  Christophe Dumez  <christophe.du...@intel.com>
 
         [EFL][WK2] Implement Favicons API

Modified: trunk/Source/WebKit2/Shared/API/c/qt/WKImageQt.cpp (131338 => 131339)


--- trunk/Source/WebKit2/Shared/API/c/qt/WKImageQt.cpp	2012-10-15 19:47:07 UTC (rev 131338)
+++ trunk/Source/WebKit2/Shared/API/c/qt/WKImageQt.cpp	2012-10-15 19:53:00 UTC (rev 131339)
@@ -25,30 +25,10 @@
 #include "ShareableBitmap.h"
 #include "WKSharedAPICast.h"
 #include "WebImage.h"
-#include <QPainter>
-#include <WebCore/GraphicsContext.h>
-#include <WebCore/IntSize.h>
 
-using namespace WebCore;
 using namespace WebKit;
 
 QImage WKImageCreateQImage(WKImageRef imageRef)
 {
     return toImpl(imageRef)->bitmap()->createQImage().copy();
 }
-
-WKImageRef WKImageCreateFromQImage(const QImage& image)
-{
-    if (image.isNull())
-        return 0;
-
-    ASSERT(image.bytesPerLine() == image.width() * 4);
-
-    RefPtr<WebImage> webImage = WebImage::create(image.size(), static_cast<ImageOptions>(0));
-    if (!webImage->bitmap())
-        return 0;
-    OwnPtr<GraphicsContext> graphicsContext = webImage->bitmap()->createGraphicsContext();
-    QPainter* painter = graphicsContext->platformContext();
-    painter->drawImage(QPoint(0, 0), image);
-    return toAPI(webImage.release().leakRef());
-}

Modified: trunk/Source/WebKit2/Shared/API/c/qt/WKImageQt.h (131338 => 131339)


--- trunk/Source/WebKit2/Shared/API/c/qt/WKImageQt.h	2012-10-15 19:47:07 UTC (rev 131338)
+++ trunk/Source/WebKit2/Shared/API/c/qt/WKImageQt.h	2012-10-15 19:53:00 UTC (rev 131339)
@@ -27,6 +27,5 @@
 #include <WebKit2/WKImage.h>
 
 WK_EXPORT QImage WKImageCreateQImage(WKImageRef image);
-WK_EXPORT WKImageRef WKImageCreateFromQImage(const QImage& image);
 
 #endif

Modified: trunk/Tools/ChangeLog (131338 => 131339)


--- trunk/Tools/ChangeLog	2012-10-15 19:47:07 UTC (rev 131338)
+++ trunk/Tools/ChangeLog	2012-10-15 19:53:00 UTC (rev 131339)
@@ -1,5 +1,27 @@
 2012-10-15  Sheriff Bot  <webkit.review....@gmail.com>
 
+        Unreviewed, rolling out r131306 and r131307.
+        http://trac.webkit.org/changeset/131306
+        http://trac.webkit.org/changeset/131307
+        https://bugs.webkit.org/show_bug.cgi?id=99354
+
+        It made layout testing extremely slow again (Requested by
+        Ossy_night on #webkit).
+
+        * WebKitTestRunner/Target.pri:
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::invoke):
+        (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+        * WebKitTestRunner/TestInvocation.h:
+        (TestInvocation):
+        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+        (WTR::WrapperWindow::handleStatusChanged):
+        (WTR::PlatformWebView::windowSnapshotImage):
+        * WebKitTestRunner/qt/TestInvocationQt.cpp:
+        (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-10-15  Sheriff Bot  <webkit.review....@gmail.com>
+
         Unreviewed, rolling out r131327.
         http://trac.webkit.org/changeset/131327
         https://bugs.webkit.org/show_bug.cgi?id=99353

Modified: trunk/Tools/WebKitTestRunner/Target.pri (131338 => 131339)


--- trunk/Tools/WebKitTestRunner/Target.pri	2012-10-15 19:47:07 UTC (rev 131338)
+++ trunk/Tools/WebKitTestRunner/Target.pri	2012-10-15 19:53:00 UTC (rev 131339)
@@ -31,7 +31,7 @@
 
 DESTDIR = $${ROOT_BUILD_DIR}/bin
 
-QT = core core-private gui gui-private widgets network testlib quick quick-private webkitwidgets qml-private v8-private
+QT = core gui gui-private widgets network testlib quick quick-private webkitwidgets
 
 WEBKIT += wtf _javascript_core webkit2
 

Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (131338 => 131339)


--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2012-10-15 19:47:07 UTC (rev 131338)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2012-10-15 19:53:00 UTC (rev 131339)
@@ -192,8 +192,6 @@
         goto end;
     }
 
-    dumpResults();
-
 end:
 #if ENABLE(INSPECTOR)
     if (m_gotInitialResponse)
@@ -237,17 +235,6 @@
     fflush(stderr);
 }
 
-void TestInvocation::dumpResults()
-{
-    dump(toWTFString(m_textOutput.get()).utf8().data());
-
-    if (m_dumpPixels && m_pixelResult)
-        dumpPixelsAndCompareWithExpected(m_pixelResult.get(), m_repaintRects.get());
-
-    fputs("#EOF\n", stdout);
-    fflush(stdout);
-}
-
 bool TestInvocation::compareActualHashToExpectedAndDumpResults(const char actualHash[33])
 {
     // Compute the hash of the bitmap context pixels
@@ -291,15 +278,26 @@
         WKDictionaryRef messageBodyDictionary = static_cast<WKDictionaryRef>(messageBody);
 
         WKRetainPtr<WKStringRef> textOutputKey(AdoptWK, WKStringCreateWithUTF8CString("TextOutput"));
-        m_textOutput = static_cast<WKStringRef>(WKDictionaryGetItemForKey(messageBodyDictionary, textOutputKey.get()));
+        WKStringRef textOutput = static_cast<WKStringRef>(WKDictionaryGetItemForKey(messageBodyDictionary, textOutputKey.get()));
 
         WKRetainPtr<WKStringRef> pixelResultKey = adoptWK(WKStringCreateWithUTF8CString("PixelResult"));
-        m_pixelResult = static_cast<WKImageRef>(WKDictionaryGetItemForKey(messageBodyDictionary, pixelResultKey.get()));
-        ASSERT(!m_pixelResult || m_dumpPixels);
-
+        WKImageRef pixelResult = static_cast<WKImageRef>(WKDictionaryGetItemForKey(messageBodyDictionary, pixelResultKey.get()));
+        ASSERT(!pixelResult || m_dumpPixels);
+        
         WKRetainPtr<WKStringRef> repaintRectsKey = adoptWK(WKStringCreateWithUTF8CString("RepaintRects"));
-        m_repaintRects = static_cast<WKArrayRef>(WKDictionaryGetItemForKey(messageBodyDictionary, repaintRectsKey.get()));
+        WKArrayRef repaintRects = static_cast<WKArrayRef>(WKDictionaryGetItemForKey(messageBodyDictionary, repaintRectsKey.get()));        
 
+        // Dump text.
+        dump(toWTFString(textOutput).utf8().data());
+
+        // Dump pixels (if necessary).
+        if (m_dumpPixels && pixelResult)
+            dumpPixelsAndCompareWithExpected(pixelResult, repaintRects);
+
+        fputs("#EOF\n", stdout);
+        fflush(stdout);
+        fflush(stderr);
+        
         m_gotFinalMessage = true;
         TestController::shared().notifyDone();
         return;

Modified: trunk/Tools/WebKitTestRunner/TestInvocation.h (131338 => 131339)


--- trunk/Tools/WebKitTestRunner/TestInvocation.h	2012-10-15 19:47:07 UTC (rev 131338)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.h	2012-10-15 19:53:00 UTC (rev 131339)
@@ -46,15 +46,9 @@
 
     static void dumpWebProcessUnresponsiveness(const char* textToStdout);
 private:
-    void dumpResults();
     static void dump(const char* textToStdout, const char* textToStderr = 0, bool seenError = false);
     void dumpPixelsAndCompareWithExpected(WKImageRef, WKArrayRef repaintRects);
     bool compareActualHashToExpectedAndDumpResults(const char[33]);
-
-#if PLATFORM(QT)
-    static void forceRepaintDoneCallback(WKErrorRef, void* context);
-    void forceRepaintDone();
-#endif
     
     WKRetainPtr<WKURLRef> m_url;
     std::string m_pathOrURL;
@@ -67,10 +61,6 @@
     bool m_gotFinalMessage;
     bool m_gotRepaint;
     bool m_error;
-
-    WKRetainPtr<WKStringRef> m_textOutput;
-    WKRetainPtr<WKImageRef> m_pixelResult;
-    WKRetainPtr<WKArrayRef> m_repaintRects;
 };
 
 } // namespace WTR

Modified: trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp (131338 => 131339)


--- trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2012-10-15 19:47:07 UTC (rev 131338)
+++ trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2012-10-15 19:53:00 UTC (rev 131339)
@@ -34,7 +34,6 @@
 #include <QEventLoop>
 #include <QQmlProperty>
 #include <QtQuick/QQuickView>
-#include <QtQuick/private/qquickwindow_p.h>
 #include <WebKit2/WKImageQt.h>
 #include <qpa/qwindowsysteminterface.h>
 
@@ -62,11 +61,6 @@
         m_view->setParentItem(rootObject());
         QQmlProperty::write(m_view, "anchors.fill", qVariantFromValue(rootObject()));
 
-        setSurfaceType(OpenGLSurface);
-        create();
-
-        QQuickWindowPrivate::get(this)->setRenderWithoutShowing(true);
-
         QWindowSystemInterface::handleWindowActivated(this);
         m_view->page()->setFocus(true);
     }
@@ -158,7 +152,9 @@
 
 WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
 {
-    return adoptWK(WKImageCreateFromQImage(m_window->grabWindow()));
+    // FIXME: implement to capture pixels in the UI process,
+    // which may be necessary to capture things like 3D transforms.
+    return 0;
 }
 
 } // namespace WTR

Modified: trunk/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp (131338 => 131339)


--- trunk/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp	2012-10-15 19:47:07 UTC (rev 131338)
+++ trunk/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp	2012-10-15 19:53:00 UTC (rev 131339)
@@ -27,8 +27,6 @@
 
 #include "TestInvocation.h"
 
-#include "PlatformWebView.h"
-#include "TestController.h"
 #include <QBuffer>
 #include <QCryptographicHash>
 #include <QtGui/QPainter>
@@ -65,29 +63,10 @@
     fflush(stdout);
 }
 
-void TestInvocation::forceRepaintDoneCallback(WKErrorRef, void *context)
-{
-    static_cast<TestInvocation*>(context)->m_gotRepaint = true;
-    TestController::shared().notifyDone();
-}
-
 void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef imageRef, WKArrayRef repaintRects)
 {
-    WKPageRef page = TestController::shared().mainWebView()->page();
-    WKPageForceRepaint(page, this, &forceRepaintDoneCallback);
+    QImage image = WKImageCreateQImage(imageRef);
 
-    TestController::shared().runUntil(m_gotRepaint, TestController::ShortTimeout);
-
-    QImage image;
-    if (m_gotRepaint)
-        image = WKImageCreateQImage(TestController::shared().mainWebView()->windowSnapshotImage().get());
-    else {
-        // The test harness expects an image so we output an empty one.
-        WKRect windowRect = TestController::shared().mainWebView()->windowFrame();
-        image = QImage(QSize(windowRect.size.width, windowRect.size.height), QImage::Format_ARGB32_Premultiplied);
-        image.fill(Qt::red);
-    }
-
     if (repaintRects) {
         QImage mask(image.size(), image.format());
         mask.fill(QColor(0, 0, 0, 0.66 * 255));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to