Title: [117276] trunk
Revision
117276
Author
[email protected]
Date
2012-05-16 06:47:38 -0700 (Wed, 16 May 2012)

Log Message

Add didFinishProgress BundleUIClient callback
https://bugs.webkit.org/show_bug.cgi?id=86541

Patch by Dinu Jacob <[email protected]> on 2012-05-16
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Added didFinishProgress BundleUIClient callback needed by
WebKitTestRunner. This callback is invoked in postProgressFinishedNotification.

* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didFinishProgress):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
(InjectedBundlePageLoaderClient):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):

Tools:

Added support for dumpProgressFinishedCallback.

* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
(WTR::InjectedBundlePage::didFinishProgress):
(WTR):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
(InjectedBundlePage):
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::LayoutTestController):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(WTR::LayoutTestController::dumpProgressFinishedCallback):
(WTR::LayoutTestController::setShouldDumpProgressFinishedCallback):
(WTR::LayoutTestController::shouldDumpProgressFinishedCallback):
(LayoutTestController):

LayoutTests:

Unskip passing test.

* platform/qt-5.0-wk2/Skipped:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (117275 => 117276)


--- trunk/LayoutTests/ChangeLog	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/LayoutTests/ChangeLog	2012-05-16 13:47:38 UTC (rev 117276)
@@ -1,3 +1,14 @@
+2012-05-16  Dinu Jacob  <[email protected]>
+
+        Add didFinishProgress BundleUIClient callback
+        https://bugs.webkit.org/show_bug.cgi?id=86541
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Unskip passing test.
+
+        * platform/qt-5.0-wk2/Skipped:
+
 2012-05-16  Ádám Kallai  <[email protected]>
 
         [Qt] Unreviewed gardening. Fix my typo.

Modified: trunk/LayoutTests/platform/qt-5.0-wk2/Skipped (117275 => 117276)


--- trunk/LayoutTests/platform/qt-5.0-wk2/Skipped	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/LayoutTests/platform/qt-5.0-wk2/Skipped	2012-05-16 13:47:38 UTC (rev 117276)
@@ -400,9 +400,6 @@
 # https://bugs.webkit.org/show_bug.cgi?id=76986
 scrollbars/scroll-rtl-or-bt-layer.html
 
-# CONSOLE MESSAGE: line 4: TypeError: 'undefined' is not a function (evaluating 'layoutTestController.dumpProgressFinishedCallback()')
-http/tests/loading/progress-finished-callback.html
-
 # Skipped because they were still failing after http://trac.webkit.org/changeset/106812 .
 # Check https://bugs.webkit.org/show_bug.cgi?id=62731 and https://bugs.webkit.org/show_bug.cgi?id=42333
 # for future reference.

Modified: trunk/Source/WebKit2/ChangeLog (117275 => 117276)


