Unreviewed, rolling out r125829.
authorenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Aug 2012 06:02:49 +0000 (06:02 +0000)
committerenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Aug 2012 06:02:49 +0000 (06:02 +0000)
http://trac.webkit.org/changeset/125829
https://bugs.webkit.org/show_bug.cgi?id=94299

Maybe causing Chromium AutomationTabHelperBrowserTest failures
(Requested by enne on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-08-16

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::init):
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::clearProvisionalLoad):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::detachFromParent):
* loader/FrameLoader.h:
(FrameLoader):

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

Source/WebCore/ChangeLog
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h

index 88afb4f..67a4c83 100644 (file)
@@ -1,3 +1,21 @@
+2012-08-16  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r125829.
+        http://trac.webkit.org/changeset/125829
+        https://bugs.webkit.org/show_bug.cgi?id=94299
+
+        Maybe causing Chromium AutomationTabHelperBrowserTest failures
+        (Requested by enne on #webkit).
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::init):
+        (WebCore::FrameLoader::prepareForLoadStart):
+        (WebCore::FrameLoader::clearProvisionalLoad):
+        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+        (WebCore::FrameLoader::detachFromParent):
+        * loader/FrameLoader.h:
+        (FrameLoader):
+
 2012-08-16  Nico Weber  <thakis@chromium.org>
 
         [chromium/mac] Remove RenderThemeChromiumMac::paintTextField override
index edd6f88..23e9b6c 100644 (file)
@@ -165,42 +165,6 @@ static bool isDocumentSandboxed(Frame* frame, SandboxFlags mask)
     return frame->document() && frame->document()->isSandboxed(mask);
 }
 
-class FrameLoader::FrameProgressTracker {
-public:
-    static PassOwnPtr<FrameProgressTracker> create(Frame* frame) { return adoptPtr(new FrameProgressTracker(frame)); }
-    ~FrameProgressTracker()
-    {
-        ASSERT(!m_inProgressCount || m_frame->page());
-        for (; m_inProgressCount; m_inProgressCount--)
-            m_frame->page()->progress()->progressCompleted(m_frame);
-    }
-
-    void progressStarted()
-    {
-        ASSERT(m_frame->page());
-        m_inProgressCount++;
-        m_frame->page()->progress()->progressStarted(m_frame);
-    }
-
-    void progressCompleted()
-    {
-        ASSERT(m_inProgressCount > 0);
-        ASSERT(m_frame->page());
-        m_inProgressCount--;
-        m_frame->page()->progress()->progressCompleted(m_frame);
-    }
-
-private:
-    FrameProgressTracker(Frame* frame)
-        : m_frame(frame)
-        , m_inProgressCount(0)
-    {
-    }
-
-    Frame* m_frame;
-    int m_inProgressCount;
-};
-
 FrameLoader::FrameLoader(Frame* frame, FrameLoaderClient* client)
     : m_frame(frame)
     , m_client(client)
@@ -264,7 +228,6 @@ void FrameLoader::init()
     m_didCallImplicitClose = true;
 
     m_networkingContext = m_client->createNetworkingContext();
-    m_progressTracker = FrameProgressTracker::create(m_frame);
 }
 
 void FrameLoader::setDefersLoading(bool defers)
@@ -1124,8 +1087,9 @@ void FrameLoader::prepareForHistoryNavigation()
 
 void FrameLoader::prepareForLoadStart()
 {
+    if (Page* page = m_frame->page())
+        page->progress()->progressStarted(m_frame);
     m_client->dispatchDidStartProvisionalLoad();
-    m_progressTracker->progressStarted();
 
     // Notify accessibility.
     if (AXObjectCache::accessibilityEnabled()) {
@@ -1682,7 +1646,8 @@ void FrameLoader::setState(FrameState newState)
 void FrameLoader::clearProvisionalLoad()
 {
     setProvisionalDocumentLoader(0);
-    m_progressTracker->progressCompleted();
+    if (Page* page = m_frame->page())
+        page->progress()->progressCompleted(m_frame);
     setState(FrameStateComplete);
 }
 
@@ -2158,8 +2123,9 @@ void FrameLoader::checkLoadCompleteForThisFrame()
                 return;
 
             if (!settings->needsDidFinishLoadOrderQuirk()) {
-                m_progressTracker->progressCompleted();
                 if (Page* page = m_frame->page()) {
+                    page->progress()->progressCompleted(m_frame);
+
                     if (m_frame == page->mainFrame())
                         page->resetRelevantPaintedObjectCounter();
                 }
@@ -2177,8 +2143,9 @@ void FrameLoader::checkLoadCompleteForThisFrame()
             }
 
             if (settings->needsDidFinishLoadOrderQuirk()) {
-                m_progressTracker->progressCompleted();
                 if (Page* page = m_frame->page()) {
+                    page->progress()->progressCompleted(m_frame);
+
                     if (m_frame == page->mainFrame())
                         page->resetRelevantPaintedObjectCounter();
                 }
@@ -2402,8 +2369,6 @@ void FrameLoader::detachFromParent()
 
     detachViewsAndDocumentLoader();
 
-    m_progressTracker.clear();
-
     if (Frame* parent = m_frame->tree()->parent()) {
         parent->loader()->closeAndRemoveChild(m_frame);
         parent->loader()->scheduleCheckCompleted();
index a21926f..4a17ab2 100644 (file)
@@ -385,9 +385,6 @@ private:
     mutable FrameLoaderStateMachine m_stateMachine;
     mutable IconController m_icon;
 
-    class FrameProgressTracker;
-    OwnPtr<FrameProgressTracker> m_progressTracker;
-
     FrameState m_state;
     FrameLoadType m_loadType;