What steps will reproduce the problem?
(1) With --site-per-process, go to http://csreis.github.io/tests/cross-site-iframe.html
(2) Click "Go cross-site (simple page)"
(3) From DevTools, execute:
document.querySelector('button').onclick = () => {
frames[0].location.href="https://csreis.github.io";
window.open("data:text/html,foo");
}
(4) Click on "Go cross-site (simple page)" again.
What is the expected result?
A popup should open that displays "foo". This is what happens without --site-per-process.
What happens instead?
Popup is blocked by the popup blocker, despite the window.open happening in the click handler while having a user gesture.
I think this is because RenderFrameProxy::navigate unconditionally consumes the user gesture:
void RenderFrameProxy::navigate(const blink::WebURLRequest& request,
bool should_replace_current_entry) {
...
blink::WebUserGestureIndicator::consumeUserGesture();
...
}
whereas it looks like we should only be doing it if a navigation produces a new window. E.g., in RenderFrameImpl::OpenURL, we have:
if (policy == blink::WebNavigationPolicyNewBackgroundTab ||
policy == blink::WebNavigationPolicyNewForegroundTab ||
policy == blink::WebNavigationPolicyNewWindow ||
policy == blink::WebNavigationPolicyNewPopup) {
WebUserGestureIndicator::consumeUserGesture();
}
I'll take a look at this as part of other user gesture work for OOPIFs.
Comment 1 by bugdroid1@chromium.org
, Dec 6 2016