--- trunk/Source/WebKit2/ChangeLog	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-16 13:47:38 UTC (rev 117276)
@@ -1,3 +1,24 @@
+2012-05-16  Dinu Jacob  <[email protected]>
+
+        Add didFinishProgress BundleUIClient callback
+        https://bugs.webkit.org/show_bug.cgi?id=86541
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Added didFinishProgress BundleUIClient callback needed by
+        WebKitTestRunner. This callback is invoked in postProgressFinishedNotification.
+
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
+        (WebKit::InjectedBundlePageLoaderClient::didFinishProgress):
+        (WebKit):
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
+        (InjectedBundlePageLoaderClient):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
+        * WebProcess/qt/QtBuiltinBundlePage.cpp:
+        (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
+
 2012-05-16  Keishi Hattori  <[email protected]>
 
         [chromium] Add WebKit API to access inner text value of input element

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h (117275 => 117276)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h	2012-05-16 13:47:38 UTC (rev 117276)
@@ -87,6 +87,7 @@
 typedef void (*WKBundlePageDidDocumentFinishLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidFinishLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidFinishDocumentLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
+typedef void (*WKBundlePageDidFinishProgressCallback)(WKBundlePageRef page, const void *clientInfo);
 typedef void (*WKBundlePageDidFailLoadWithErrorForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKErrorRef error, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidSameDocumentNavigationForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidReceiveTitleForFrameCallback)(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
@@ -141,6 +142,7 @@
     WKBundlePageWillDisconnectDOMWindowExtensionFromGlobalObjectCallback    willDisconnectDOMWindowExtensionFromGlobalObject;
     WKBundlePageDidReconnectDOMWindowExtensionToGlobalObjectCallback        didReconnectDOMWindowExtensionToGlobalObject;
     WKBundlePageWillDestroyGlobalObjectForDOMWindowExtensionCallback        willDestroyGlobalObjectForDOMWindowExtension;
+    WKBundlePageDidFinishProgressCallback                                   didFinishProgress;
 };
 typedef struct WKBundlePageLoaderClient WKBundlePageLoaderClient;
 

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp (117275 => 117276)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp	2012-05-16 13:47:38 UTC (rev 117276)
@@ -109,6 +109,14 @@
     userData = adoptRef(toImpl(userDataToPass));
 }
 
+void InjectedBundlePageLoaderClient::didFinishProgress(WebPage* page)
+{
+    if (!m_client.didFinishProgress)
+        return;
+
+    m_client.didFinishProgress(toAPI(page), m_client.clientInfo);
+}
+
 void InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame(WebPage* page, WebFrame* frame, const ResourceError& error, RefPtr<APIObject>& userData)
 {
     if (!m_client.didFailLoadWithErrorForFrame)

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h (117275 => 117276)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h	2012-05-16 13:47:38 UTC (rev 117276)
@@ -56,6 +56,7 @@
     void didCommitLoadForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
     void didFinishDocumentLoadForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
     void didFinishLoadForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
+    void didFinishProgress(WebPage*);
     void didFailLoadWithErrorForFrame(WebPage*, WebFrame*, const WebCore::ResourceError&, RefPtr<APIObject>& userData);
     void didSameDocumentNavigationForFrame(WebPage*, WebFrame*, SameDocumentNavigationType, RefPtr<APIObject>& userData);
     void didReceiveTitleForFrame(WebPage*, const String&, WebFrame*, RefPtr<APIObject>& userData);

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (117275 => 117276)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2012-05-16 13:47:38 UTC (rev 117276)
@@ -827,8 +827,12 @@
 void WebFrameLoaderClient::postProgressFinishedNotification()
 {
     if (WebPage* webPage = m_frame->page()) {
-        if (m_frame->isMainFrame())
+        if (m_frame->isMainFrame()) {
+            // Notify the bundle client.
+            webPage->injectedBundleLoaderClient().didFinishProgress(webPage);
+
             webPage->send(Messages::WebPageProxy::DidFinishProgress());
+        }
     }
 }
 

Modified: trunk/Source/WebKit2/WebProcess/qt/QtBuiltinBundlePage.cpp (117275 => 117276)


--- trunk/Source/WebKit2/WebProcess/qt/QtBuiltinBundlePage.cpp	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Source/WebKit2/WebProcess/qt/QtBuiltinBundlePage.cpp	2012-05-16 13:47:38 UTC (rev 117276)
@@ -74,6 +74,7 @@
         0, // willDisconnectDOMWindowExtensionFromGlobalObject
         0, // didReconnectDOMWindowExtensionToGlobalObject
         0, // willDestroyGlobalObjectForDOMWindowExtension
+        0, // didFinishProgress
     };
     WKBundlePageSetPageLoaderClient(m_page, &loaderClient);
 }

Modified: trunk/Tools/ChangeLog (117275 => 117276)


--- trunk/Tools/ChangeLog	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Tools/ChangeLog	2012-05-16 13:47:38 UTC (rev 117276)
@@ -1,3 +1,27 @@
+2012-05-16  Dinu Jacob  <[email protected]>
+
+        Add didFinishProgress BundleUIClient callback
+        https://bugs.webkit.org/show_bug.cgi?id=86541
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Added support for dumpProgressFinishedCallback.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::InjectedBundlePage):
+        (WTR::InjectedBundlePage::didFinishProgress):
+        (WTR):
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+        (InjectedBundlePage):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR::LayoutTestController::LayoutTestController):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+        (WTR::LayoutTestController::dumpProgressFinishedCallback):
+        (WTR::LayoutTestController::setShouldDumpProgressFinishedCallback):
+        (WTR::LayoutTestController::shouldDumpProgressFinishedCallback):
+        (LayoutTestController):
+
 2012-05-15  Pierre Rossi  <[email protected]>
 
         [Qt] Enable SVG Fonts by default

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl (117275 => 117276)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2012-05-16 13:47:38 UTC (rev 117276)
@@ -42,6 +42,7 @@
         void dumpTitleChanges();
         void dumpFullScreenCallbacks();
         void dumpFrameLoadCallbacks();
+        void dumpProgressFinishedCallback();
         void dumpConfigurationForViewport(in int deviceDPI, in int deviceWidth, in int deviceHeight, in int availableWidth, in int availableHeight);
 
         // Special options.

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp (117275 => 117276)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp	2012-05-16 13:47:38 UTC (rev 117276)
@@ -240,6 +240,7 @@
         0, // willDisconnectDOMWindowExtensionFromGlobalObject
         0, // didReconnectDOMWindowExtensionToGlobalObject
         0, // willDestroyGlobalObjectForDOMWindowExtension
+        didFinishProgress, // didFinishProgress
     };
     WKBundlePageSetPageLoaderClient(m_page, &loaderClient);
 
