Index: Source/core/html/HTMLAnchorElement.h |
diff --git a/Source/core/html/HTMLAnchorElement.h b/Source/core/html/HTMLAnchorElement.h |
index 5cc83ca2b3e70d7471ed4a1d46390c4782c5533a..a63c563427e3cd942080d871b18207dce046a008 100644 |
--- a/Source/core/html/HTMLAnchorElement.h |
+++ b/Source/core/html/HTMLAnchorElement.h |
@@ -158,6 +158,22 @@ inline LinkHash HTMLAnchorElement::visitedLinkHash() const |
bool isEnterKeyKeydownEvent(Event*); |
bool isLinkClick(Event*); |
+inline bool isHTMLAnchorElement(const Node* node) |
+{ |
+ return node->hasTagName(HTMLNames::aTag); |
+} |
+ |
+inline bool isHTMLAnchorElement(const Element* element) |
+{ |
+ return element->hasTagName(HTMLNames::aTag); |
+} |
+ |
+inline HTMLAnchorElement* toHTMLAnchorElement(Node* node) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLAnchorElement(node)); |
+ return static_cast<HTMLAnchorElement*>(node); |
+} |
+ |
} // namespace WebCore |
#endif // HTMLAnchorElement_h |