Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Unified Diff: ui/views/controls/webview/webview.cc

Issue 584743004: Fix a crash which occurs while dragging tabs back to the window where they originated from. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/controls/webview/webview_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/webview/webview.cc
diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc
index f1f12d015446d245c42fea9bac362d5627040814..7e31097059dd5156f9d2ad00328137c46d701324 100644
--- a/ui/views/controls/webview/webview.cc
+++ b/ui/views/controls/webview/webview.cc
@@ -303,13 +303,14 @@ void WebView::AttachWebContents() {
if (holder_->native_view() == view_to_attach)
return;
+ // The WCV needs to be parented before making it visible.
+ holder_->Attach(view_to_attach);
+
// Fullscreen widgets are not parented by a WebContentsView. Their visibility
// is controlled by content i.e. (RenderWidgetHost)
if (!is_embedding_fullscreen_widget_)
view_to_attach->Show();
- holder_->Attach(view_to_attach);
-
// The view will not be focused automatically when it is attached, so we need
// to pass on focus to it if the FocusManager thinks the view is focused. Note
// that not every Widget has a focus manager.
« no previous file with comments | « no previous file | ui/views/controls/webview/webview_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698