From 5a322ae6549fe1bec02167c68003c1e1538ce717 Mon Sep 17 00:00:00 2001 From: "dmazzoni@chromium.org" Date: Mon, 23 Apr 2012 19:23:48 +0000 Subject: Revert 133490 - Make sure the WebContents has focus after being attached to a WebView, if that WebView was focused. Reverting because PrintPreviewUIUnitTest.PrintPreviewData failed on Chrome OS, with a stack trace including views::WebView::AttachWebContents(). http://crbug.com/123995 TEST=none. I need to add a set of unit tests to views for WebView, but that requires creating a new exe that can depend on content. I've filed http://crbug.com/124662 for this. Review URL: https://chromiumcodereview.appspot.com/10186007 TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10181007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133491 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/views/controls/webview/webview.cc | 6 ------ 1 file changed, 6 deletions(-) (limited to 'ui') diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc index af7803b..ad5fc8a 100644 --- a/ui/views/controls/webview/webview.cc +++ b/ui/views/controls/webview/webview.cc @@ -180,12 +180,6 @@ void WebView::AttachWebContents() { if (web_contents_) { wcv_holder_->Attach(web_contents_->GetNativeView()); - // The WebContentsView will not be focused automatically when it is - // attached, so we need to pass on focus to it if the FocusManager thinks - // the WebView is focused. - if (GetFocusManager()->GetFocusedView() == this) - web_contents_->Focus(); - registrar_.Add( this, content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED, -- cgit v1.1