summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-03-03 12:10:51 -0500
committerPatrick Scott <phanna@android.com>2010-03-03 12:19:43 -0500
commita6e5d463b2fbb6ad4e154719d6846231a32764a7 (patch)
tree3c7bca8d0606b19bd20cc87cecd2bcf4ea70863a
parentafa40c89b27e6edbc28a5ad400eb8bb9176a88a8 (diff)
downloadexternal_webkit-a6e5d463b2fbb6ad4e154719d6846231a32764a7.zip
external_webkit-a6e5d463b2fbb6ad4e154719d6846231a32764a7.tar.gz
external_webkit-a6e5d463b2fbb6ad4e154719d6846231a32764a7.tar.bz2
Revive my change to not add anchor navigations to the history in some cases.
Do not add history items when there is an anchor navigation if the user did not initiate the event. We backed out this change because cnn.com fixed itself but now app.showtime-app.com does the same trick and prevents the Browser from being able to go back.
-rw-r--r--WebCore/loader/FrameLoader.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index be782f1..945cd90 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -3502,7 +3502,14 @@ void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequ
return;
bool isRedirect = m_quickRedirectComing || policyChecker()->loadType() == FrameLoadTypeRedirectWithLockedBackForwardList;
+#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
+ loadInSameDocument(request.url(), 0, !isRedirect &&
+ (isProcessingUserGesture() || request.getUserGesture()));
+#else
loadInSameDocument(request.url(), 0, !isRedirect);
+#endif
}
bool FrameLoader::shouldScrollToAnchor(bool isFormSubmission, FrameLoadType loadType, const KURL& url)