OSDN Git Service

Merge webkit.org at r50258 : HistoryController has been factored out of FrameLoader.
authorSteve Block <steveblock@google.com>
Tue, 20 Oct 2009 14:07:10 +0000 (15:07 +0100)
committerSteve Block <steveblock@google.com>
Tue, 10 Nov 2009 22:41:14 +0000 (22:41 +0000)
See http://trac.webkit.org/changeset/49413

Change-Id: I1e584a6a50e1a20e40c76471651c0561df496c47

WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
WebKit/android/jni/WebHistory.cpp
WebKit/android/jni/WebViewCore.cpp

index 182b99f..1e6b9dd 100644 (file)
@@ -755,7 +755,7 @@ void FrameLoaderClientAndroid::saveViewStateToItem(HistoryItem* item) {
 void FrameLoaderClientAndroid::restoreViewState() {
 #ifdef ANDROID_HISTORY_CLIENT
     WebViewCore* webViewCore = WebViewCore::getWebViewCore(m_frame->view());
-    HistoryItem* item = m_frame->loader()->currentHistoryItem();
+    HistoryItem* item = m_frame->loader()->history()->currentItem();
     // restore the scale (only) for the top frame
     if (!m_frame->tree()->parent()) {
         int scale = item->bridge()->scale();
index bed0e84..ab027ac 100644 (file)
@@ -113,7 +113,7 @@ static void WebHistoryClose(JNIEnv* env, jobject obj, jint frame)
         // Keep a small list of child frames to traverse.
         WTF::Vector<WebCore::Frame*> frameQueue;
         // Fix the top-level item.
-        pFrame->loader()->setCurrentHistoryItem(current);
+        pFrame->loader()->history()->setCurrentItem(current.get());
         WebCore::Frame* child = pFrame->tree()->firstChild();
         // Remember the parent history item so we can search for a child item.
         RefPtr<WebCore::HistoryItem> parent = current;
@@ -121,7 +121,7 @@ static void WebHistoryClose(JNIEnv* env, jobject obj, jint frame)
             // Use the old history item since the current one may have a
             // deleted parent.
             WebCore::HistoryItem* item = parent->childItemWithTarget(child->tree()->name());
-            child->loader()->setCurrentHistoryItem(item);
+            child->loader()->history()->setCurrentItem(item);
             // Append the first child to the queue if it exists.
             if (WebCore::Frame* f = child->tree()->firstChild())
                 frameQueue.append(f);
@@ -133,7 +133,7 @@ static void WebHistoryClose(JNIEnv* env, jobject obj, jint frame)
                 frameQueue.remove(0);
                 // Figure out the parent history item used when searching for
                 // the history item to use.
-                parent = child->tree()->parent()->loader()->currentHistoryItem();
+                parent = child->tree()->parent()->loader()->history()->currentItem();
             }
         }
     }
@@ -152,7 +152,7 @@ static void WebHistoryRestoreIndex(JNIEnv* env, jobject obj, jint frame, jint in
 
     // Update the current and previous history item.
     WebCore::FrameLoader* loader = pFrame->loader();
-    loader->setCurrentHistoryItem(currentItem);
+    loader->history()->setCurrentItem(currentItem);
 
     // load the current page with FrameLoadTypeIndexedBackForward so that it
     // will use cache when it is possible
index 07f5d62..e349fae 100644 (file)
@@ -1791,7 +1791,7 @@ void WebViewCore::saveDocumentState(WebCore::Frame* frame)
 {
     if (!CacheBuilder::validNode(m_mainFrame, frame, 0))
         frame = m_mainFrame;
-    WebCore::HistoryItem *item = frame->loader()->currentHistoryItem();
+    WebCore::HistoryItem *item = frame->loader()->history()->currentItem();
 
     // item can be null when there is no offical URL for the current page. This happens
     // when the content is loaded using with WebCoreFrameBridge::LoadData() and there