Title: [161751] trunk/Source
Revision
161751
Author
[email protected]
Date
2014-01-10 23:33:48 -0800 (Fri, 10 Jan 2014)

Log Message

Tweak ProgressTrackerClient functions
https://bugs.webkit.org/show_bug.cgi?id=126808

Reviewed by Sam Weinig.

Source/WebCore:

Rename the three progress state related member functions since it's up to the various
WebKit implementations to decide what to do - not everyone wants to post a notification.
Also add an originating progress frame parameter since WebKit2 doesn't report progress for
subframe navigation and we need to be able to keep track of that.

Finally, tweak ProgressTracker::completeProgress to get rid of an unnecessary hash lookup.

* loader/EmptyClients.h:
* loader/ProgressTracker.cpp:
(WebCore::ProgressItem::ProgressItem):
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::finalProgressComplete):
(WebCore::ProgressTracker::incrementProgress):
(WebCore::ProgressTracker::completeProgress):
* loader/ProgressTrackerClient.h:

Source/WebKit/efl:

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::progressStarted):
(WebCore::FrameLoaderClientEfl::progressEstimateChanged):
(WebCore::FrameLoaderClientEfl::progressFinished):
* WebCoreSupport/FrameLoaderClientEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::progressStarted):
(WebKit::FrameLoaderClient::progressEstimateChanged):
(WebKit::FrameLoaderClient::progressFinished):
* WebCoreSupport/FrameLoaderClientGtk.h:

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::progressStarted):
(WebFrameLoaderClient::progressEstimateChanged):
(WebFrameLoaderClient::progressFinished):

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::progressStarted):
(WebFrameLoaderClient::progressEstimateChanged):
(WebFrameLoaderClient::progressFinished):
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::progressStarted):
(WebKit::WebFrameLoaderClient::progressEstimateChanged):
(WebKit::WebFrameLoaderClient::progressFinished):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (161750 => 161751)


--- trunk/Source/WebCore/ChangeLog	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebCore/ChangeLog	2014-01-11 07:33:48 UTC (rev 161751)
@@ -1,3 +1,26 @@
+2014-01-10  Anders Carlsson  <[email protected]>
+
+        Tweak ProgressTrackerClient functions
+        https://bugs.webkit.org/show_bug.cgi?id=126808
+
+        Reviewed by Sam Weinig.
+
+        Rename the three progress state related member functions since it's up to the various
+        WebKit implementations to decide what to do - not everyone wants to post a notification.
+        Also add an originating progress frame parameter since WebKit2 doesn't report progress for
+        subframe navigation and we need to be able to keep track of that.
+        
+        Finally, tweak ProgressTracker::completeProgress to get rid of an unnecessary hash lookup.
+
+        * loader/EmptyClients.h:
+        * loader/ProgressTracker.cpp:
+        (WebCore::ProgressItem::ProgressItem):
+        (WebCore::ProgressTracker::progressStarted):
+        (WebCore::ProgressTracker::finalProgressComplete):
+        (WebCore::ProgressTracker::incrementProgress):
+        (WebCore::ProgressTracker::completeProgress):
+        * loader/ProgressTrackerClient.h:
+
 2014-01-10  David Kilzer  <[email protected]>
 
         [iOS] Fix COMPILE_ASSERT by updating struct SameSizeAsStyleRareInheritedData

Modified: trunk/Source/WebCore/loader/EmptyClients.h (161750 => 161751)


--- trunk/Source/WebCore/loader/EmptyClients.h	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebCore/loader/EmptyClients.h	2014-01-11 07:33:48 UTC (rev 161751)
@@ -636,9 +636,10 @@
 class EmptyProgressTrackerClient : public ProgressTrackerClient {
     virtual void willChangeEstimatedProgress() OVERRIDE { }
     virtual void didChangeEstimatedProgress() OVERRIDE { }
-    virtual void postProgressStartedNotification() OVERRIDE { }
-    virtual void postProgressEstimateChangedNotification() OVERRIDE { }
-    virtual void postProgressFinishedNotification() OVERRIDE { }
+
+    virtual void progressStarted(Frame&) OVERRIDE { }
+    virtual void progressEstimateChanged(Frame&) OVERRIDE { }
+    virtual void progressFinished(Frame&) OVERRIDE { }
 };
 
 void fillWithEmptyClients(Page::PageClients&);

