Spinning this off from issue 825677 . As part of DidCommitProvisionalLoad, we currently send a user gesture bit which comes from RenderViewImpl::navigation_gesture_. That navigation_gesture_ is set in RenderFrameImpl::DidStartProvisionalLoad when starting a new navigation (which then consumes the process-global user gesture), and it is reset in RenderFrameImpl::MakeDidCommitProvisionalLoadParams, as part of committing the navigation. However, for a cross-process navigation, the commit happens in another process, and the navigation_gesture_ state is just left hanging on RenderView and can potentially be grabbed by another subsequent navigation, as was happening in https://crbug.com/825677#c16 . I think only a same-document navigation can actually grab the stale state, since it goes through DidCommit without going through DidStart, which would normally reset navigation_gesture_.
It's not clear to me that navigation_gesture_ is needed on RenderViewImpl, and we should see if we can remove it. If it is actually needed, then we should at least move it to be stored on frames and ensure that it can't be reused across navigations.
Comment 1 by mustaq@chromium.org
, Jun 1 2018Labels: UserActivation