New issue
Advanced search Search tips

Issue 820786 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Clean up usage of FocusController::FocusedOrMainFrame()

Project Member Reported by dcheng@chromium.org, Mar 11 2018

Issue description

Thanks to this:

  // FIXME: This is a temporary hack to ensure that we return a LocalFrame, even
  // when the mainFrame is remote.  FocusController needs to be refactored to
  // deal with RemoteFrames cross-process focus transfers.
  for (Frame* frame = &page_->MainFrame()->Tree().Top(); frame;
       frame = frame->Tree().TraverseNext()) {
    if (frame->IsLocalFrame() && ToLocalFrame(frame)->IsLocalRoot())
      return frame;
  }

this function essentially picks a random frame. We should see if we can reduce usage of this to zero.
 

Sign in to add a comment