Modified: trunk/Source/WebCore/loader/ProgressTracker.cpp (161750 => 161751)


--- trunk/Source/WebCore/loader/ProgressTracker.cpp	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebCore/loader/ProgressTracker.cpp	2014-01-11 07:33:48 UTC (rev 161751)
@@ -52,8 +52,10 @@
 
 // Check if the load is progressing this often.
 static const double progressHeartbeatInterval = 0.1;
+
 // How many heartbeats must pass without progress before deciding the load is currently stalled.
 static const unsigned loadStalledHeartbeatCount = 4;
+
 // How many bytes are required between heartbeats to consider it progress.
 static const unsigned minumumBytesPerHeartbeatForProgress = 1024;
 
@@ -62,7 +64,9 @@
 public:
     ProgressItem(long long length) 
         : bytesReceived(0)
-        , estimatedLength(length) { }
+        , estimatedLength(length)
+    {
+    }
     
     long long bytesReceived;
     long long estimatedLength;
@@ -129,7 +133,7 @@
         m_progressHeartbeatTimer.startRepeating(progressHeartbeatInterval);
         m_originatingProgressFrame->loader().loadProgressingStatusChanged();
 
-        m_client.postProgressStartedNotification();
+        m_client.progressStarted(*m_originatingProgressFrame);
     }
     m_numProgressTrackedFrames++;
 
@@ -163,13 +167,13 @@
     // with final progress value.
     if (!m_finalProgressChangedSent) {
         m_progressValue = 1;
-        m_client.postProgressEstimateChangedNotification();
+        m_client.progressEstimateChanged(*frame);
     }
 
     reset();
 
     frame->loader().client().setMainFrameDocumentReady(true);
-    m_client.postProgressFinishedNotification();
+    m_client.progressFinished(*frame);
     frame->loader().loadProgressingStatusChanged();
 
     InspectorInstrumentation::frameStoppedLoading(*frame);
@@ -251,7 +255,7 @@
             if (m_progressValue == 1)
                 m_finalProgressChangedSent = true;
             
-            m_client.postProgressEstimateChangedNotification();
+            m_client.progressEstimateChanged(*frame);
 
             m_lastNotifiedProgressValue = m_progressValue;
             m_lastNotifiedProgressTime = now;
@@ -263,17 +267,19 @@
 
 void ProgressTracker::completeProgress(unsigned long identifier)
 {
-    ProgressItem* item = m_progressItems.get(identifier);
-    
+    auto it = m_progressItems.find(identifier);
+
     // This can happen if a load fails without receiving any response data.
-    if (!item)
+    if (it == m_progressItems.end())
         return;
+
+    ProgressItem& item = *it->value;
     
     // Adjust the total expected bytes to account for any overage/underage.
-    long long delta = item->bytesReceived - item->estimatedLength;
+    long long delta = item.bytesReceived - item.estimatedLength;
     m_totalPageAndResourceBytesToLoad += delta;
 
-    m_progressItems.remove(identifier);
+    m_progressItems.remove(it);
 }
 
 unsigned long ProgressTracker::createUniqueIdentifier()

Modified: trunk/Source/WebCore/loader/ProgressTrackerClient.h (161750 => 161751)


--- trunk/Source/WebCore/loader/ProgressTrackerClient.h	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebCore/loader/ProgressTrackerClient.h	2014-01-11 07:33:48 UTC (rev 161751)
@@ -37,9 +37,10 @@
 
     virtual void willChangeEstimatedProgress() { }
     virtual void didChangeEstimatedProgress() { }
