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

Unified Diff: chrome/browser/render_widget_host_view_win.cc

Issue 17455: Autofill popup dismissed when page loses focus (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « chrome/browser/render_widget_host_view_win.h ('k') | chrome/browser/resource_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/render_widget_host_view_win.cc
===================================================================
--- chrome/browser/render_widget_host_view_win.cc (revision 7623)
+++ chrome/browser/render_widget_host_view_win.cc (working copy)
@@ -78,7 +78,7 @@
shutdown_factory_(this),
parent_hwnd_(NULL),
is_loading_(false),
- focus_on_show_(true) {
+ activatable_(true) {
render_widget_host_->set_view(this);
renderer_accessible_ =
CommandLine().HasSwitch(switches::kEnableRendererAccessibility);
@@ -166,7 +166,7 @@
render_widget_host_->ForwardMouseEvent(event);
- if (event.type == WebInputEvent::MOUSE_DOWN) {
+ if (activatable_ && event.type == WebInputEvent::MOUSE_DOWN) {
// This is a temporary workaround for bug 765011 to get focus when the
// mouse is clicked. This happens after the mouse down event is sent to
// the renderer because normally Windows does a WM_SETFOCUS after
@@ -780,6 +780,9 @@
LRESULT RenderWidgetHostViewWin::OnMouseActivate(UINT, WPARAM, LPARAM,
BOOL& handled) {
+ if (!activatable_)
+ return MA_NOACTIVATE;
+
HWND focus_window = GetFocus();
if (!::IsWindow(focus_window) || !IsChild(focus_window)) {
// We handle WM_MOUSEACTIVATE to set focus to the underlying plugin
« no previous file with comments | « chrome/browser/render_widget_host_view_win.h ('k') | chrome/browser/resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698