From a6e5d463b2fbb6ad4e154719d6846231a32764a7 Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Wed, 3 Mar 2010 12:10:51 -0500 Subject: [PATCH] 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. --- WebCore/loader/FrameLoader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp index be782f182..945cd9090 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) -- 2.11.0