DescriptionMake document.activeElement work with OOPIF.
When a subframe is focused, the parent frame's document.activeElement
needs to return the <iframe> element of that subframe. This CL adds
logic to make this work for cross-process frames. Specifically, when
the focused frame changes across processes, we now send the new
(remote) focused frame to the other SiteInstances in the same
FrameTree. This remote frame is then set by the FocusController as
its current focused frame.
The Blink logic used by document.activeElement is in
TreeScope::adjustedFocusedElement(). To make it work properly with
remote focused frames, this CL also introduces a new FocusController
accessor for getting the focused <iframe> element and moves TreeScope's
focusedFrameOwnerElement logic there.
BUG=341918, 339659
Committed: https://crrev.com/b1dc216a10cbc9367118071e5bf43b2d15de6013
Cr-Commit-Position: refs/heads/master@{#357962}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Change plumbing a bit: use focusDocumentView on WebView and remove clearFocus from WebLocalFrame #
Total comments: 4
Patch Set 3 : Move focusedFrameOwnerElement to FocusController #
Total comments: 2
Patch Set 4 : Send focused frame updates to all SiteInstance in the tree, not just the old focused frame. #Patch Set 5 : Rebase #Patch Set 6 : Address Daniel's feedback #Patch Set 7 : Remove some plumbing that should instead be introduced in the window.focus() CL. #
Total comments: 4
Messages
Total messages: 16 (4 generated)
|