<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[55460] trunk/WebKitTools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/55460">55460</a></dd>
<dt>Author</dt> <dd>eric@webkit.org</dd>
<dt>Date</dt> <dd>2010-03-03 06:42:19 -0800 (Wed, 03 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>2010-03-03  Jesus Sanchez-Palencia  &lt;jesus.palencia@openbossa.org&gt;

        Reviewed by Simon Hausmann.

        Refactor QtLauncher so it respects command line arguments
        and inherits settings when you clone or create a new window.

        Implemented with help of Kenneth Rohde Christiansen.

        [Qt] QtLauncher must be refactored to fix command line arguments usage
        https://bugs.webkit.org/show_bug.cgi?id=35536

        * QtLauncher/main.cpp:
        (LauncherWindow::LauncherWindow):
        (LauncherWindow::init):
        (LauncherWindow::isGraphicsBased):
        (applySetting):
        (LauncherWindow::applyPrefs):
        (LauncherWindow::initializeView):
        (LauncherWindow::newWindow):
        (LauncherWindow::cloneWindow):
        (LauncherWindow::createChrome):
        (main):
        * QtLauncher/webview.cpp:
        (WebViewGraphicsBased::WebViewGraphicsBased):
        (WebViewGraphicsBased::setFrameRateMeasurementEnabled):
        * QtLauncher/webview.h:
        (WebViewGraphicsBased::itemCacheMode):
        (WebViewGraphicsBased::frameRateMeasurementEnabled):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebKitToolsChangeLog">trunk/WebKitTools/ChangeLog</a></li>
<li><a href="#trunkWebKitToolsQtLaunchermaincpp">trunk/WebKitTools/QtLauncher/main.cpp</a></li>
<li><a href="#trunkWebKitToolsQtLauncherwebviewcpp">trunk/WebKitTools/QtLauncher/webview.cpp</a></li>
<li><a href="#trunkWebKitToolsQtLauncherwebviewh">trunk/WebKitTools/QtLauncher/webview.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebKitToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/ChangeLog (55459 => 55460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/ChangeLog        2010-03-03 13:30:49 UTC (rev 55459)
+++ trunk/WebKitTools/ChangeLog        2010-03-03 14:42:19 UTC (rev 55460)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2010-03-03  Jesus Sanchez-Palencia  &lt;jesus.palencia@openbossa.org&gt;
+
+        Reviewed by Simon Hausmann.
+
+        Refactor QtLauncher so it respects command line arguments
+        and inherits settings when you clone or create a new window.
+
+        Implemented with help of Kenneth Rohde Christiansen.
+
+        [Qt] QtLauncher must be refactored to fix command line arguments usage
+        https://bugs.webkit.org/show_bug.cgi?id=35536
+
+        * QtLauncher/main.cpp:
+        (LauncherWindow::LauncherWindow):
+        (LauncherWindow::init):
+        (LauncherWindow::isGraphicsBased):
+        (applySetting):
+        (LauncherWindow::applyPrefs):
+        (LauncherWindow::initializeView):
+        (LauncherWindow::newWindow):
+        (LauncherWindow::cloneWindow):
+        (LauncherWindow::createChrome):
+        (main):
+        * QtLauncher/webview.cpp:
+        (WebViewGraphicsBased::WebViewGraphicsBased):
+        (WebViewGraphicsBased::setFrameRateMeasurementEnabled):
+        * QtLauncher/webview.h:
+        (WebViewGraphicsBased::itemCacheMode):
+        (WebViewGraphicsBased::frameRateMeasurementEnabled):
+
</ins><span class="cx"> 2010-03-02  Arno Renevier  &lt;arno@renevier.net&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Gustavo Noronha Silva.
</span></span></pre></div>
<a id="trunkWebKitToolsQtLaunchermaincpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/QtLauncher/main.cpp (55459 => 55460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/QtLauncher/main.cpp        2010-03-03 13:30:49 UTC (rev 55459)
+++ trunk/WebKitTools/QtLauncher/main.cpp        2010-03-03 14:42:19 UTC (rev 55460)
</span><span class="lines">@@ -82,8 +82,7 @@
</span><span class="cx">     Q_OBJECT
</span><span class="cx"> 
</span><span class="cx"> public:
</span><del>-    LauncherWindow(QString url = QString());
-    LauncherWindow(QGraphicsScene* scene);
</del><ins>+    LauncherWindow(LauncherWindow* other = 0, bool shareScene = false);
</ins><span class="cx">     virtual ~LauncherWindow();
</span><span class="cx"> 
</span><span class="cx">     virtual void keyPressEvent(QKeyEvent* event);
</span><span class="lines">@@ -121,12 +120,11 @@
</span><span class="cx">     void initializeView(bool useGraphicsView = false);
</span><span class="cx"> 
</span><span class="cx"> public slots:
</span><del>-    void newWindow(const QString&amp; url = QString());
</del><ins>+    void newWindow();
</ins><span class="cx">     void cloneWindow();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    // create the status bar, tool bar &amp; menu
-    void setupUI();
</del><ins>+    void createChrome();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     QVector&lt;int&gt; zoomLevels;
</span><span class="lines">@@ -145,24 +143,32 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void init(bool useGraphicsView = false);
</span><ins>+    bool isGraphicsBased() const;
+    void applyPrefs(LauncherWindow* other = 0);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-
-LauncherWindow::LauncherWindow(QString url)
-    : MainWindow(url)
</del><ins>+LauncherWindow::LauncherWindow(LauncherWindow* other, bool shareScene)
+    : MainWindow()
</ins><span class="cx">     , currentZoom(100)
</span><ins>+    , m_view(0)
+    , inspector(0)
+    , formatMenuAction(0)
+    , flipAnimated(0)
+    , flipYAnimated(0)
</ins><span class="cx"> {
</span><del>-    init();
-    load(url);
-}
</del><ins>+    if (other) {
+        init(other-&gt;isGraphicsBased());
+        applyPrefs(other);
+        if (shareScene &amp;&amp; other-&gt;isGraphicsBased()) {
+            QGraphicsView* otherView = static_cast&lt;QGraphicsView*&gt;(other-&gt;m_view);
+            static_cast&lt;QGraphicsView*&gt;(m_view)-&gt;setScene(otherView-&gt;scene());
+        }
+    } else {
+        init(gUseGraphicsView);
+        applyPrefs();
+    }
</ins><span class="cx"> 
</span><del>-LauncherWindow::LauncherWindow(QGraphicsScene* scene)
-    : MainWindow()
-    , currentZoom(100)
-{
-    init(true); // use QGraphicsView
-    QGraphicsView* view = static_cast&lt;QGraphicsView*&gt;(m_view);
-    view-&gt;setScene(scene);
</del><ins>+    createChrome();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LauncherWindow::~LauncherWindow()
</span><span class="lines">@@ -181,8 +187,6 @@
</span><span class="cx">     resize(800, 600);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    m_view = 0;
-
</del><span class="cx">     initializeView(useGraphicsView);
</span><span class="cx"> 
</span><span class="cx">     connect(page(), SIGNAL(loadStarted()), this, SLOT(loadStarted()));
</span><span class="lines">@@ -198,8 +202,6 @@
</span><span class="cx">     inspector-&gt;hide();
</span><span class="cx">     connect(this, SIGNAL(destroyed()), inspector, SLOT(deleteLater()));
</span><span class="cx"> 
</span><del>-    setupUI();
-
</del><span class="cx">     // the zoom values are chosen to be like in Mozilla Firefox 3
</span><span class="cx">     zoomLevels &lt;&lt; 30 &lt;&lt; 50 &lt;&lt; 67 &lt;&lt; 80 &lt;&lt; 90;
</span><span class="cx">     zoomLevels &lt;&lt; 100;
</span><span class="lines">@@ -208,6 +210,39 @@
</span><span class="cx">     grabZoomKeys(true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool LauncherWindow::isGraphicsBased() const
+{
+    return bool(qobject_cast&lt;QGraphicsView*&gt;(m_view));
+}
+
+inline void applySetting(QWebSettings::WebAttribute type, QWebSettings* settings, QWebSettings* other, bool defaultValue)
+{
+    settings-&gt;setAttribute(type, other ? other-&gt;testAttribute(type) : defaultValue);
+}
+
+void LauncherWindow::applyPrefs(LauncherWindow* source)
+{
+    QWebSettings* other = source ? source-&gt;page()-&gt;settings() : 0;
+    QWebSettings* settings = page()-&gt;settings();
+
+    applySetting(QWebSettings::AcceleratedCompositingEnabled, settings, other, gUseCompositing);
+    applySetting(QWebSettings::WebGLEnabled, settings, other, false);
+
+    if (!isGraphicsBased())
+        return;
+
+    WebViewGraphicsBased* view = static_cast&lt;WebViewGraphicsBased*&gt;(m_view);
+    WebViewGraphicsBased* otherView = source ? qobject_cast&lt;WebViewGraphicsBased*&gt;(source-&gt;m_view) : 0;
+
+    view-&gt;setViewportUpdateMode(otherView ? otherView-&gt;viewportUpdateMode() : gViewportUpdateMode);
+    view-&gt;setFrameRateMeasurementEnabled(otherView ? otherView-&gt;frameRateMeasurementEnabled() : gShowFrameRate);
+
+    if (otherView)
+        view-&gt;setItemCacheMode(otherView-&gt;itemCacheMode());
+    else
+        view-&gt;setItemCacheMode(gCacheWebView ? QGraphicsItem::DeviceCoordinateCache : QGraphicsItem::NoCache);
+}
+
</ins><span class="cx"> void LauncherWindow::keyPressEvent(QKeyEvent* event)
</span><span class="cx"> {
</span><span class="cx"> #ifdef Q_WS_MAEMO_5
</span><span class="lines">@@ -485,11 +520,6 @@
</span><span class="cx">     } else {
</span><span class="cx">         WebViewGraphicsBased* view = new WebViewGraphicsBased(splitter);
</span><span class="cx">         view-&gt;setPage(page());
</span><del>-        view-&gt;setViewportUpdateMode(gViewportUpdateMode);
-        view-&gt;setItemCacheMode(gCacheWebView ? QGraphicsItem::DeviceCoordinateCache : QGraphicsItem::NoCache);
-        if (gShowFrameRate)
-            view-&gt;enableFrameRateMeasurement();
-        page()-&gt;settings()-&gt;setAttribute(QWebSettings::AcceleratedCompositingEnabled, gUseCompositing);
</del><span class="cx"> 
</span><span class="cx">         if (flipAnimated)
</span><span class="cx">             connect(flipAnimated, SIGNAL(triggered()), view, SLOT(animatedFlip()));
</span><span class="lines">@@ -506,21 +536,19 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void LauncherWindow::newWindow(const QString&amp; url)
</del><ins>+void LauncherWindow::newWindow()
</ins><span class="cx"> {
</span><del>-    LauncherWindow* mw = new LauncherWindow(url);
</del><ins>+    LauncherWindow* mw = new LauncherWindow(this, false);
</ins><span class="cx">     mw-&gt;show();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void LauncherWindow::cloneWindow()
</span><span class="cx"> {
</span><del>-    QGraphicsView* view = static_cast&lt;QGraphicsView*&gt;(m_view);
-
-    LauncherWindow* mw = new LauncherWindow(view-&gt;scene());
</del><ins>+    LauncherWindow* mw = new LauncherWindow(this, true);
</ins><span class="cx">     mw-&gt;show();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void LauncherWindow::setupUI()
</del><ins>+void LauncherWindow::createChrome()
</ins><span class="cx"> {
</span><span class="cx">     QMenu* fileMenu = menuBar()-&gt;addMenu(&quot;&amp;File&quot;);
</span><span class="cx">     fileMenu-&gt;addAction(&quot;New Window&quot;, this, SLOT(newWindow()), QKeySequence::New);
</span><span class="lines">@@ -584,36 +612,44 @@
</span><span class="cx">     touchMockAction-&gt;setShortcut(QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_T));
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    QWebSettings* settings = page()-&gt;settings();
+
</ins><span class="cx">     QMenu* graphicsViewMenu = toolsMenu-&gt;addMenu(&quot;QGraphicsView&quot;);
</span><span class="cx">     QAction* toggleGraphicsView = graphicsViewMenu-&gt;addAction(&quot;Toggle use of QGraphicsView&quot;, this, SLOT(initializeView(bool)));
</span><span class="cx">     toggleGraphicsView-&gt;setCheckable(true);
</span><del>-    toggleGraphicsView-&gt;setChecked(false);
</del><ins>+    toggleGraphicsView-&gt;setChecked(isGraphicsBased());
</ins><span class="cx"> 
</span><span class="cx">     QAction* toggleWebGL = toolsMenu-&gt;addAction(&quot;Toggle WebGL&quot;, this, SLOT(toggleWebGL(bool)));
</span><span class="cx">     toggleWebGL-&gt;setCheckable(true);
</span><del>-    toggleWebGL-&gt;setChecked(false);
</del><ins>+    toggleWebGL-&gt;setChecked(settings-&gt;testAttribute(QWebSettings::WebGLEnabled));
</ins><span class="cx"> 
</span><span class="cx">     QAction* toggleAcceleratedCompositing = graphicsViewMenu-&gt;addAction(&quot;Toggle Accelerated Compositing&quot;, this, SLOT(toggleAcceleratedCompositing(bool)));
</span><span class="cx">     toggleAcceleratedCompositing-&gt;setCheckable(true);
</span><del>-    toggleAcceleratedCompositing-&gt;setChecked(false);
-    toggleAcceleratedCompositing-&gt;setEnabled(false);
</del><ins>+    toggleAcceleratedCompositing-&gt;setChecked(settings-&gt;testAttribute(QWebSettings::AcceleratedCompositingEnabled));
+    toggleAcceleratedCompositing-&gt;setEnabled(isGraphicsBased());
</ins><span class="cx">     toggleAcceleratedCompositing-&gt;connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
</span><span class="cx"> 
</span><span class="cx">     graphicsViewMenu-&gt;addSeparator();
</span><span class="cx"> 
</span><span class="cx">     flipAnimated = graphicsViewMenu-&gt;addAction(&quot;Animated Flip&quot;);
</span><span class="cx">     flipAnimated-&gt;connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
</span><del>-    flipAnimated-&gt;setEnabled(false);
</del><ins>+    flipAnimated-&gt;setEnabled(isGraphicsBased());
</ins><span class="cx"> 
</span><span class="cx">     flipYAnimated = graphicsViewMenu-&gt;addAction(&quot;Animated Y-Flip&quot;);
</span><span class="cx">     flipYAnimated-&gt;connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
</span><del>-    flipYAnimated-&gt;setEnabled(false);
</del><ins>+    flipYAnimated-&gt;setEnabled(isGraphicsBased());
</ins><span class="cx"> 
</span><ins>+    if (isGraphicsBased()) {
+        WebViewGraphicsBased* view = static_cast&lt;WebViewGraphicsBased*&gt;(m_view);
+        connect(flipAnimated, SIGNAL(triggered()), view, SLOT(animatedFlip()));
+        connect(flipYAnimated, SIGNAL(triggered()), view, SLOT(animatedYFlip()));
+    }
+
</ins><span class="cx">     graphicsViewMenu-&gt;addSeparator();
</span><span class="cx"> 
</span><span class="cx">     QAction* cloneWindow = graphicsViewMenu-&gt;addAction(&quot;Clone Window&quot;, this, SLOT(cloneWindow()));
</span><span class="cx">     cloneWindow-&gt;connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
</span><del>-    cloneWindow-&gt;setEnabled(false);
</del><ins>+    cloneWindow-&gt;setEnabled(isGraphicsBased());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> QWebPage* WebPage::createWindow(QWebPage::WebWindowType type)
</span><span class="lines">@@ -810,9 +846,11 @@
</span><span class="cx">     LauncherWindow* window = 0;
</span><span class="cx">     foreach (QString url, urls) {
</span><span class="cx">         if (!window)
</span><del>-            window = new LauncherWindow(url);
</del><ins>+            window = new LauncherWindow();
</ins><span class="cx">         else
</span><del>-            window-&gt;newWindow(url);
</del><ins>+            window-&gt;newWindow();
+
+        window-&gt;load(url);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     window-&gt;show();
</span></span></pre></div>
<a id="trunkWebKitToolsQtLauncherwebviewcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/QtLauncher/webview.cpp (55459 => 55460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/QtLauncher/webview.cpp        2010-03-03 13:30:49 UTC (rev 55459)
+++ trunk/WebKitTools/QtLauncher/webview.cpp        2010-03-03 14:42:19 UTC (rev 55460)
</span><span class="lines">@@ -72,6 +72,10 @@
</span><span class="cx">     machine-&gt;setInitialState(s0);
</span><span class="cx">     machine-&gt;start();
</span><span class="cx"> #endif
</span><ins>+
+    m_updateTimer = new QTimer(this);
+    m_updateTimer-&gt;setInterval(1000);
+    connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(updateFrameRate()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebViewGraphicsBased::resizeEvent(QResizeEvent* event)
</span><span class="lines">@@ -81,14 +85,13 @@
</span><span class="cx">     m_item-&gt;setGeometry(rect);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebViewGraphicsBased::enableFrameRateMeasurement()
</del><ins>+void WebViewGraphicsBased::setFrameRateMeasurementEnabled(bool enabled)
</ins><span class="cx"> {
</span><del>-    m_measureFps = true;
-    m_lastConsultTime = m_startTime = QTime::currentTime();
-    QTimer* updateTimer = new QTimer(this);
-    updateTimer-&gt;setInterval(1000);
-    connect(updateTimer, SIGNAL(timeout()), this, SLOT(updateFrameRate()));
-    updateTimer-&gt;start();
</del><ins>+    if (m_measureFps = enabled) {
+        m_lastConsultTime = m_startTime = QTime::currentTime();
+        m_updateTimer-&gt;start();
+    } else 
+        m_updateTimer-&gt;stop();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebViewGraphicsBased::updateFrameRate()
</span></span></pre></div>
<a id="trunkWebKitToolsQtLauncherwebviewh"></a>
<div class="modfile"><h4>Modified: trunk/WebKitTools/QtLauncher/webview.h (55459 => 55460)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitTools/QtLauncher/webview.h        2010-03-03 13:30:49 UTC (rev 55459)
+++ trunk/WebKitTools/QtLauncher/webview.h        2010-03-03 14:42:19 UTC (rev 55460)
</span><span class="lines">@@ -73,8 +73,11 @@
</span><span class="cx">     virtual void resizeEvent(QResizeEvent*);
</span><span class="cx">     void setPage(QWebPage* page) { m_item-&gt;setPage(page); }
</span><span class="cx">     void setItemCacheMode(QGraphicsItem::CacheMode mode) { m_item-&gt;setCacheMode(mode); }
</span><ins>+    QGraphicsItem::CacheMode itemCacheMode() { return m_item-&gt;cacheMode(); }
</ins><span class="cx"> 
</span><del>-    void enableFrameRateMeasurement();
</del><ins>+    void setFrameRateMeasurementEnabled(bool enabled);
+    bool frameRateMeasurementEnabled() { return m_measureFps; } 
+
</ins><span class="cx">     virtual void paintEvent(QPaintEvent* event);
</span><span class="cx"> 
</span><span class="cx">     void setYRotation(qreal angle)
</span><span class="lines">@@ -107,6 +110,7 @@
</span><span class="cx">     int m_numPaintsSinceLastMeasure;
</span><span class="cx">     QTime m_startTime;
</span><span class="cx">     QTime m_lastConsultTime;
</span><ins>+    QTimer* m_updateTimer;
</ins><span class="cx">     bool m_measureFps;
</span><span class="cx">     qreal m_yRotation;
</span><span class="cx"> };
</span></span></pre>
</div>
</div>

</body>
</html>