Title: [100185] trunk/Source/WebKit2
Revision
100185
Author
[email protected]
Date
2011-11-14 13:48:23 -0800 (Mon, 14 Nov 2011)

Log Message

Only send progress notifications for the main frame
https://bugs.webkit.org/show_bug.cgi?id=72302

Reviewed by Sam Weinig.

Since it's impossible in the API to tell which frame the progress notifications are for, just send them to the main frame for now.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::postProgressStartedNotification):
(WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
(WebKit::WebFrameLoaderClient::postProgressFinishedNotification):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (100184 => 100185)


--- trunk/Source/WebKit2/ChangeLog	2011-11-14 21:45:52 UTC (rev 100184)
+++ trunk/Source/WebKit2/ChangeLog	2011-11-14 21:48:23 UTC (rev 100185)
@@ -1,3 +1,17 @@
+2011-11-14  Anders Carlsson  <[email protected]>
+
+        Only send progress notifications for the main frame
+        https://bugs.webkit.org/show_bug.cgi?id=72302
+
+        Reviewed by Sam Weinig.
+
+        Since it's impossible in the API to tell which frame the progress notifications are for, just send them to the main frame for now.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::postProgressStartedNotification):
+        (WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
+        (WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
+
 2011-11-14  Alexis Menard  <[email protected]>
 
         [Qt][WK2] Cleanup QML tests.

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (100184 => 100185)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2011-11-14 21:45:52 UTC (rev 100184)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2011-11-14 21:48:23 UTC (rev 100185)
@@ -761,23 +761,28 @@
 
 void WebFrameLoaderClient::postProgressStartedNotification()
 {
-    if (WebPage* webPage = m_frame->page())
-        webPage->send(Messages::WebPageProxy::DidStartProgress());
+    if (WebPage* webPage = m_frame->page()) {
+        if (m_frame->isMainFrame())
+            webPage->send(Messages::WebPageProxy::DidStartProgress());
+    }
 }
 
 void WebFrameLoaderClient::postProgressEstimateChangedNotification()
 {
     if (WebPage* webPage = m_frame->page()) {
-        double progress = webPage->corePage()->progress()->estimatedProgress();
-        webPage->send(Messages::WebPageProxy::DidChangeProgress(progress));
-
+        if (m_frame->isMainFrame()) {
+            double progress = webPage->corePage()->progress()->estimatedProgress();
+            webPage->send(Messages::WebPageProxy::DidChangeProgress(progress));
+        }
     }
 }
 
 void WebFrameLoaderClient::postProgressFinishedNotification()
 {
-    if (WebPage* webPage = m_frame->page())
-        webPage->send(Messages::WebPageProxy::DidFinishProgress());
+    if (WebPage* webPage = m_frame->page()) {
+        if (m_frame->isMainFrame())
+            webPage->send(Messages::WebPageProxy::DidFinishProgress());
+    }
 }
 
 void WebFrameLoaderClient::setMainFrameDocumentReady(bool)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to