-    virtual void postProgressStartedNotification() = 0;
-    virtual void postProgressEstimateChangedNotification() = 0;
-    virtual void postProgressFinishedNotification() = 0;
+
+    virtual void progressStarted(Frame& originatingProgressFrame) = 0;
+    virtual void progressEstimateChanged(Frame& originatingProgressFrame) = 0;
+    virtual void progressFinished(Frame& originatingProgressFrame) = 0;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebKit/efl/ChangeLog (161750 => 161751)


--- trunk/Source/WebKit/efl/ChangeLog	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/efl/ChangeLog	2014-01-11 07:33:48 UTC (rev 161751)
@@ -1,5 +1,18 @@
 2014-01-10  Anders Carlsson  <[email protected]>
 
+        Tweak ProgressTrackerClient functions
+        https://bugs.webkit.org/show_bug.cgi?id=126808
+
+        Reviewed by Sam Weinig.
+
+        * WebCoreSupport/FrameLoaderClientEfl.cpp:
+        (WebCore::FrameLoaderClientEfl::progressStarted):
+        (WebCore::FrameLoaderClientEfl::progressEstimateChanged):
+        (WebCore::FrameLoaderClientEfl::progressFinished):
+        * WebCoreSupport/FrameLoaderClientEfl.h:
+
+2014-01-10  Anders Carlsson  <[email protected]>
+
         Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
         https://bugs.webkit.org/show_bug.cgi?id=126801
 

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (161750 => 161751)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2014-01-11 07:33:48 UTC (rev 161751)
@@ -243,18 +243,18 @@
     evas_object_smart_callback_call(m_view, "resource,request,new", &request);
 }
 
-void FrameLoaderClientEfl::postProgressStartedNotification()
+void FrameLoaderClientEfl::progressStarted(WebCore::Frame&)
 {
     ewk_frame_load_started(m_frame);
-    postProgressEstimateChangedNotification();
+    progressEstimateChanged();
 }
 
-void FrameLoaderClientEfl::postProgressEstimateChangedNotification()
+void FrameLoaderClientEfl::progressEstimateChanged(Frame&)
 {
     ewk_frame_load_progress_changed(m_frame);
 }
 
-void FrameLoaderClientEfl::postProgressFinishedNotification()
+void FrameLoaderClientEfl::progressFinished(Frame&)
 {
     notImplemented();
 }

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h (161750 => 161751)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h	2014-01-11 07:33:48 UTC (rev 161751)
@@ -125,9 +125,9 @@
     virtual void revertToProvisionalState(DocumentLoader*) { }
     virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
 
-    virtual void postProgressStartedNotification();
-    virtual void postProgressEstimateChangedNotification();
-    virtual void postProgressFinishedNotification();
+    virtual void progressStarted(Frame&);
+    virtual void progressEstimateChanged(Frame&);
+    virtual void progressFinished(Frame&);
 
     virtual PassRefPtr<Frame> createFrame(const URL&, const String& name, HTMLFrameOwnerElement*,
                                const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);

Modified: trunk/Source/WebKit/gtk/ChangeLog (161750 => 161751)


--- trunk/Source/WebKit/gtk/ChangeLog	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/gtk/ChangeLog	2014-01-11 07:33:48 UTC (rev 161751)
@@ -1,5 +1,18 @@
 2014-01-10  Anders Carlsson  <[email protected]>
 
+        Tweak ProgressTrackerClient functions
+        https://bugs.webkit.org/show_bug.cgi?id=126808
+
+        Reviewed by Sam Weinig.
+
+        * WebCoreSupport/FrameLoaderClientGtk.cpp:
+        (WebKit::FrameLoaderClient::progressStarted):
+        (WebKit::FrameLoaderClient::progressEstimateChanged):
+        (WebKit::FrameLoaderClient::progressFinished):
+        * WebCoreSupport/FrameLoaderClientGtk.h:
+
+2014-01-10  Anders Carlsson  <[email protected]>
+
         Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
         https://bugs.webkit.org/show_bug.cgi?id=126801
 

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp (161750 => 161751)


--- trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp	2014-01-11 07:33:48 UTC (rev 161751)
@@ -284,7 +284,7 @@
     webkit_web_view_add_resource(getViewFromFrame(m_frame), identifierString.get(), webResource);
 }
 
-void FrameLoaderClient::postProgressStartedNotification()
+void FrameLoaderClient::progressStarted(WebCore::Frame&)
 {
     WebKitWebView* webView = getViewFromFrame(m_frame);
     g_signal_emit_by_name(webView, "load-started", m_frame);
@@ -292,7 +292,7 @@
     g_object_notify(G_OBJECT(webView), "progress");
 }
 
-void FrameLoaderClient::postProgressEstimateChangedNotification()
+void FrameLoaderClient::progressEstimateChanged(WebCore::Frame&)
 {
     WebKitWebView* webView = getViewFromFrame(m_frame);
     Page* corePage = core(webView);
@@ -302,7 +302,7 @@
     g_object_notify(G_OBJECT(webView), "progress");
 }
 
-void FrameLoaderClient::postProgressFinishedNotification()
+void FrameLoaderClient::progressFinished(WebCore::Frame&)
 {
     WebKitWebView* webView = getViewFromFrame(m_frame);
     WebKitWebViewPrivate* privateData = webView->priv;

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h (161750 => 161751)


--- trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h	2014-01-11 07:33:48 UTC (rev 161751)
@@ -112,9 +112,9 @@
         virtual void revertToProvisionalState(WebCore::DocumentLoader*) { }
         virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
 
-        virtual void postProgressStartedNotification();
-        virtual void postProgressEstimateChangedNotification();
-        virtual void postProgressFinishedNotification();
+        virtual void progressStarted(WebCore::Frame&);
+        virtual void progressEstimateChanged(WebCore::Frame&);
+        virtual void progressFinished(WebCore::Frame&);
 
         virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::URL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
                                    const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);

Modified: trunk/Source/WebKit/mac/ChangeLog (161750 => 161751)


--- trunk/Source/WebKit/mac/ChangeLog	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-01-11 07:33:48 UTC (rev 161751)
@@ -1,5 +1,18 @@
 2014-01-10  Anders Carlsson  <[email protected]>
 
+        Tweak ProgressTrackerClient functions
+        https://bugs.webkit.org/show_bug.cgi?id=126808
+
+        Reviewed by Sam Weinig.
+
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::progressStarted):
+        (WebFrameLoaderClient::progressEstimateChanged):
+        (WebFrameLoaderClient::progressFinished):
+
+2014-01-10  Anders Carlsson  <[email protected]>
+
         Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
         https://bugs.webkit.org/show_bug.cgi?id=126801
 

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h (161750 => 161751)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h	2014-01-11 07:33:48 UTC (rev 161751)
@@ -139,13 +139,9 @@
     virtual void willChangeEstimatedProgress() OVERRIDE;
     virtual void didChangeEstimatedProgress() OVERRIDE;
 #endif
-    virtual void postProgressStartedNotification() OVERRIDE;
-    virtual void postProgressEstimateChangedNotification() OVERRIDE;
-#if !PLATFORM(IOS)
-    virtual void postProgressFinishedNotification() OVERRIDE;
-#else
-    virtual void postProgressFinishedNotification() OVERRIDE { }
-#endif
+    virtual void progressStarted(WebCore::Frame&) OVERRIDE;
+    virtual void progressEstimateChanged(WebCore::Frame&) OVERRIDE;
+    virtual void progressFinished(WebCore::Frame&) OVERRIDE;
     
     virtual void setMainFrameDocumentReady(bool) OVERRIDE;
 

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (161750 => 161751)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm	2014-01-11 07:33:48 UTC (rev 161751)
@@ -1029,7 +1029,7 @@
 }
 #endif
 
