2011-06-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
authorcaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jun 2011 22:53:05 +0000 (22:53 +0000)
committercaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jun 2011 22:53:05 +0000 (22:53 +0000)
        Reviewed by Adam Barth.

        Simplify logic in ProgressTracker::progressCompleted()
        https://bugs.webkit.org/show_bug.cgi?id=62598

        Testing for "m_numProgressTrackedFrames != 0" is unnecessary because it is
        always true, otherwise we would entered in the first part of the conditional.

        * loader/ProgressTracker.cpp:
        (WebCore::ProgressTracker::progressCompleted):

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

Source/WebCore/ChangeLog
Source/WebCore/loader/ProgressTracker.cpp

index 3983ac6..9ff32a2 100644 (file)
@@ -1,3 +1,16 @@
+2011-06-13  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
+
+        Reviewed by Adam Barth.
+
+        Simplify logic in ProgressTracker::progressCompleted()
+        https://bugs.webkit.org/show_bug.cgi?id=62598
+
+        Testing for "m_numProgressTrackedFrames != 0" is unnecessary because it is
+        always true, otherwise we would entered in the first part of the conditional.
+
+        * loader/ProgressTracker.cpp:
+        (WebCore::ProgressTracker::progressCompleted):
+
 2011-06-13  Dimitri Glazkov  <dglazkov@chromium.org>
 
         Unreviewed, rolling out r88704.
index 65dd1c5..55b98e9 100644 (file)
@@ -129,8 +129,7 @@ void ProgressTracker::progressCompleted(Frame* frame)
     frame->loader()->client()->willChangeEstimatedProgress();
         
     m_numProgressTrackedFrames--;
-    if (m_numProgressTrackedFrames == 0 ||
-        (frame == m_originatingProgressFrame && m_numProgressTrackedFrames != 0))
+    if (!m_numProgressTrackedFrames || m_originatingProgressFrame == frame)
         finalProgressComplete();
     
     frame->loader()->client()->didChangeEstimatedProgress();