Title: [101525] trunk/Tools
Revision
101525
Author
[email protected]
Date
2011-11-30 09:35:11 -0800 (Wed, 30 Nov 2011)

Log Message

[Qt] Add a fullscreen option to MiniBrowser.
https://bugs.webkit.org/show_bug.cgi?id=73445

Reviewed by Noam Rosenthal.

This bypasses the compositor on the N9 to increase performances
and remove the huge useless gray bar part of the window frame
at the bottom.

* MiniBrowser/qt/BrowserWindow.cpp:
(BrowserWindow::BrowserWindow):
* MiniBrowser/qt/MiniBrowserApplication.cpp:
(printHelp):
(MiniBrowserApplication::handleUserOptions):
* MiniBrowser/qt/MiniBrowserApplication.h:
(WindowOptions::setStartFullScreen):
(WindowOptions::startFullScreen):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (101524 => 101525)


--- trunk/Tools/ChangeLog	2011-11-30 17:25:17 UTC (rev 101524)
+++ trunk/Tools/ChangeLog	2011-11-30 17:35:11 UTC (rev 101525)
@@ -1,3 +1,23 @@
+2011-11-30  Jocelyn Turcotte  <[email protected]>
+
+        [Qt] Add a fullscreen option to MiniBrowser.
+        https://bugs.webkit.org/show_bug.cgi?id=73445
+
+        Reviewed by Noam Rosenthal.
+
+        This bypasses the compositor on the N9 to increase performances
+        and remove the huge useless gray bar part of the window frame
+        at the bottom.
+
+        * MiniBrowser/qt/BrowserWindow.cpp:
+        (BrowserWindow::BrowserWindow):
+        * MiniBrowser/qt/MiniBrowserApplication.cpp:
+        (printHelp):
+        (MiniBrowserApplication::handleUserOptions):
+        * MiniBrowser/qt/MiniBrowserApplication.h:
+        (WindowOptions::setStartFullScreen):
+        (WindowOptions::startFullScreen):
+
 2011-11-30  Martin Robinson  <[email protected]>
 
         [GTK] Add an initial jhbuild setup which installs fonts into the WebKitBuild

Modified: trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp (101524 => 101525)


--- trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp	2011-11-30 17:25:17 UTC (rev 101524)
+++ trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp	2011-11-30 17:35:11 UTC (rev 101525)
@@ -53,11 +53,15 @@
     connect(rootObject(), SIGNAL(pageTitleChanged(QString)), this, SLOT(setWindowTitle(QString)));
     if (!options->useTouchWebView())
         webView()->experimental()->setUseTraditionalDesktopBehaviour(true);
-    if (options->startMaximized())
-        setWindowState(Qt::WindowMaximized);
-    else
-        resize(options->requestedWindowSize());
-    show();
+    if (options->startFullScreen())
+        showFullScreen();
+    else {
+        if (options->startMaximized())
+            setWindowState(Qt::WindowMaximized);
+        else
+            resize(options->requestedWindowSize());
+        show();
+    }
 }
 
 QQuickWebView* BrowserWindow::webView() const

Modified: trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp (101524 => 101525)


--- trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp	2011-11-30 17:25:17 UTC (rev 101524)
+++ trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp	2011-11-30 17:35:11 UTC (rev 101525)
@@ -169,11 +169,12 @@
 {
     qDebug() << "Usage:" << programName.toLatin1().data()
          << "[--touch]"
-         << "[--maximize]"
-         << "[--window-size (width)x(height)]"
          << "[-r list]"
          << "[--robot-timeout seconds]"
          << "[--robot-extra-time seconds]"
+         << "[--window-size (width)x(height)]"
+         << "[--maximize]"
+         << "[-f]                                    Full screen mode."
          << "[-v]"
          << "URL";
 }
@@ -194,6 +195,7 @@
     m_windowOptions.setUseTouchWebView(takeOptionFlag(&args, "--touch"));
     m_windowOptions.setPrintLoadedUrls(takeOptionFlag(&args, "-v"));
     m_windowOptions.setStartMaximized(takeOptionFlag(&args, "--maximize"));
+    m_windowOptions.setStartFullScreen(takeOptionFlag(&args, "-f"));
 
     if (args.contains("--window-size")) {
         QString value = takeOptionValue(&args, "--window-size");

Modified: trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.h (101524 => 101525)


--- trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.h	2011-11-30 17:25:17 UTC (rev 101524)
+++ trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.h	2011-11-30 17:35:11 UTC (rev 101525)
@@ -60,6 +60,8 @@
     bool useTouchWebView() const { return m_useTouchWebView; }
     void setStartMaximized(bool enabled) { m_startMaximized = enabled; }
     bool startMaximized() const { return m_startMaximized; }
+    void setStartFullScreen(bool enabled) { m_startFullScreen = enabled; }
+    bool startFullScreen() const { return m_startFullScreen; }
     void setRequestedWindowSize(const QSize& size) { m_windowSize = size; }
     QSize requestedWindowSize() const { return m_windowSize; }
 
@@ -67,6 +69,7 @@
     bool m_printLoadedUrls;
     bool m_useTouchWebView;
     bool m_startMaximized;
+    bool m_startFullScreen;
     QSize m_windowSize;
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to