Title: [109232] trunk/Tools
Revision
109232
Author
[email protected]
Date
2012-02-29 10:56:11 -0800 (Wed, 29 Feb 2012)

Log Message

[Qt][WK2] WebKitTestRunner should use 480x360 sized view for W3C SVG tests
https://bugs.webkit.org/show_bug.cgi?id=76546

Reviewed by Simon Hausmann.

Revert the workaround introduced in r107868 and reintroduce
the qml binding so we can test the code path that we are more
interested in. The reason that it did not work before is that
we don't have an active platform window which we now workaround
by propagating the resize through QWindowSystemInterface.

* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::WrapperWindow::handleStatusChanged):
(WTR::PlatformWebView::resizeTo):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (109231 => 109232)


--- trunk/Tools/ChangeLog	2012-02-29 18:55:12 UTC (rev 109231)
+++ trunk/Tools/ChangeLog	2012-02-29 18:56:11 UTC (rev 109232)
@@ -1,3 +1,20 @@
+2012-02-29  Balazs Kelemen  <[email protected]>
+
+        [Qt][WK2] WebKitTestRunner should use 480x360 sized view for W3C SVG tests
+        https://bugs.webkit.org/show_bug.cgi?id=76546
+
+        Reviewed by Simon Hausmann.
+
+        Revert the workaround introduced in r107868 and reintroduce
+        the qml binding so we can test the code path that we are more
+        interested in. The reason that it did not work before is that
+        we don't have an active platform window which we now workaround
+        by propagating the resize through QWindowSystemInterface.
+
+        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+        (WTR::WrapperWindow::handleStatusChanged):
+        (WTR::PlatformWebView::resizeTo):
+
 2012-02-29  Gabor Rapcsanyi  <[email protected]>
 
         [GTK] Small fix for cross compilation to not generate gtkdoc.

Modified: trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp (109231 => 109232)


--- trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2012-02-29 18:55:12 UTC (rev 109231)
+++ trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp	2012-02-29 18:56:11 UTC (rev 109232)
@@ -55,14 +55,10 @@
             return;
 
         setGeometry(0, 0, 800, 600);
-        m_view->setX(0);
-        m_view->setY(0);
-        m_view->setWidth(800);
-        m_view->setHeight(600);
 
         setResizeMode(QQuickView::SizeRootObjectToView);
-
         m_view->setParentItem(rootObject());
+        QDeclarativeProperty::write(m_view, "anchors.fill", qVariantFromValue(rootObject()));
 
         QWindowSystemInterface::handleWindowActivated(this);
         m_view->page()->setFocus(true);
@@ -91,9 +87,15 @@
 
 void PlatformWebView::resizeTo(unsigned width, unsigned height)
 {
+    // If we do not have a platform window we will never get the necessary
+    // resize event, so simulate it in that case to make sure the quickview is
+    // resized to what the layout test expects.
+    if (!m_window->handle()) {
+        QRect newGeometry(m_window->x(), m_window->y(), width, height);
+        QWindowSystemInterface::handleSynchronousGeometryChange(m_window, newGeometry);
+    }
+
     m_window->resize(width, height);
-    m_view->setWidth(width);
-    m_view->setHeight(height);
 }
 
 WKPageRef PlatformWebView::page()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to