[Qt] Add a loadVisuallyCommitted() signal
authorjocelyn.turcotte@digia.com <jocelyn.turcotte@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2012 11:19:57 +0000 (11:19 +0000)
committerjocelyn.turcotte@digia.com <jocelyn.turcotte@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2012 11:19:57 +0000 (11:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=97780

Reviewed by Kenneth Rohde Christiansen.

This signal is emitted when the first DidRenderFrame message is received from
the web process after loadCommitted.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::loadDidCommit):
(QQuickWebViewPrivate::setNeedsDisplay):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h

index cb5fa37..b974a1c 100644 (file)
@@ -1,5 +1,23 @@
 2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
 
+        [Qt] Add a loadVisuallyCommitted() signal
+        https://bugs.webkit.org/show_bug.cgi?id=97780
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        This signal is emitted when the first DidRenderFrame message is received from
+        the web process after loadCommitted.
+
+        * UIProcess/API/qt/qquickwebview.cpp:
+        (QQuickWebViewPrivate::QQuickWebViewPrivate):
+        (QQuickWebViewPrivate::loadDidCommit):
+        (QQuickWebViewPrivate::setNeedsDisplay):
+        * UIProcess/API/qt/qquickwebview_p.h:
+        * UIProcess/API/qt/qquickwebview_p_p.h:
+        (QQuickWebViewPrivate):
+
+2012-09-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
+
         [Qt] Move Qt-only related methods from WebPageProxy.cpp to WebPageProxyQt.cpp
 
         Reviewed by Simon Hausmann.
index 12f8db3..a10b611 100644 (file)
@@ -268,6 +268,7 @@ QQuickWebViewPrivate::QQuickWebViewPrivate(QQuickWebView* viewport)
     , filePicker(0)
     , databaseQuotaDialog(0)
     , colorChooser(0)
+    , m_betweenLoadCommitAndFirstFrame(false)
     , m_useDefaultContentItemSize(true)
     , m_navigatorQtObjectEnabled(false)
     , m_renderToOffscreenBuffer(false)
@@ -370,6 +371,7 @@ void QQuickWebViewPrivate::loadDidCommit()
     Q_Q(QQuickWebView);
     ASSERT(q->loading());
 
+    m_betweenLoadCommitAndFirstFrame = true;
     emit q->navigationHistoryChanged();
     emit q->titleChanged();
 }
@@ -453,6 +455,10 @@ void QQuickWebViewPrivate::setNeedsDisplay()
         return;
     }
 
+    if (m_betweenLoadCommitAndFirstFrame) {
+        emit q->experimental()->loadVisuallyCommitted();
+        m_betweenLoadCommitAndFirstFrame = false;
+    }
     q->page()->update();
 }
 
index e8b1bf7..89e7fbc 100644 (file)
@@ -355,6 +355,7 @@ public Q_SLOTS:
     void evaluateJavaScript(const QString& script, const QJSValue& value = QJSValue());
 
 Q_SIGNALS:
+    void loadVisuallyCommitted();
     void alertDialogChanged();
     void confirmDialogChanged();
     void promptDialogChanged();
index af8ef7d..b18fe90 100644 (file)
@@ -189,6 +189,7 @@ protected:
 
     QList<QUrl> userScripts;
 
+    bool m_betweenLoadCommitAndFirstFrame;
     bool m_useDefaultContentItemSize;
     bool m_navigatorQtObjectEnabled;
     bool m_renderToOffscreenBuffer;