diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2011-01-18 09:52:21 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-18 09:52:21 -0800 |
commit | 264c2ff307988137482953b0001c14dbc62abcc5 (patch) | |
tree | 59898835d434c1d70e8b87142422bb87a1a63687 /WebKit/android/jni/WebViewCore.cpp | |
parent | a27a95188f8f778d90d69accb1b00e6b38879dbd (diff) | |
parent | bfc0ebd2ace64845c11b40ce5dae09347ce0020d (diff) | |
download | external_webkit-264c2ff307988137482953b0001c14dbc62abcc5.zip external_webkit-264c2ff307988137482953b0001c14dbc62abcc5.tar.gz external_webkit-264c2ff307988137482953b0001c14dbc62abcc5.tar.bz2 |
Merge "Persist scrollPoint as part of the history item." into honeycomb
Diffstat (limited to 'WebKit/android/jni/WebViewCore.cpp')
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 80de32f..27ced0e 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -1152,6 +1152,13 @@ void WebViewCore::setScrollOffset(int moveGeneration, int userScrolled, int dx, m_mainFrame->eventHandler()->sendScrollEvent(); } + // Update history item to reflect the new scroll position. + // This also helps save the history information when the browser goes to + // background, so scroll position will be restored if browser gets + // killed while in background. + WebCore::HistoryController* history = m_mainFrame->loader()->history(); + history->saveScrollPositionAndViewStateToItem(history->currentItem()); + // update the currently visible screen sendPluginVisibleScreen(); } |