Title: [102035] trunk
Revision
102035
Author
[email protected]
Date
2011-12-05 13:16:02 -0800 (Mon, 05 Dec 2011)

Log Message

[Qt] Rename QQuickWebView::canStop property to just loading
https://bugs.webkit.org/show_bug.cgi?id=73813

Patch by Michael Brüning <[email protected]> on 2011-12-05
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Renamed canStop property of QQuickWebView and QtWebPageProxy
to loading and updated tests.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebView::loading):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::navigationStatusAtStartup):
(LoadStartedCatcher::onLoadStarted):
(tst_QQuickWebView::stopEnabledAfterLoadStarted):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::loading):
* UIProcess/qt/QtWebPageProxy.h:

Tools:

Replaced references to WebView.canStop with WebView.loading.

* MiniBrowser/qt/qml/BrowserWindow.qml:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (102034 => 102035)


--- trunk/Source/WebKit2/ChangeLog	2011-12-05 21:13:36 UTC (rev 102034)
+++ trunk/Source/WebKit2/ChangeLog	2011-12-05 21:16:02 UTC (rev 102035)
@@ -1,3 +1,24 @@
+2011-12-05  Michael Brüning  <[email protected]>
+
+        [Qt] Rename QQuickWebView::canStop property to just loading 
+        https://bugs.webkit.org/show_bug.cgi?id=73813
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Renamed canStop property of QQuickWebView and QtWebPageProxy
+        to loading and updated tests.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebView::loading):
+        * UIProcess/API/qt/qquickwebview_p.h:
+        * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
+        (tst_QQuickWebView::navigationStatusAtStartup):
+        (LoadStartedCatcher::onLoadStarted):
+        (tst_QQuickWebView::stopEnabledAfterLoadStarted):
+        * UIProcess/qt/QtWebPageProxy.cpp:
+        (QtWebPageProxy::loading):
+        * UIProcess/qt/QtWebPageProxy.h:
+
 2011-12-03  Jer Noble  <[email protected]>
 
         <video> elements should disable the system and display sleep when playing on OS X.

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp (102034 => 102035)


--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp	2011-12-05 21:13:36 UTC (rev 102034)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp	2011-12-05 21:16:02 UTC (rev 102035)
@@ -576,10 +576,10 @@
     return d->pageProxy->canGoForward();
 }
 
-bool QQuickWebView::canStop() const
+bool QQuickWebView::loading() const
 {
     Q_D(const QQuickWebView);
-    return d->pageProxy->canStop();
+    return d->pageProxy->loading();
 }
 
 bool QQuickWebView::canReload() const

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h (102034 => 102035)


--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h	2011-12-05 21:13:36 UTC (rev 102034)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h	2011-12-05 21:16:02 UTC (rev 102035)
@@ -53,7 +53,7 @@
     Q_PROPERTY(int loadProgress READ loadProgress NOTIFY loadProgressChanged)
     Q_PROPERTY(bool canGoBack READ canGoBack NOTIFY navigationStateChanged FINAL)
     Q_PROPERTY(bool canGoForward READ canGoForward NOTIFY navigationStateChanged FINAL)
-    Q_PROPERTY(bool canStop READ canStop NOTIFY navigationStateChanged FINAL)
+    Q_PROPERTY(bool loading READ loading NOTIFY navigationStateChanged FINAL)
     Q_PROPERTY(bool canReload READ canReload NOTIFY navigationStateChanged FINAL)
     Q_PROPERTY(QWebPreferences* preferences READ preferences CONSTANT FINAL)
     Q_PROPERTY(QQuickWebPage* page READ page CONSTANT FINAL)
@@ -82,7 +82,7 @@
 
     bool canGoBack() const;
     bool canGoForward() const;
-    bool canStop() const;
+    bool loading() const;
     bool canReload() const;
 
     QWebPreferences* preferences() const;

Modified: trunk/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp (102034 => 102035)


