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

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

Issue 18313005: Introduce isHTMLTableElement and toHTMLTableElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Retry Created 7 years, 5 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/core/html/HTMLFormElement.cpp ('k') | Source/core/html/HTMLTablePartElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTableElement.h
diff --git a/Source/core/html/HTMLTableElement.h b/Source/core/html/HTMLTableElement.h
index 73fee6b42a9366b6bcd31bc727f9fcfbff526897..c9b4afd381ca56140d1d21d84308a4454164f552 100644
--- a/Source/core/html/HTMLTableElement.h
+++ b/Source/core/html/HTMLTableElement.h
@@ -100,6 +100,22 @@ private:
RefPtr<StylePropertySet> m_sharedCellStyle;
};
+inline bool isHTMLTableElement(const Node* node)
+{
+ return node->hasTagName(HTMLNames::tableTag);
+}
+
+inline bool isHTMLTableElement(const Element* element)
+{
+ return element->hasTagName(HTMLNames::tableTag);
+}
+
+inline HTMLTableElement* toHTMLTableElement(Node* node)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTableElement(node));
+ return static_cast<HTMLTableElement*>(node);
+}
+
} //namespace
#endif
« no previous file with comments | « Source/core/html/HTMLFormElement.cpp ('k') | Source/core/html/HTMLTablePartElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698