[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

levin at chromium.org levin at chromium.org
Wed Dec 22 16:08:11 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 55acfc10be3c37394591f108c451659e994f8f9c
Author: levin at chromium.org <levin at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 18 22:03:47 2010 +0000

    Unreviewed, rolling out r72299.
    http://trac.webkit.org/changeset/72299
    https://bugs.webkit.org/show_bug.cgi?id=49761
    
    Patch by Sheriff Bot <webkit.review.bot at gmail.com> on 2010-11-18
    Broke chromium ui test SessionHistoryTest.FrameBackForward.
    (Requested by dave_levin on #webkit).
    
    * loader/HistoryController.cpp:
    (WebCore::HistoryController::HistoryController):
    (WebCore::HistoryController::saveDocumentState):
    (WebCore::HistoryController::updateForBackForwardNavigation):
    (WebCore::HistoryController::updateForCommit):
    (WebCore::HistoryController::updateForFrameLoadCompleted):
    (WebCore::HistoryController::setCurrentItem):
    (WebCore::HistoryController::createItem):
    (WebCore::HistoryController::createItemTree):
    (WebCore::HistoryController::recursiveGoToItem):
    * loader/HistoryController.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72334 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8448527..e0d9b56 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-11-18  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r72299.
+        http://trac.webkit.org/changeset/72299
+        https://bugs.webkit.org/show_bug.cgi?id=49761
+
+        Broke chromium ui test SessionHistoryTest.FrameBackForward.
+        (Requested by dave_levin on #webkit).
+
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::HistoryController):
+        (WebCore::HistoryController::saveDocumentState):
+        (WebCore::HistoryController::updateForBackForwardNavigation):
+        (WebCore::HistoryController::updateForCommit):
+        (WebCore::HistoryController::updateForFrameLoadCompleted):
+        (WebCore::HistoryController::setCurrentItem):
+        (WebCore::HistoryController::createItem):
+        (WebCore::HistoryController::createItemTree):
+        (WebCore::HistoryController::recursiveGoToItem):
+        * loader/HistoryController.h:
+
 2010-11-18  James Robinson  <jamesr at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/loader/HistoryController.cpp b/WebCore/loader/HistoryController.cpp
index 72acafe..07bece7 100644
--- a/WebCore/loader/HistoryController.cpp
+++ b/WebCore/loader/HistoryController.cpp
@@ -66,7 +66,6 @@ static inline void addVisitedLink(Page* page, const KURL& url)
 
 HistoryController::HistoryController(Frame* frame)
     : m_frame(frame)
-    , m_frameLoadComplete(true)
 {
 }
 
@@ -139,10 +138,10 @@ void HistoryController::saveDocumentState()
     // target of the current navigation (if we even decide to save with that granularity).
 
     // Because of previousItem's "masking" of currentItem for this purpose, it's important
-    // that we keep track of the end of a page transition with m_frameLoadComplete.  We
-    // leverage the checkLoadComplete recursion to achieve this goal.
+    // that previousItem be cleared at the end of a page transition.  We leverage the
+    // checkLoadComplete recursion to achieve this goal.
 
-    HistoryItem* item = m_frameLoadComplete ? m_currentItem.get() : m_previousItem.get();
+    HistoryItem* item = m_previousItem ? m_previousItem.get() : m_currentItem.get();
     if (!item)
         return;
 
@@ -246,8 +245,7 @@ void HistoryController::updateForBackForwardNavigation()
 #endif
 
     // Must grab the current scroll position before disturbing it
-    if (!m_frameLoadComplete)
-        saveScrollPositionAndViewStateToItem(m_previousItem.get());
+    saveScrollPositionAndViewStateToItem(m_previousItem.get());
 }
 
 void HistoryController::updateForReload()
@@ -394,7 +392,6 @@ void HistoryController::updateForCommit()
         // the provisional item for restoring state.
         // Note previousItem must be set before we close the URL, which will
         // happen when the data source is made non-provisional below
-        m_frameLoadComplete = false;
         m_previousItem = m_currentItem;
         ASSERT(m_provisionalItem);
         m_currentItem = m_provisionalItem;
@@ -421,15 +418,12 @@ void HistoryController::updateForSameDocumentNavigation()
 void HistoryController::updateForFrameLoadCompleted()
 {
     // Even if already complete, we might have set a previous item on a frame that
-    // didn't do any data loading on the past transaction. Make sure to track that
-    // the load is complete so that we use the current item instead.
-    m_frameLoadComplete = true;
+    // didn't do any data loading on the past transaction. Make sure to clear these out.
+    m_previousItem = 0;
 }
 
 void HistoryController::setCurrentItem(HistoryItem* item)
 {
-    m_frameLoadComplete = false;
-    m_previousItem = m_currentItem;
     m_currentItem = item;
 }
 
@@ -504,7 +498,6 @@ PassRefPtr<HistoryItem> HistoryController::createItem(bool useOriginal)
     }
     
     // Set the item for which we will save document state
-    m_frameLoadComplete = false;
     m_previousItem = m_currentItem;
     m_currentItem = item;
     
@@ -514,7 +507,7 @@ PassRefPtr<HistoryItem> HistoryController::createItem(bool useOriginal)
 PassRefPtr<HistoryItem> HistoryController::createItemTree(Frame* targetFrame, bool clipAtTarget)
 {
     RefPtr<HistoryItem> bfItem = createItem(m_frame->tree()->parent() ? true : false);
-    if (!m_frameLoadComplete)
+    if (m_previousItem)
         saveScrollPositionAndViewStateToItem(m_previousItem.get());
 
     if (!clipAtTarget || m_frame != targetFrame) {
@@ -570,8 +563,8 @@ void HistoryController::recursiveGoToItem(HistoryItem* item, HistoryItem* fromIt
         && fromItem->hasSameFrames(item))
     {
         // This content is good, so leave it alone and look for children that need reloading
-        // Save form state (works from currentItem, since m_frameLoadComplete is true)
-        ASSERT(m_frameLoadComplete);
+        // Save form state (works from currentItem, since prevItem is nil)
+        ASSERT(!m_previousItem);
         saveDocumentState();
         saveScrollPositionAndViewStateToItem(m_currentItem.get());
 
diff --git a/WebCore/loader/HistoryController.h b/WebCore/loader/HistoryController.h
index 1bf5072..1002dbc 100644
--- a/WebCore/loader/HistoryController.h
+++ b/WebCore/loader/HistoryController.h
@@ -96,8 +96,6 @@ private:
     RefPtr<HistoryItem> m_currentItem;
     RefPtr<HistoryItem> m_previousItem;
     RefPtr<HistoryItem> m_provisionalItem;
-
-    bool m_frameLoadComplete;
 };
 
 } // namespace WebCore

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list