2011-02-05 Sheriff Bot <webkit.review.bot@gmail.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2011 08:02:23 +0000 (08:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2011 08:02:23 +0000 (08:02 +0000)
        Unreviewed, rolling out r77725.
        http://trac.webkit.org/changeset/77725
        https://bugs.webkit.org/show_bug.cgi?id=53844

        It broke Qt minimal build (Requested by Ossy_ on #webkit).

        * QtTestBrowser/launcherwindow.cpp:
        (LauncherWindow::createChrome):
        * QtTestBrowser/launcherwindow.h:
        (WindowOptions::WindowOptions):
        * QtTestBrowser/main.cpp:
        (LauncherApplication::handleUserOptions):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77737 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/QtTestBrowser/launcherwindow.cpp
Tools/QtTestBrowser/launcherwindow.h
Tools/QtTestBrowser/main.cpp

index d007aea8e8bfc343da7f849720ff2224a0d76fd8..ebbb116cc5084570c207f50487df8b3526c3d070 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-05  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r77725.
+        http://trac.webkit.org/changeset/77725
+        https://bugs.webkit.org/show_bug.cgi?id=53844
+
+        It broke Qt minimal build (Requested by Ossy_ on #webkit).
+
+        * QtTestBrowser/launcherwindow.cpp:
+        (LauncherWindow::createChrome):
+        * QtTestBrowser/launcherwindow.h:
+        (WindowOptions::WindowOptions):
+        * QtTestBrowser/main.cpp:
+        (LauncherApplication::handleUserOptions):
+
 2011-02-04  Martin Robinson  <mrobinson@igalia.com>
 
         Reviewed by Adam Barth.
 2011-02-04  Martin Robinson  <mrobinson@igalia.com>
 
         Reviewed by Adam Barth.
index 21f43c56aa731cb38fd451620800d3e5a6469574..666942f4edfb4ed337166d654cefacba94dd5816 100644 (file)
@@ -264,24 +264,6 @@ void LauncherWindow::createChrome()
 
     toolsMenu->addSeparator();
 
 
     toolsMenu->addSeparator();
 
-    QAction* toggleLocalStorage = toolsMenu->addAction("Enable Local Storage", this, SLOT(toggleLocalStorage(bool)));
-    toggleLocalStorage->setCheckable(true);
-    toggleLocalStorage->setChecked(m_windowOptions.useLocalStorage);
-
-    QAction* toggleOfflineStorageDatabase = toolsMenu->addAction("Enable Offline Storage Database", this, SLOT(toggleOfflineStorageDatabase(bool)));
-    toggleOfflineStorageDatabase->setCheckable(true);
-    toggleOfflineStorageDatabase->setChecked(m_windowOptions.useOfflineStorageDatabase);
-
-    QAction* toggleOfflineWebApplicationCache = toolsMenu->addAction("Enable Offline Web Application Cache", this, SLOT(toggleOfflineWebApplicationCache(bool)));
-    toggleOfflineWebApplicationCache->setCheckable(true);
-    toggleOfflineWebApplicationCache->setChecked(m_windowOptions.useOfflineWebApplicationCache);
-
-    QAction* offlineStorageDefaultQuotaAction = toolsMenu->addAction("Set Offline Storage Default Quota Size", this, SLOT(setOfflineStorageDefaultQuota()));
-    offlineStorageDefaultQuotaAction->setCheckable(true);
-    offlineStorageDefaultQuotaAction->setChecked(m_windowOptions.offlineStorageDefaultQuotaSize);
-
-    toolsMenu->addSeparator();
-
     QAction* userAgentAction = toolsMenu->addAction("Change User Agent", this, SLOT(showUserAgentDialog()));
     userAgentAction->setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_U));
 
     QAction* userAgentAction = toolsMenu->addAction("Change User Agent", this, SLOT(showUserAgentDialog()));
     userAgentAction->setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_U));
 
@@ -920,38 +902,6 @@ void LauncherWindow::updateFPS(int fps)
 #endif
 }
 
 #endif
 }
 
