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

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

Issue 18251004: Introduce isHTMLAreaElement and toHTMLAreaElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/accessibility/AccessibilityRenderObject.cpp ('k') | Source/core/html/HTMLMapElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLAreaElement.h
diff --git a/Source/core/html/HTMLAreaElement.h b/Source/core/html/HTMLAreaElement.h
index 778e1e509cb9f6b0b20f3d00247ba8978664baed..056758adbfd8b9e34de80f2447f7ce2cd49bb59f 100644
--- a/Source/core/html/HTMLAreaElement.h
+++ b/Source/core/html/HTMLAreaElement.h
@@ -68,6 +68,22 @@ private:
Shape m_shape;
};
+inline bool isHTMLAreaElement(const Node* node)
+{
+ return node->hasTagName(HTMLNames::areaTag);
+}
+
+inline bool isHTMLAreaElement(const Element* element)
+{
+ return element->hasTagName(HTMLNames::areaTag);
+}
+
+inline HTMLAreaElement* toHTMLAreaElement(Node* node)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLAreaElement(node));
+ return static_cast<HTMLAreaElement*>(node);
+}
+
} //namespace
#endif
« no previous file with comments | « Source/core/accessibility/AccessibilityRenderObject.cpp ('k') | Source/core/html/HTMLMapElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698