[Webkit-unassigned] [Bug 47817] FrameLoader::IsProcessingUserGesture is true for JavaScript initiated downloads after click navigation to webpage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 20 08:33:51 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=47817





--- Comment #18 from Johnny Ding <jnd at chromium.org>  2010-10-20 08:33:50 PST ---
(In reply to comment #17)
> Hi I'm reopening this bug because Adam's patch does not fix the case where a user initiated navigation does a meta refresh and triggers a download; which, as discussed, should not be considered a user initiated navigation. 
> 
> To me it would seem that we should have IsProcessingUserGesture only return true if we know for certain that the navigation was user initiated. 
> 
> Adam, can you please review my patch to assure that I'm not overlooking anything by this change.
> 
> Thanks.

@Pierre-Antoine LaFayette, your patch is not the right way.

The default status of GestureIndicator is PossiblyProcessingUserGesture, some user-initiated actions don't explicitly pass the key/mouse events to WebKit (like typing URL in address bar and press enter), so in this case, we need to use the combination of GestureIndicator!=PossiblyProcessingUserGesture and no-js-on-stack to ensure this kind of user-gesture actions.


Yes, in current WebKit trunk, the meta refresh redirection caused  that FrameLoader::IsProcessingUserGesture returned true when calling it in WebViewClient::didStartProvisionalLoad, but the root cause is not what your patch pointed.

The bug was introduced by Adam's r47786(https://bugs.webkit.org/show_bug.cgi?id=47786).
In old WebKit code, the scheduleRefresh explicitly set false as user gesture status (meta refresh never can be considered as user initiated). However Adam might forget to keep this logic in NavigationScheduler::scheduleRedirect  (https://bugs.webkit.org/attachment.cgi?id=70988&action=diff#WebCore/loader/NavigationScheduler.cpp_sec6)

I will handle the patch once I finish https://bugs.webkit.org/show_bug.cgi?id=47849. Should be done today

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list