-void LauncherWindow::toggleLocalStorage(bool toggle)
-{
-    m_windowOptions.useLocalStorage = toggle;
-    page()->settings()->setAttribute(QWebSettings::LocalStorageEnabled, toggle);
-}
-
-void LauncherWindow::toggleOfflineStorageDatabase(bool toggle)
-{
-    m_windowOptions.useOfflineStorageDatabase = toggle;
-    page()->settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, toggle);
-}
-
-void LauncherWindow::toggleOfflineWebApplicationCache(bool toggle)
-{
-    m_windowOptions.useOfflineWebApplicationCache = toggle;
-    page()->settings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, toggle);
-}
-
-void LauncherWindow::setOfflineStorageDefaultQuota()
-{
-    // For command line execution, quota size is taken from command line.   
-    if (m_windowOptions.offlineStorageDefaultQuotaSize)
-        page()->settings()->setOfflineStorageDefaultQuota(m_windowOptions.offlineStorageDefaultQuotaSize);
-    else {
-        bool ok;
-        // Maximum size is set to 25 * 1024 * 1024.
-        int quotaSize = QInputDialog::getInt(this, "Offline Storage Default Quota Size" , "Quota Size", 0, 0, 26214400, 1, &ok);
-        if (ok) 
-            page()->settings()->setOfflineStorageDefaultQuota(quotaSize);
-    }
-}
-
 LauncherWindow* LauncherWindow::newWindow()
 {
     LauncherWindow* mw = new LauncherWindow(&m_windowOptions);
 LauncherWindow* LauncherWindow::newWindow()
 {
     LauncherWindow* mw = new LauncherWindow(&m_windowOptions);
index c879318483ea416925714ca7a545fa72ebbeb416..4487f658ac110bfe47c192e0aa1366661fab2c56 100644 (file)
@@ -94,10 +94,6 @@ public:
         , showFrameRate(false)
         , resizesToContents(false)
         , viewportUpdateMode(QGraphicsView::MinimalViewportUpdate)
         , showFrameRate(false)
         , resizesToContents(false)
         , viewportUpdateMode(QGraphicsView::MinimalViewportUpdate)
-        , useLocalStorage(false)
-        , useOfflineStorageDatabase(false)
-        , useOfflineWebApplicationCache(false)
-        , offlineStorageDefaultQuotaSize(0)
 #if defined(QT_CONFIGURED_WITH_OPENGL)
         , useQGLWidgetViewport(false)
 #endif
 #if defined(QT_CONFIGURED_WITH_OPENGL)
         , useQGLWidgetViewport(false)
 #endif
@@ -119,10 +115,6 @@ public:
 #endif
     QUrl inspectorUrl;
     quint16 remoteInspectorPort;
 #endif
     QUrl inspectorUrl;
     quint16 remoteInspectorPort;
-    bool useLocalStorage;
-    bool useOfflineStorageDatabase;
-    bool useOfflineWebApplicationCache;
-    quint64 offlineStorageDefaultQuotaSize;
 };
 
 class LauncherWindow : public MainWindow {
 };
 
 class LauncherWindow : public MainWindow {
@@ -173,10 +165,6 @@ protected slots:
     void toggleJavascriptCanOpenWindows(bool enable);
     void toggleAutoLoadImages(bool enable);
     void togglePlugins(bool enable);
     void toggleJavascriptCanOpenWindows(bool enable);
     void toggleAutoLoadImages(bool enable);
     void togglePlugins(bool enable);
-    void toggleLocalStorage(bool toggle);
-    void toggleOfflineStorageDatabase(bool toggle);
-    void toggleOfflineWebApplicationCache(bool toggle);
-    void setOfflineStorageDefaultQuota();
 
 #if defined(QT_CONFIGURED_WITH_OPENGL)
     void toggleQGLWidgetViewport(bool enable);
 
 #if defined(QT_CONFIGURED_WITH_OPENGL)
     void toggleQGLWidgetViewport(bool enable);
index eecd9c30dc3acb3e9bd1926c3e27cf7692a481e1..ec5f1d9408de2bb31d9bf4cdc291b94c5438fad2 100644 (file)
@@ -164,18 +164,18 @@ void LauncherApplication::handleUserOptions()
     }
     
     if (args.contains("-local-storage-enabled"))
     }
     
     if (args.contains("-local-storage-enabled"))
-        windowOptions.useLocalStorage = true;
+        QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
         
     if (args.contains("-offline-storage-database-enabled"))
         
     if (args.contains("-offline-storage-database-enabled"))
-        windowOptions.useOfflineStorageDatabase = true;
+        QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
         
     if (args.contains("-offline-web-application-cache-enabled"))   
         
     if (args.contains("-offline-web-application-cache-enabled"))   
-        windowOptions.useOfflineWebApplicationCache = true;
+        QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
     
     int setOfflineStorageDefaultQuotaIndex = args.indexOf("-set-offline-storage-default-quota");
     if (setOfflineStorageDefaultQuotaIndex != -1) {
     
     int setOfflineStorageDefaultQuotaIndex = args.indexOf("-set-offline-storage-default-quota");
     if (setOfflineStorageDefaultQuotaIndex != -1) {
-        unsigned int maxSize = takeOptionValue(&args, setOfflineStorageDefaultQuotaIndex).toUInt();
-        windowOptions.offlineStorageDefaultQuotaSize = maxSize;
+        int maxSize = takeOptionValue(&args, setOfflineStorageDefaultQuotaIndex).toInt();
+        QWebSettings::globalSettings()->setOfflineStorageDefaultQuota(maxSize);
     }   
     
     if (defaultForAnimations)
     }   
     
     if (defaultForAnimations)