| Index: content/browser/frame_host/frame_tree.cc
|
| diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc
|
| index cddea8333fd214ee43851fa0ee1f71b77b8d8bae..5c70f34f6c94c9394902b392238841d413a77b3a 100644
|
| --- a/content/browser/frame_host/frame_tree.cc
|
| +++ b/content/browser/frame_host/frame_tree.cc
|
| @@ -271,12 +271,16 @@ void FrameTree::SetFocusedFrame(FrameTreeNode* node) {
|
| // If the focused frame changed across processes, send a message to the old
|
| // focused frame's renderer process to clear focus from that frame and fire
|
| // blur events.
|
| - FrameTreeNode* oldFocusedFrame = GetFocusedFrame();
|
| - if (oldFocusedFrame &&
|
| - oldFocusedFrame->current_frame_host()->GetSiteInstance() !=
|
| - node->current_frame_host()->GetSiteInstance()) {
|
| - DCHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible());
|
| - oldFocusedFrame->current_frame_host()->ClearFocus();
|
| + FrameTreeNode* old_focused_frame = GetFocusedFrame();
|
| + if (old_focused_frame) {
|
| + SiteInstance* old_site_instance =
|
| + old_focused_frame->current_frame_host()->GetSiteInstance();
|
| + if (old_site_instance != node->current_frame_host()->GetSiteInstance()) {
|
| + DCHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible());
|
| + RenderFrameProxyHost* proxy =
|
| + node->render_manager()->GetRenderFrameProxyHost(old_site_instance);
|
| + proxy->SetFocusedFrame();
|
| + }
|
| }
|
|
|
| node->set_last_focus_time(base::TimeTicks::Now());
|
|
|