Chromium Code Reviews| Index: Source/core/html/HTMLElement.h |
| diff --git a/Source/core/html/HTMLElement.h b/Source/core/html/HTMLElement.h |
| index 590b8eff543b5b1692d5a03681e742c48e930649..744acd84453149a7b0e92af5faf3ba6043d24f8c 100644 |
| --- a/Source/core/html/HTMLElement.h |
| +++ b/Source/core/html/HTMLElement.h |
| @@ -149,6 +149,14 @@ inline bool Node::hasTagName(const HTMLQualifiedName& name) const |
| return isHTMLElement() && toHTMLElement(*this).hasTagName(name); |
| } |
| +class HasHTMLTagName { |
|
adamk
2014/08/14 20:15:10
Please add a comment here explaining what this is
Inactive
2014/08/14 20:21:39
Done.
|
| +public: |
| + explicit HasHTMLTagName(const HTMLQualifiedName& tagName): m_tagName(tagName) { } |
| + bool operator() (const HTMLElement& element) const { return element.hasTagName(m_tagName); } |
| +private: |
| + const HTMLQualifiedName& m_tagName; |
| +}; |
| + |
| // This requires isHTML*Element(const Element&) and isHTML*Element(const HTMLElement&). |
| // When the input element is an HTMLElement, we don't need to check the namespace URI, just the local name. |
| #define DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) \ |