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

Unified Diff: Source/web/WebNode.cpp

Issue 200723002: Use new is*Element() helper functions more in web/ code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use same assertion as in operator->() Created 6 years, 9 months 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 | « Source/web/WebInputElement.cpp ('k') | Source/web/WebPageSerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « Source/web/WebInputElement.cpp ('k') | Source/web/WebPageSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698