Changeset 64354 in webkit


Ignore:
Timestamp:
Jul 30, 2010 6:31:53 AM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

2010-07-29 Antonio Gomes <tonikitoo@webkit.org>

Reviewed by Kenneth Christiansen.

[Qt] QtTestBrowser: -resizes-to-contents command line parameter is broken
https://bugs.webkit.org/show_bug.cgi?id=43209

When -resizes-to-content was being passed as a command line parameter it was simply
not being set (although the corresponding menu item was marked as ON).
User had to toggle the menu OFF and then ON again for it to take place.

Reason: LauncherWindow::applyPrefs method sets many user options passed in from
the command line, but not resizesToContents. Patch addresses that.

  • QtTestBrowser/launcherwindow.cpp: (LauncherWindow::createChrome): (LauncherWindow::applyPrefs): (LauncherWindow::toggleResizesToContents):
  • QtTestBrowser/webview.h: (WebViewGraphicsBased::resizesToContents):
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r64353 r64354  
     12010-07-29  Antonio Gomes  <tonikitoo@webkit.org>
     2
     3        Reviewed by Kenneth Christiansen.
     4
     5        [Qt] QtTestBrowser: -resizes-to-contents command line parameter is broken
     6        https://bugs.webkit.org/show_bug.cgi?id=43209
     7
     8        When -resizes-to-content was being passed as a command line parameter it was simply
     9        not being set (although the corresponding menu item was marked as ON).
     10        User had to toggle the menu OFF and then ON again for it to take place.
     11
     12        Reason: LauncherWindow::applyPrefs method sets many user options passed in from
     13        the command line, but not resizesToContents. Patch addresses that.
     14
     15        * QtTestBrowser/launcherwindow.cpp:
     16        (LauncherWindow::createChrome):
     17        (LauncherWindow::applyPrefs):
     18        (LauncherWindow::toggleResizesToContents):
     19        * QtTestBrowser/webview.h:
     20        (WebViewGraphicsBased::resizesToContents):
     21
    1222010-07-29  Antonio Gomes  <tonikitoo@webkit.org>
    223
  • trunk/WebKitTools/QtTestBrowser/launcherwindow.cpp

    r64353 r64354  
    278278    QAction* toggleResizesToContents = graphicsViewMenu->addAction("Toggle Resizes To Contents Mode", this, SLOT(toggleResizesToContents(bool)));
    279279    toggleResizesToContents->setCheckable(true);
    280     toggleResizesToContents->setChecked(false);
     280    toggleResizesToContents->setChecked(gResizesToContents);
    281281    toggleResizesToContents->setEnabled(isGraphicsBased());
    282282    toggleResizesToContents->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
     
    400400    view->setFrameRateMeasurementEnabled(otherView ? otherView->frameRateMeasurementEnabled() : gShowFrameRate);
    401401
    402     if (otherView)
     402    if (otherView) {
    403403        view->setItemCacheMode(otherView->itemCacheMode());
    404     else
     404        view->setResizesToContents(otherView->resizesToContents());
     405    } else {
    405406        view->setItemCacheMode(gCacheWebView ? QGraphicsItem::DeviceCoordinateCache : QGraphicsItem::NoCache);
     407        view->setResizesToContents(gResizesToContents);
     408    }
    406409}
    407410
     
    720723void LauncherWindow::toggleResizesToContents(bool toggle)
    721724{
     725    gResizesToContents = toggle;
    722726    static_cast<WebViewGraphicsBased*>(m_view)->setResizesToContents(toggle);
    723727}
  • trunk/WebKitTools/QtTestBrowser/webview.h

    r58047 r64354  
    8383
    8484    void setResizesToContents(bool b);
     85    bool resizesToContents() const { return m_resizesToContents; }
    8586
    8687    void setYRotation(qreal angle)
Note: See TracChangeset for help on using the changeset viewer.