Chromium Code Reviews| Index: Source/core/html/HTMLTitleElement.h |
| diff --git a/Source/core/html/HTMLTitleElement.h b/Source/core/html/HTMLTitleElement.h |
| index b80f598a67347dde62641243e50a8501c0b92cc1..330b66e77e5bbb7744a89642cbf87693bd6632cf 100644 |
| --- a/Source/core/html/HTMLTitleElement.h |
| +++ b/Source/core/html/HTMLTitleElement.h |
| @@ -46,6 +46,22 @@ private: |
| StringWithDirection m_title; |
| }; |
| +inline bool isHTMLTitleElement(const Node* node) |
| +{ |
| + return node->hasTagName(HTMLNames::titleTag); |
| +} |
| + |
| +inline bool isHTMLTitleElement(const Element* element) |
|
eseidel
2013/07/11 01:24:00
This one shouldn't be necessary, or?
kangil_
2013/07/11 01:34:34
Node::hasTagName includes Node::isElementNode and
|
| +{ |
| + return element->hasTagName(HTMLNames::titleTag); |
| +} |
| + |
| +inline HTMLTitleElement* toHTMLTitleElement(Node* node) |
| +{ |
| + ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTitleElement(node)); |
| + return static_cast<HTMLTitleElement*>(node); |
| +} |
| + |
| } //namespace |
| #endif |