-void WebFrameLoaderClient::postProgressStartedNotification()
+void WebFrameLoaderClient::progressStarted(WebCore::Frame&)
 {
 #if !PLATFORM(IOS)
     [[NSNotificationCenter defaultCenter] postNotificationName:WebViewProgressStartedNotification object:getWebView(m_webFrame.get())];
@@ -1038,7 +1038,7 @@
 #endif
 }
 
-void WebFrameLoaderClient::postProgressEstimateChangedNotification()
+void WebFrameLoaderClient::progressEstimateChanged(WebCore::Frame&)
 {
 #if !PLATFORM(IOS)
     [[NSNotificationCenter defaultCenter] postNotificationName:WebViewProgressEstimateChangedNotification object:getWebView(m_webFrame.get())];
@@ -1059,12 +1059,12 @@
 #endif
 }
 
+void WebFrameLoaderClient::progressFinished(WebCore::Frame&)
+{
 #if !PLATFORM(IOS)
-void WebFrameLoaderClient::postProgressFinishedNotification()
-{
     [[NSNotificationCenter defaultCenter] postNotificationName:WebViewProgressFinishedNotification object:getWebView(m_webFrame.get())];
+#endif
 }
-#endif
 
 void WebFrameLoaderClient::setMainFrameDocumentReady(bool ready)
 {

Modified: trunk/Source/WebKit/win/ChangeLog (161750 => 161751)


--- trunk/Source/WebKit/win/ChangeLog	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/win/ChangeLog	2014-01-11 07:33:48 UTC (rev 161751)
@@ -1,5 +1,18 @@
 2014-01-10  Anders Carlsson  <[email protected]>
 
+        Tweak ProgressTrackerClient functions
+        https://bugs.webkit.org/show_bug.cgi?id=126808
+
+        Reviewed by Sam Weinig.
+
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::progressStarted):
+        (WebFrameLoaderClient::progressEstimateChanged):
+        (WebFrameLoaderClient::progressFinished):
+        * WebCoreSupport/WebFrameLoaderClient.h:
+
+2014-01-10  Anders Carlsson  <[email protected]>
+
         Move progress tracking functions from FrameLoaderClient to a new ProgressTrackerClient
         https://bugs.webkit.org/show_bug.cgi?id=126801
 

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (161750 => 161751)


--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2014-01-11 07:33:48 UTC (rev 161751)
@@ -670,21 +670,21 @@
     m_hasSentResponseToPlugin = false;
 }
 
-void WebFrameLoaderClient::postProgressStartedNotification()
+void WebFrameLoaderClient::progressStarted(WebCore::Frame&)
 {
     static BSTR progressStartedName = SysAllocString(WebViewProgressStartedNotification);
     IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
     notifyCenter->postNotificationName(progressStartedName, static_cast<IWebView*>(m_webFrame->webView()), 0);
 }
 
-void WebFrameLoaderClient::postProgressEstimateChangedNotification()
+void WebFrameLoaderClient::progressEstimateChanged(WebCore::Frame&)
 {
     static BSTR progressEstimateChangedName = SysAllocString(WebViewProgressEstimateChangedNotification);
     IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
     notifyCenter->postNotificationName(progressEstimateChangedName, static_cast<IWebView*>(m_webFrame->webView()), 0);
 }
 
