Commit c23fcf74 authored by avallee's avatar avallee Committed by Commit bot

OOPIF: Clear focused frame before advancing to remote frame.

There's a race where we could receive a new click event before receving
notification of a remote frame becoming focused as a result of advancing
(using the tab key for example) to that frame.

If we already think we're focused we would never reply back to the
browser to refocus this frame.

BUG=713977
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2844563002
Cr-Commit-Position: refs/heads/master@{#467580}
parent 8a4c3883
......@@ -977,6 +977,7 @@ bool FocusController::AdvanceFocusInDocumentOrder(
if (frame->LocalFrameRoot() != frame->Tree().Top()) {
document->ClearFocusedElement();
document->SetSequentialFocusNavigationStartingPoint(nullptr);
SetFocusedFrame(nullptr);
ToRemoteFrame(frame->LocalFrameRoot()->Tree().Parent())
->AdvanceFocus(type, frame->LocalFrameRoot());
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment