⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 100185 in webkit


Ignore:
Timestamp:
Nov 14, 2011, 1:48:23 PM (15 years ago)
Author:
andersca@apple.com
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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r100155 r100185  
     12011-11-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Only send progress notifications for the main frame
     4        https://bugs.webkit.org/show_bug.cgi?id=72302
     5
     6        Reviewed by Sam Weinig.
     7
     8        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.
     9
     10        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     11        (WebKit::WebFrameLoaderClient::postProgressStartedNotification):
     12        (WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
     13        (WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
     14
    1152011-11-14  Alexis Menard  <alexis.menard@openbossa.org>
    216
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r99096 r100185  
    762762void WebFrameLoaderClient::postProgressStartedNotification()
    763763{
    764     if (WebPage* webPage = m_frame->page())
    765         webPage->send(Messages::WebPageProxy::DidStartProgress());
     764    if (WebPage* webPage = m_frame->page()) {
     765        if (m_frame->isMainFrame())
     766            webPage->send(Messages::WebPageProxy::DidStartProgress());
     767    }
    766768}
    767769
     
    769771{
    770772    if (WebPage* webPage = m_frame->page()) {
    771         double progress = webPage->corePage()->progress()->estimatedProgress();
    772         webPage->send(Messages::WebPageProxy::DidChangeProgress(progress));
    773 
     773        if (m_frame->isMainFrame()) {
     774            double progress = webPage->corePage()->progress()->estimatedProgress();
     775            webPage->send(Messages::WebPageProxy::DidChangeProgress(progress));
     776        }
    774777    }
    775778}
     
    777780void WebFrameLoaderClient::postProgressFinishedNotification()
    778781{
    779     if (WebPage* webPage = m_frame->page())
    780         webPage->send(Messages::WebPageProxy::DidFinishProgress());
     782    if (WebPage* webPage = m_frame->page()) {
     783        if (m_frame->isMainFrame())
     784            webPage->send(Messages::WebPageProxy::DidFinishProgress());
     785    }
    781786}
    782787
Note: See TracChangeset for help on using the changeset viewer.