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

Unified Diff: Source/core/dom/ContainerNode.cpp

Issue 192293002: Use new is*Element() helper functions in DOM code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add is*Element(PassRefPtr) helper 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
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 04b97d85b66ce166534952528d04c333a6cb81e9..a722ab5ee5042a9a611a74c242468ba0813eb1a9 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -268,7 +268,7 @@ void ContainerNode::parserInsertBefore(PassRefPtr<Node> newChild, Node& nextChil
ASSERT(newChild);
ASSERT(nextChild.parentNode() == this);
ASSERT(!newChild->isDocumentFragment());
- ASSERT(!hasTagName(templateTag));
+ ASSERT(!isHTMLTemplateElement(this));
if (nextChild.previousSibling() == newChild || nextChild == newChild) // nothing to do
return;
@@ -614,7 +614,7 @@ void ContainerNode::parserAppendChild(PassRefPtr<Node> newChild)
ASSERT(newChild);
ASSERT(!newChild->parentNode()); // Use appendChild if you need to handle reparenting (and want DOM mutation events).
ASSERT(!newChild->isDocumentFragment());
- ASSERT(!hasTagName(templateTag));
+ ASSERT(!isHTMLTemplateElement(this));
if (document() != newChild->document())
document().adoptNode(newChild.get(), ASSERT_NO_EXCEPTION);
@@ -1034,7 +1034,7 @@ PassRefPtr<HTMLCollection> ContainerNode::getElementsByClassName(const AtomicStr
PassRefPtr<RadioNodeList> ContainerNode::radioNodeList(const AtomicString& name, bool onlyMatchImgElements)
{
- ASSERT(hasTagName(formTag) || hasTagName(fieldsetTag));
+ ASSERT(isHTMLFormElement(this) || isHTMLFieldSetElement(this));
CollectionType type = onlyMatchImgElements ? RadioImgNodeListType : RadioNodeListType;
return ensureRareData().ensureNodeLists().addCache<RadioNodeList>(*this, type, name);
}

Powered by Google App Engine
This is Rietveld 408576698