From 73aec6aa4b67fd52fdde41a77c0a75b37ea33391 Mon Sep 17 00:00:00 2001 From: "dcheng@chromium.org" Date: Thu, 6 Feb 2014 18:23:29 +0000 Subject: Update WebFrameClient implementations to maintain frame tree. BUG=340002 R=boliu@chromium.org, creis@chromium.org, nasko@chromium.org, thestig@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=249168 Review URL: https://codereview.chromium.org/148353003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249449 0039d316-1c4b-4281-b951-d872f2087c98 --- content/renderer/render_frame_impl.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'content/renderer') diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 221fb11..a205148 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -710,6 +710,7 @@ blink::WebFrame* RenderFrameImpl::createChildFrame( render_view_.get(), routing_id); blink::WebFrame* web_frame = WebFrame::create(child_render_frame, child_frame_identifier); + parent->appendChild(web_frame); child_render_frame->SetWebFrame(web_frame); return web_frame; @@ -755,6 +756,9 @@ void RenderFrameImpl::frameDetached(blink::WebFrame* frame) { CHECK_EQ(it->second, this); g_frame_map.Get().erase(it); + if (is_subframe) + frame->parent()->removeChild(frame); + // |frame| is invalid after here. frame->close(); -- cgit v1.1