Index: Source/web/WebNode.cpp |
diff --git a/Source/web/WebNode.cpp b/Source/web/WebNode.cpp |
index db64b165c3a6b2b9cf9fd0634afd3ed7ea9a156b..eb3f9e9b6c07cfd9b93754349f610af24d333a70 100644 |
--- a/Source/web/WebNode.cpp |
+++ b/Source/web/WebNode.cpp |
@@ -50,6 +50,7 @@ |
#include "core/editing/markup.h" |
#include "core/events/Event.h" |
#include "core/html/HTMLCollection.h" |
+#include "core/html/HTMLElement.h" |
#include "core/rendering/RenderObject.h" |
#include "core/rendering/RenderWidget.h" |
#include "platform/Widget.h" |
@@ -236,9 +237,9 @@ WebPluginContainer* WebNode::pluginContainer() const |
{ |
if (isNull()) |
return 0; |
- const Node* coreNode = constUnwrap<Node>(); |
- if (coreNode->hasTagName(HTMLNames::objectTag) || coreNode->hasTagName(HTMLNames::embedTag)) { |
- RenderObject* object = coreNode->renderer(); |
+ const Node& coreNode = *constUnwrap<Node>(); |
+ if (isHTMLObjectElement(coreNode) || isHTMLEmbedElement(coreNode)) { |
+ RenderObject* object = coreNode.renderer(); |
if (object && object->isWidget()) { |
Widget* widget = WebCore::toRenderWidget(object)->widget(); |
if (widget && widget->isPluginContainer()) |