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

Unified Diff: Source/core/html/HTMLPlugInElement.cpp

Issue 717193003: HTMLPlugInElement: Use custom focus logic only when there is a plugin. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | « LayoutTests/fast/plugins/plugin-placeholder-focus-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLPlugInElement.cpp
diff --git a/Source/core/html/HTMLPlugInElement.cpp b/Source/core/html/HTMLPlugInElement.cpp
index 5f5dd4f0eeab0b089444ad2e45ad77b2df31c1d0..df9adf0dd428c3df409379793762ff59bcca331f 100644
--- a/Source/core/html/HTMLPlugInElement.cpp
+++ b/Source/core/html/HTMLPlugInElement.cpp
@@ -390,14 +390,18 @@ RenderPart* HTMLPlugInElement::renderPartForJSBindings() const
bool HTMLPlugInElement::isKeyboardFocusable() const
{
+ if (useFallbackContent() || usePlaceholderContent())
+ return HTMLElement::isKeyboardFocusable();
+
if (!document().isActive())
return false;
+
return pluginWidget() && pluginWidget()->isPluginView() && toPluginView(pluginWidget())->supportsKeyboardFocus();
}
bool HTMLPlugInElement::hasCustomFocusLogic() const
{
- return !hasAuthorShadowRoot();
+ return renderer() && renderer()->isEmbeddedObject();
}
bool HTMLPlugInElement::isPluginElement() const
« no previous file with comments | « LayoutTests/fast/plugins/plugin-placeholder-focus-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698