[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tonikitoo at webkit.org tonikitoo at webkit.org
Wed Dec 22 11:52:06 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1a05a0fa9f432ad186f16ad796f765535c1776dc
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 10 03:59:30 2010 +0000

    2010-08-09  Antonio Gomes  <tonikitoo at webkit.org>
    
            Reviewed by Ariya Hidayat.
    
            [Qt] QtTestBrowser: Clean up LauncherWindow code.
    
            * QtTestBrowser/launcherwindow.cpp:
            (LauncherWindow::LauncherWindow): Moves applyPrefs methods call from the constructor to init().
            (LauncherWindow::init): Fixed comments.
            (LauncherWindow::applyPrefs): Move the method around.
            (LauncherWindow::createChrome): Move more code of this method around, for grouping, and fixing up comments.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65049 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 993c353..c5f3747 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,18 @@
 
         Reviewed by Ariya Hidayat.
 
+        [Qt] QtTestBrowser: Clean up LauncherWindow code.
+
+        * QtTestBrowser/launcherwindow.cpp:
+        (LauncherWindow::LauncherWindow): Moves applyPrefs methods call from the constructor to init().
+        (LauncherWindow::init): Fixed comments.
+        (LauncherWindow::applyPrefs): Move the method around.
+        (LauncherWindow::createChrome): Move more code of this method around, for grouping, and fixing up comments.
+
+2010-08-09  Antonio Gomes  <tonikitoo at webkit.org>
+
+        Reviewed by Ariya Hidayat.
+
         [Qt] QtTestBrowser: make reset-zooming to animate when tiled backing store is on.
 
         It gets control+0 the same visual effect as control++ or control-.
diff --git a/WebKitTools/QtTestBrowser/launcherwindow.cpp b/WebKitTools/QtTestBrowser/launcherwindow.cpp
index d62b4a9..095a984 100644
--- a/WebKitTools/QtTestBrowser/launcherwindow.cpp
+++ b/WebKitTools/QtTestBrowser/launcherwindow.cpp
@@ -49,7 +49,6 @@ LauncherWindow::LauncherWindow(WindowOptions* data, QGraphicsScene* sharedScene)
         m_windowOptions = *data;
 
     init();
-    applyPrefs();
     if (sharedScene && data->useGraphicsView)
         static_cast<QGraphicsView*>(m_view)->setScene(sharedScene);
 
@@ -81,6 +80,8 @@ void LauncherWindow::init()
             this, SLOT(showLinkHover(const QString&, const QString&)));
     connect(this, SIGNAL(enteredFullScreenMode(bool)), this, SLOT(toggleFullScreenMode(bool)));
 
+    applyPrefs();
+
     m_inspector = new WebInspector(splitter);
 #ifndef QT_NO_PROPERTIES
     if (!m_windowOptions.inspectorUrl.isEmpty())
@@ -132,6 +133,26 @@ void LauncherWindow::initializeView()
 #endif
 }
 
+void LauncherWindow::applyPrefs()
+{
+    QWebSettings* settings = page()->settings();
+    settings->setAttribute(QWebSettings::AcceleratedCompositingEnabled, m_windowOptions.useCompositing);
+    settings->setAttribute(QWebSettings::TiledBackingStoreEnabled, m_windowOptions.useTiledBackingStore);
+    settings->setAttribute(QWebSettings::FrameFlatteningEnabled, m_windowOptions.useFrameFlattening);
+    settings->setAttribute(QWebSettings::WebGLEnabled, m_windowOptions.useWebGL);
+
+    if (!isGraphicsBased())
+        return;
+
+    WebViewGraphicsBased* view = static_cast<WebViewGraphicsBased*>(m_view);
+    view->setViewportUpdateMode(m_windowOptions.viewportUpdateMode);
+    view->setFrameRateMeasurementEnabled(m_windowOptions.showFrameRate);
+    view->setItemCacheMode(m_windowOptions.cacheWebView ? QGraphicsItem::DeviceCoordinateCache : QGraphicsItem::NoCache);
+
+    if (m_windowOptions.resizesToContents)
+        toggleResizesToContents(m_windowOptions.resizesToContents);
+}
+
 void LauncherWindow::createChrome()
 {
     QMenu* fileMenu = menuBar()->addMenu("&File");
@@ -170,6 +191,10 @@ void LauncherWindow::createChrome()
     viewMenu->addAction("Dump HTML", this, SLOT(dumpHtml()));
     // viewMenu->addAction("Dump plugins", this, SLOT(dumpPlugins()));
 
+    zoomIn->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Plus));
+    zoomOut->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Minus));
+    resetZoom->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
+
     QMenu* formatMenu = new QMenu("F&ormat", this);
     m_formatMenuAction = menuBar()->addMenu(formatMenu);
     m_formatMenuAction->setVisible(false);