-void WebFrameLoaderClient::postProgressFinishedNotification()
+void WebFrameLoaderClient::progressFinished(WebCore::Frame&)
 {
     static BSTR progressFinishedName = SysAllocString(WebViewProgressFinishedNotification);
     IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h (161750 => 161751)


--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h	2014-01-11 07:33:48 UTC (rev 161751)
@@ -119,9 +119,9 @@
 
     virtual void startDownload(const WebCore::ResourceRequest&, const String& suggestedName = String()) OVERRIDE;
 
-    virtual void postProgressStartedNotification();
-    virtual void postProgressEstimateChangedNotification();
-    virtual void postProgressFinishedNotification();
+    virtual void progressStarted(WebCore::Frame&);
+    virtual void progressEstimateChanged(WebCore::Frame&);
+    virtual void progressFinished(WebCore::Frame&);
 
     virtual void committedLoad(WebCore::DocumentLoader*, const char*, int) OVERRIDE;
     virtual void finishedLoading(WebCore::DocumentLoader*) OVERRIDE;

Modified: trunk/Source/WebKit2/ChangeLog (161750 => 161751)


--- trunk/Source/WebKit2/ChangeLog	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit2/ChangeLog	2014-01-11 07:33:48 UTC (rev 161751)
@@ -1,3 +1,16 @@
+2014-01-10  Anders Carlsson  <[email protected]>
+
+        Tweak ProgressTrackerClient functions
+        https://bugs.webkit.org/show_bug.cgi?id=126808
+
+        Reviewed by Sam Weinig.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::progressStarted):
+        (WebKit::WebFrameLoaderClient::progressEstimateChanged):
+        (WebKit::WebFrameLoaderClient::progressFinished):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+
 2014-01-10  Sam Weinig  <[email protected]>
 
         Convert HandleMessage.h to use variadic templates

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (161750 => 161751)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2014-01-11 07:33:48 UTC (rev 161751)
@@ -825,28 +825,28 @@
     notImplemented();
 }
 
-void WebFrameLoaderClient::postProgressStartedNotification()
+void WebFrameLoaderClient::progressStarted(Frame& originatingProgressFrame)
 {
     if (WebPage* webPage = m_frame->page()) {
-        if (m_frame->isMainFrame())
+        if (originatingProgressFrame.isMainFrame())
             webPage->send(Messages::WebPageProxy::DidStartProgress());
     }
 }
 
-void WebFrameLoaderClient::postProgressEstimateChangedNotification()
+void WebFrameLoaderClient::progressEstimateChanged(Frame& originatingProgressFrame)
 {
     if (WebPage* webPage = m_frame->page()) {
-        if (m_frame->isMainFrame()) {
+        if (originatingProgressFrame.isMainFrame()) {
             double progress = webPage->corePage()->progress().estimatedProgress();
             webPage->send(Messages::WebPageProxy::DidChangeProgress(progress));
         }
     }
 }
 
-void WebFrameLoaderClient::postProgressFinishedNotification()
+void WebFrameLoaderClient::progressFinished(Frame& originatingProgressFrame)
 {
     if (WebPage* webPage = m_frame->page()) {
-        if (m_frame->isMainFrame()) {
+        if (originatingProgressFrame.isMainFrame()) {
             // Notify the bundle client.
             webPage->injectedBundleLoaderClient().didFinishProgress(webPage);
 

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (161750 => 161751)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h	2014-01-11 07:27:38 UTC (rev 161750)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h	2014-01-11 07:33:48 UTC (rev 161751)
@@ -119,9 +119,9 @@
     // Maybe these should go into a ProgressTrackerClient some day
     virtual void willChangeEstimatedProgress() OVERRIDE;
     virtual void didChangeEstimatedProgress() OVERRIDE;
-    virtual void postProgressStartedNotification() OVERRIDE;
-    virtual void postProgressEstimateChangedNotification() OVERRIDE;
-    virtual void postProgressFinishedNotification() OVERRIDE;
+    virtual void progressStarted(WebCore::Frame&) OVERRIDE;
+    virtual void progressEstimateChanged(WebCore::Frame&) OVERRIDE;
+    virtual void progressFinished(WebCore::Frame&) OVERRIDE;
     
     virtual void setMainFrameDocumentReady(bool) OVERRIDE;
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to