Changeset 109232 in webkit


Ignore:
Timestamp:
Feb 29, 2012 10:56:11 AM (12 years ago)
Author:
kbalazs@webkit.org
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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r109206 r109232  
     12012-02-29  Balazs Kelemen  <kbalazs@webkit.org>
     2
     3        [Qt][WK2] WebKitTestRunner should use 480x360 sized view for W3C SVG tests
     4        https://bugs.webkit.org/show_bug.cgi?id=76546
     5
     6        Reviewed by Simon Hausmann.
     7
     8        Revert the workaround introduced in r107868 and reintroduce
     9        the qml binding so we can test the code path that we are more
     10        interested in. The reason that it did not work before is that
     11        we don't have an active platform window which we now workaround
     12        by propagating the resize through QWindowSystemInterface.
     13
     14        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
     15        (WTR::WrapperWindow::handleStatusChanged):
     16        (WTR::PlatformWebView::resizeTo):
     17
    1182012-02-29  Gabor Rapcsanyi  <rgabor@webkit.org>
    219
  • trunk/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp

    r108635 r109232  
    5656
    5757        setGeometry(0, 0, 800, 600);
    58         m_view->setX(0);
    59         m_view->setY(0);
    60         m_view->setWidth(800);
    61         m_view->setHeight(600);
    6258
    6359        setResizeMode(QQuickView::SizeRootObjectToView);
    64 
    6560        m_view->setParentItem(rootObject());
     61        QDeclarativeProperty::write(m_view, "anchors.fill", qVariantFromValue(rootObject()));
    6662
    6763        QWindowSystemInterface::handleWindowActivated(this);
     
    9288void PlatformWebView::resizeTo(unsigned width, unsigned height)
    9389{
     90    // If we do not have a platform window we will never get the necessary
     91    // resize event, so simulate it in that case to make sure the quickview is
     92    // resized to what the layout test expects.
     93    if (!m_window->handle()) {
     94        QRect newGeometry(m_window->x(), m_window->y(), width, height);
     95        QWindowSystemInterface::handleSynchronousGeometryChange(m_window, newGeometry);
     96    }
     97
    9498    m_window->resize(width, height);
    95     m_view->setWidth(width);
    96     m_view->setHeight(height);
    9799}
    98100
Note: See TracChangeset for help on using the changeset viewer.