finalKitFocus(frame, node, x, y);
}
+static bool nodeIsPlugin(Node* node) {
+ RenderObject* renderer = node->renderer();
+ if (renderer->isWidget()) {
+ Widget* widget = static_cast<RenderWidget*>(renderer)->widget();
+ return widget && widget->isPluginView();
+ }
+ return NULL;
+}
+
// Update mouse position and may change focused node.
bool WebViewCore::finalKitFocus(WebCore::Frame* frame, WebCore::Node* node,
int x, int y)
builder.setLastFocus(node);
m_lastFocused = node;
m_lastFocusedBounds = node->getRect();
+
+ // hack to give the plugin focus (for keys). better fix on the way
+ if (nodeIsPlugin(node)) {
+ node->document()->setFocusedNode(node);
+ }
return true;
}
// destroyed.
PluginWidgetAndroid(WebCore::PluginView* view);
~PluginWidgetAndroid();
-
+
+ WebCore::PluginView* pluginView() const { return m_pluginView; }
+
/* Can't determine our core at construction time, so PluginView calls this
as soon as it has a parent.
*/