From 9e14e49082f175ceccaa93a3329a8816b905ae34 Mon Sep 17 00:00:00 2001 From: miu Date: Fri, 24 Oct 2014 19:39:04 -0700 Subject: Fix Flash fullscreen focus regressions, and add interactive_ui_tests. This revisits focus handling logic relating to Flash fullscreen in WebContentsImpl. Before this change, calls to WebContentsImpl::Focus() would directly call RenderWidgetHostView::Focus(), but this prevented WebContentsView and its delegate from "shadowing" these focus changes in the browser UI. In other words, on Windows/Linux/CrOS, the focus state for widgets in the ui::views toolkit were not necessarily synchronized with the render widget's focus state (see bug for details). 90% of this change adds regression testing for everything described above. The tests run a simulated fullscreened Flash widget, and then invoke user keyboard and mouse actions on the browser UI to confirm both the Flash widget and ui::views are in agreement and respond correctly to focus changes; also, including focus store/restore when switching tabs. BUG=403641 TEST=Repro steps in bug 403641; and also that focus remains with the omnibox or tab contents when switching back and forth to other tabs. New automated interactive_ui_tests. Review URL: https://codereview.chromium.org/670653005 Cr-Commit-Position: refs/heads/master@{#301269} --- content/browser/web_contents/web_contents_impl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'content/browser/web_contents/web_contents_impl.h') diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index 60fdc72..c437796 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -515,6 +515,7 @@ class CONTENT_EXPORT WebContentsImpl // RenderWidgetHostDelegate -------------------------------------------------- void RenderWidgetDeleted(RenderWidgetHostImpl* render_widget_host) override; + void RenderWidgetGotFocus(RenderWidgetHostImpl* render_widget_host) override; bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) override; void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) override; -- cgit v1.1