@@ -398,6 +399,11 @@
     static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishLoadForFrame(frame);
 }
 
+void InjectedBundlePage::didFinishProgress(WKBundlePageRef, const void *clientInfo)
+{
+    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishProgress();
+}
+
 void InjectedBundlePage::didFinishDocumentLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef*, const void* clientInfo)
 {
     static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishDocumentLoadForFrame(frame);
@@ -529,6 +535,17 @@
     InjectedBundle::shared().stringBuilder()->append(" - didCommitLoadForFrame\n");
 }
 
+void InjectedBundlePage::didFinishProgress()
+{
+    if (!InjectedBundle::shared().isTestRunning())
+        return;
+
+    if (!InjectedBundle::shared().layoutTestController()->shouldDumpProgressFinishedCallback())
+        return;
+
+    InjectedBundle::shared().stringBuilder()->append("postProgressFinishedNotification\n");
+}
+
 enum FrameNamePolicy { ShouldNotIncludeFrameName, ShouldIncludeFrameName };
 
 static void dumpFrameScrollPosition(WKBundleFrameRef frame, FrameNamePolicy shouldIncludeFrameName = ShouldNotIncludeFrameName)

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h (117275 => 117276)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h	2012-05-16 13:47:38 UTC (rev 117276)
@@ -53,6 +53,7 @@
     static void didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef, WKBundleFrameRef, WKErrorRef, WKTypeRef*, const void*);
     static void didCommitLoadForFrame(WKBundlePageRef, WKBundleFrameRef, WKTypeRef*, const void*);
     static void didFinishLoadForFrame(WKBundlePageRef, WKBundleFrameRef, WKTypeRef*, const void*);
+    static void didFinishProgress(WKBundlePageRef, const void*);
     static void didFinishDocumentLoadForFrame(WKBundlePageRef, WKBundleFrameRef,  WKTypeRef*, const void*);
     static void didFailLoadWithErrorForFrame(WKBundlePageRef, WKBundleFrameRef, WKErrorRef, WKTypeRef*, const void*);
     static void didReceiveTitleForFrame(WKBundlePageRef, WKStringRef title, WKBundleFrameRef, WKTypeRef*, const void*);
@@ -76,6 +77,7 @@
     void didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRef, WKErrorRef);
     void didCommitLoadForFrame(WKBundleFrameRef);
     void didFinishLoadForFrame(WKBundleFrameRef);
+    void didFinishProgress();
     void didFailLoadWithErrorForFrame(WKBundleFrameRef, WKErrorRef);
     void didReceiveTitleForFrame(WKStringRef title, WKBundleFrameRef);
     void didClearWindowForFrame(WKBundleFrameRef, WKBundleScriptWorldRef);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp (117275 => 117276)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2012-05-16 13:47:38 UTC (rev 117276)
@@ -103,6 +103,7 @@
     , m_dumpPixels(true)
     , m_dumpFullScreenCallbacks(false)
     , m_dumpFrameLoadCallbacks(false)
+    , m_dumpProgressFinishedCallback(false)
     , m_waitToDump(false)
     , m_testRepaint(false)
     , m_testRepaintSweepHorizontally(false)

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h (117275 => 117276)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2012-05-16 13:44:41 UTC (rev 117275)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2012-05-16 13:47:38 UTC (rev 117276)
@@ -74,8 +74,10 @@
     void dumpFullScreenCallbacks() { m_dumpFullScreenCallbacks = true; }
     void dumpFrameLoadCallbacks() { setShouldDumpFrameLoadCallbacks(true); }
     void dumpConfigurationForViewport(int deviceDPI, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight);
+    void dumpProgressFinishedCallback() { setShouldDumpProgressFinishedCallback(true); }
 
     void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; }
+    void setShouldDumpProgressFinishedCallback(bool value) { m_dumpProgressFinishedCallback = value; }
 
     // Special options.
     void keepWebHistory();
@@ -154,6 +156,7 @@
     bool shouldDumpPixels() const { return m_dumpPixels; }
     bool shouldDumpFullScreenCallbacks() const { return m_dumpFullScreenCallbacks; }
     bool shouldDumpFrameLoadCallbacks() const { return m_dumpFrameLoadCallbacks; }
+    bool shouldDumpProgressFinishedCallback() { return m_dumpProgressFinishedCallback; }
     bool isPolicyDelegateEnabled() const { return m_policyDelegateEnabled; }
     bool isPolicyDelegatePermissive() const { return m_policyDelegatePermissive; }
 
@@ -229,6 +232,7 @@
     bool m_dumpPixels;
     bool m_dumpFullScreenCallbacks;
     bool m_dumpFrameLoadCallbacks;
+    bool m_dumpProgressFinishedCallback;
     bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
     bool m_testRepaint;
     bool m_testRepaintSweepHorizontally;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to