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

Unified Diff: Source/core/html/HTMLUnknownElement.h

Issue 98443003: Apply DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION to HTMLUnknownElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLUnknownElement.h
diff --git a/Source/core/html/HTMLUnknownElement.h b/Source/core/html/HTMLUnknownElement.h
index be493b1bf4e48fbe3e83c8305565e96733aeadb6..1c1794c0ed5496463c537abb7519e896815e8899 100644
--- a/Source/core/html/HTMLUnknownElement.h
+++ b/Source/core/html/HTMLUnknownElement.h
@@ -51,12 +51,13 @@ private:
}
};
-inline HTMLUnknownElement* toHTMLUnknownElement(HTMLElement* element)
+inline bool isHTMLUnknownElement(const Node& node)
{
- ASSERT_WITH_SECURITY_IMPLICATION(!element || element->isHTMLUnknownElement());
- return static_cast<HTMLUnknownElement*>(element);
+ return node.isElementNode() && toHTMLElement(node).isHTMLUnknownElement();
}
+DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLUnknownElement);
+
} // namespace
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698