--- trunk/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp	2011-12-05 21:13:36 UTC (rev 102034)
+++ trunk/Source/WebKit2/UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp	2011-12-05 21:16:02 UTC (rev 102035)
@@ -92,7 +92,7 @@
 
     QCOMPARE(webView()->canGoForward(), false);
 
-    QCOMPARE(webView()->canStop(), false);
+    QCOMPARE(webView()->loading(), false);
 
     QCOMPARE(webView()->canReload(), false);
 }
@@ -111,7 +111,7 @@
     {
         QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
 
-        QCOMPARE(m_webView->canStop(), true);
+        QCOMPARE(m_webView->loading(), true);
     }
 
 signals:
@@ -123,13 +123,13 @@
 
 void tst_QQuickWebView::stopEnabledAfterLoadStarted()
 {
-    QCOMPARE(webView()->canStop(), false);
+    QCOMPARE(webView()->loading(), false);
 
     LoadStartedCatcher catcher(webView());
     webView()->load(QUrl::fromLocalFile(QLatin1String(TESTS_SOURCE_DIR "/html/basic_page.html")));
     waitForSignal(&catcher, SIGNAL(finished()));
 
-    QCOMPARE(webView()->canStop(), true);
+    QCOMPARE(webView()->loading(), true);
 
     waitForSignal(webView(), SIGNAL(loadSucceeded()));
 }

Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp (102034 => 102035)


--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp	2011-12-05 21:13:36 UTC (rev 102034)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp	2011-12-05 21:16:02 UTC (rev 102035)
@@ -219,7 +219,7 @@
     m_webPageProxy->goForward();
 }
 
-bool QtWebPageProxy::canStop() const
+bool QtWebPageProxy::loading() const
 {
     RefPtr<WebKit::WebFrameProxy> mainFrame = m_webPageProxy->mainFrame();
     return mainFrame && !(WebFrameProxy::LoadStateFinished == mainFrame->loadState());

Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h (102034 => 102035)


--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h	2011-12-05 21:13:36 UTC (rev 102034)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h	2011-12-05 21:16:02 UTC (rev 102035)
@@ -100,7 +100,7 @@
     void goBack();
     bool canGoForward() const;
     void goForward();
-    bool canStop() const;
+    bool loading() const;
     void stop();
     bool canReload() const;
     void reload();

Modified: trunk/Tools/ChangeLog (102034 => 102035)


--- trunk/Tools/ChangeLog	2011-12-05 21:13:36 UTC (rev 102034)
+++ trunk/Tools/ChangeLog	2011-12-05 21:16:02 UTC (rev 102035)
@@ -1,3 +1,14 @@
+2011-12-05  Michael Brüning  <[email protected]>
+
+        [Qt] Rename QQuickWebView::canStop property to just loading 
+        https://bugs.webkit.org/show_bug.cgi?id=73813
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Replaced references to WebView.canStop with WebView.loading.
+
+        * MiniBrowser/qt/qml/BrowserWindow.qml:
+
 2011-12-05  Dirk Pranke  <[email protected]>
 
         run-webkit-tests: limit --child-processes properly on apple mac

Modified: trunk/Tools/MiniBrowser/qt/qml/BrowserWindow.qml (102034 => 102035)


--- trunk/Tools/MiniBrowser/qt/qml/BrowserWindow.qml	2011-12-05 21:13:36 UTC (rev 102034)
+++ trunk/Tools/MiniBrowser/qt/qml/BrowserWindow.qml	2011-12-05 21:16:02 UTC (rev 102035)
@@ -141,7 +141,7 @@
 
                 Image {
                     anchors.centerIn: parent
-                    source: webView.canStop ? "../icons/stop.png" : "../icons/refresh.png"
+                    source: webView.loading ? "../icons/stop.png" : "../icons/refresh.png"
                 }
 
                 MouseArea {
@@ -149,7 +149,7 @@
                     onPressed: { parent.color = "#cfcfcf" }
                     onReleased: { parent.color = "#efefef" }
                     onClicked: {
-                        if (webView.canStop) {
+                        if (webView.loading) {
                             console.log("stop loading")
                             webView.stop()
                         } else {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to