| Index: third_party/WebKit/Source/web/WebNode.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebNode.cpp b/third_party/WebKit/Source/web/WebNode.cpp
|
| index ae7e0720f14e800942fdde70ae7fb58048532ea9..f25d8099ed2f8a7e253b4eceb99cc346b474b2f3 100644
|
| --- a/third_party/WebKit/Source/web/WebNode.cpp
|
| +++ b/third_party/WebKit/Source/web/WebNode.cpp
|
| @@ -217,20 +217,27 @@ bool WebNode::focused() const
|
| return m_private->focused();
|
| }
|
|
|
| -WebPluginContainer* WebNode::pluginContainer() const
|
| +WebPluginContainer* WebNode::pluginContainerFromNode(const Node* node)
|
| {
|
| - if (isNull())
|
| - return 0;
|
| - const Node& coreNode = *constUnwrap<Node>();
|
| - if (isHTMLObjectElement(coreNode) || isHTMLEmbedElement(coreNode)) {
|
| - LayoutObject* object = coreNode.layoutObject();
|
| - if (object && object->isLayoutPart()) {
|
| - Widget* widget = toLayoutPart(object)->widget();
|
| - if (widget && widget->isPluginContainer())
|
| - return toWebPluginContainerImpl(widget);
|
| - }
|
| + if (!node)
|
| + return nullptr;
|
| +
|
| + if (!isHTMLObjectElement(node) && !isHTMLEmbedElement(node))
|
| + return nullptr;
|
| +
|
| + LayoutObject* object = node->layoutObject();
|
| + if (object && object->isLayoutPart()) {
|
| + Widget* widget = toLayoutPart(object)->widget();
|
| + if (widget && widget->isPluginContainer())
|
| + return toWebPluginContainerImpl(widget);
|
| }
|
| - return 0;
|
| +
|
| + return nullptr;
|
| +}
|
| +
|
| +WebPluginContainer* WebNode::pluginContainer() const
|
| +{
|
| + return pluginContainerFromNode(constUnwrap<Node>());
|
| }
|
|
|
| WebAXObject WebNode::accessibilityObject()
|
|
|