Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
| index 9eb65ef0dbf4bb2bf62f5aafb4e2c845cc1624d4..0787a828e9574b39ad2eaaae123e0bcad728b13b 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
| @@ -153,8 +153,7 @@ bool HTMLPlugInElement::requestObjectInternal( |
| } |
| bool HTMLPlugInElement::canProcessDrag() const { |
| - return pluginWidget() && pluginWidget()->isPluginView() && |
| - toPluginView(pluginWidget())->canProcessDrag(); |
| + return pluginWidget() && pluginWidget()->canProcessDrag(); |
| } |
| bool HTMLPlugInElement::canStartSelection() const { |
| @@ -334,7 +333,7 @@ SharedPersistent<v8::Object>* HTMLPlugInElement::pluginWrapper() { |
| // return the cached allocated Bindings::Instance. Not supporting this |
| // edge-case is OK. |
| if (!m_pluginWrapper) { |
| - FrameViewBase* plugin; |
| + PluginView* plugin; |
| if (m_persistedPlugin) |
| plugin = m_persistedPlugin.get(); |
| @@ -342,15 +341,17 @@ SharedPersistent<v8::Object>* HTMLPlugInElement::pluginWrapper() { |
| plugin = pluginWidget(); |
| if (plugin) |
| - m_pluginWrapper = frame->script().createPluginWrapper(plugin); |
| + m_pluginWrapper = frame->script().createPluginWrapper(*plugin); |
| } |
| return m_pluginWrapper.get(); |
| } |
| -FrameViewBase* HTMLPlugInElement::pluginWidget() const { |
| - if (LayoutPart* layoutPart = layoutPartForJSBindings()) |
| - return layoutPart->frameViewBase(); |
| - return nullptr; |
| +PluginView* HTMLPlugInElement::pluginWidget() const { |
| + LayoutPart* layoutPart = layoutPartForJSBindings(); |
| + return layoutPart && layoutPart->frameViewBase() && |
|
dglazkov
2017/04/04 00:40:54
I find this rather long and unwieldy. Maybe switch
joelhockey
2017/04/04 01:34:44
Done
|
| + layoutPart->frameViewBase()->isPluginView() |
| + ? toPluginView(layoutPart->frameViewBase()) |
| + : nullptr; |
| } |
| bool HTMLPlugInElement::isPresentationAttribute( |
| @@ -424,8 +425,7 @@ bool HTMLPlugInElement::isKeyboardFocusable() const { |
| if (HTMLFrameOwnerElement::isKeyboardFocusable()) |
| return true; |
| return document().isActive() && pluginWidget() && |
| - pluginWidget()->isPluginView() && |
| - toPluginView(pluginWidget())->supportsKeyboardFocus(); |
| + pluginWidget()->supportsKeyboardFocus(); |
| } |
| bool HTMLPlugInElement::hasCustomFocusLogic() const { |