@@ -181,23 +206,17 @@ void LauncherWindow::createChrome()
     writingMenu->addAction(page()->action(QWebPage::SetTextDirectionLeftToRight));
     writingMenu->addAction(page()->action(QWebPage::SetTextDirectionRightToLeft));
 
-    zoomIn->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Plus));
-    zoomOut->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Minus));
-    resetZoom->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
-
     QMenu* windowMenu = menuBar()->addMenu("&Window");
     QAction* toggleFullScreen = windowMenu->addAction("Toggle FullScreen", this, SIGNAL(enteredFullScreenMode(bool)));
     toggleFullScreen->setCheckable(true);
     toggleFullScreen->setChecked(false);
-
-    // when exit fullscreen mode by clicking on the exit area (bottom right corner) we must
-    // uncheck the Toggle FullScreen action
+    // When exit fullscreen mode by clicking on the exit area (bottom right corner) we must
+    // uncheck the Toggle FullScreen action.
     toggleFullScreen->connect(this, SIGNAL(enteredFullScreenMode(bool)), SLOT(setChecked(bool)));
 
-    QMenu* toolsMenu = menuBar()->addMenu("&Develop");
-
     QWebSettings* settings = page()->settings();
 
+    QMenu* toolsMenu = menuBar()->addMenu("&Develop");
     QMenu* graphicsViewMenu = toolsMenu->addMenu("QGraphicsView");
     QAction* toggleGraphicsView = graphicsViewMenu->addAction("Toggle use of QGraphicsView", this, SLOT(initializeView()));
     toggleGraphicsView->setCheckable(true);
@@ -349,28 +368,6 @@ bool LauncherWindow::isGraphicsBased() const
     return bool(qobject_cast<QGraphicsView*>(m_view));
 }
 
-void LauncherWindow::applyPrefs()
-{
-    QWebSettings* settings = page()->settings();
-    settings->setAttribute(QWebSettings::AcceleratedCompositingEnabled, m_windowOptions.useCompositing);
-    settings->setAttribute(QWebSettings::TiledBackingStoreEnabled, m_windowOptions.useTiledBackingStore);
-    settings->setAttribute(QWebSettings::FrameFlatteningEnabled, m_windowOptions.useFrameFlattening);
-    settings->setAttribute(QWebSettings::WebGLEnabled, m_windowOptions.useWebGL);
-
-    if (!isGraphicsBased())
-        return;
-
-    WebViewGraphicsBased* view = static_cast<WebViewGraphicsBased*>(m_view);
-    view->setViewportUpdateMode(m_windowOptions.viewportUpdateMode);
-    view->setFrameRateMeasurementEnabled(m_windowOptions.showFrameRate);
-    view->setItemCacheMode(m_windowOptions.cacheWebView ? QGraphicsItem::DeviceCoordinateCache : QGraphicsItem::NoCache);
-
-    if (m_windowOptions.resizesToContents) {
-        view->setCustomLayoutSize(size());
-        toggleResizesToContents(m_windowOptions.resizesToContents);
-    }
-}
-
 void LauncherWindow::keyPressEvent(QKeyEvent* event)
 {
 #ifdef Q_WS_MAEMO_5

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list