diff options
author | Patrick Scott <phanna@android.com> | 2009-10-08 14:18:16 -0400 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2009-10-08 14:18:16 -0400 |
commit | 6b6403731606a6dcd6a2a6d60a799369924f88d6 (patch) | |
tree | 6425c81b942d0a33f43b7bdd271ea0fb15fc265c /WebCore/loader | |
parent | 1d57ff1d97b50eacef179662ea798ac776552f34 (diff) | |
download | external_webkit-6b6403731606a6dcd6a2a6d60a799369924f88d6.zip external_webkit-6b6403731606a6dcd6a2a6d60a799369924f88d6.tar.gz external_webkit-6b6403731606a6dcd6a2a6d60a799369924f88d6.tar.bz2 |
Fix bug 2132969
Check for a user gesture before adding the history item during a fragment
scroll. The bug has been reported to webkit.org with the suggested fix. Although
upstream webkit does not have the user gesture additions defined by
ANDROID_USER_GESTURE.
Bug: 2132969
Diffstat (limited to 'WebCore/loader')
-rw-r--r-- | WebCore/loader/FrameLoader.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp index 8e8540d..c28040f 100644 --- a/WebCore/loader/FrameLoader.cpp +++ b/WebCore/loader/FrameLoader.cpp @@ -3907,7 +3907,14 @@ void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequ KURL url = request.url(); m_documentLoader->replaceRequestURLForAnchorScroll(url); +#ifdef ANDROID_USER_GESTURE + // Do not add history items for a fragment scroll not initiated by the + // user. http://bugs.webkit.org/show_bug.cgi?id=30224 + if (!isRedirect && !shouldTreatURLAsSameAsCurrent(url) + && (isProcessingUserGesture() || request.getUserGesture())) { +#else if (!isRedirect && !shouldTreatURLAsSameAsCurrent(url)) { +#endif // NB: must happen after _setURL, since we add based on the current request. // Must also happen before we openURL and displace the scroll position, since // adding the BF item will save away scroll state. |