summaryrefslogtreecommitdiffstats
path: root/WebCore/plugins/android/PluginViewAndroid.cpp
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-03-31 12:07:39 -0700
committerGrace Kloba <klobag@google.com>2010-03-31 12:35:38 -0700
commita622a48d6cc2bea33d2467de9d31feb1b03b03eb (patch)
treee777f23d61d2cea75ca142ab20c3d92a7bf459f3 /WebCore/plugins/android/PluginViewAndroid.cpp
parent5a3decdc84314db679df0dc60edb9aa4fb215147 (diff)
downloadexternal_webkit-a622a48d6cc2bea33d2467de9d31feb1b03b03eb.zip
external_webkit-a622a48d6cc2bea33d2467de9d31feb1b03b03eb.tar.gz
external_webkit-a622a48d6cc2bea33d2467de9d31feb1b03b03eb.tar.bz2
Make sure html plugin element supports focus so that
plugin can call focus() on it. By default, only nodes can be tabbed through supports focus. We make plugin element like frame element where it always supports focus. In Android, plugin has a focused mode, so it requires this change. Fix http://b/issue?id=2539608
Diffstat (limited to 'WebCore/plugins/android/PluginViewAndroid.cpp')
-rw-r--r--WebCore/plugins/android/PluginViewAndroid.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/WebCore/plugins/android/PluginViewAndroid.cpp b/WebCore/plugins/android/PluginViewAndroid.cpp
index ee39687..682268a 100644
--- a/WebCore/plugins/android/PluginViewAndroid.cpp
+++ b/WebCore/plugins/android/PluginViewAndroid.cpp
@@ -247,11 +247,9 @@ void PluginView::handleMouseEvent(MouseEvent* event)
evt.data.mouse.y = localPos.y();
if (isDown) {
- // The plugin needs focus to receive keyboard events
- if (Page* page = m_parentFrame->page()) {
- page->focusController()->setFocusedNode(m_element, m_parentFrame);
- event->setDefaultHandled();
- }
+ // The plugin needs focus to receive keyboard and touch events
+ m_element->focus();
+ event->setDefaultHandled();
}
}
else {