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

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

Issue 19028005: Introduce isHTMLTitleElement and toHTMLTitleElement (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/editing/ReplaceSelectionCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698