commit | f9ea4fc7feb4245e7041f8430af393cf2a4ae2c6 | [log] [tgz] |
---|---|---|
author | Lucas Furukawa Gadani <[email protected]> | Fri Aug 03 23:57:13 2018 |
committer | Commit Bot <[email protected]> | Fri Aug 03 23:57:13 2018 |
tree | d81990bc45aa883c82a1b1e75e58fba8e9594f17 | |
parent | c259cc51bfff2af237e8eb2e145c7a700533936b [diff] [blame] |
Reattach an inner contents to its outer contents when a view is swapped. Change-Id: Ia848a3607658a46eaadc1949cf59caf7b75f7528 Reviewed-on: https://chromium-review.googlesource.com/1161391 Commit-Queue: Lucas Gadani <[email protected]> Reviewed-by: Nasko Oskov <[email protected]> Cr-Commit-Position: refs/heads/master@{#580708}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index d493c2a..df8c751f 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4908,6 +4908,11 @@ view_->RenderViewHostChanged(old_host, new_host); + // If this is an inner WebContents that has swapped views, we need to reattach + // it to its outer WebContents. + if (node_.outer_web_contents()) + ReattachToOuterWebContentsFrame(); + // Ensure that the associated embedder gets cleared after a RenderViewHost // gets swapped, so we don't reuse the same embedder next time a // RenderViewHost is attached to this WebContents.