| Index: Source/core/html/HTMLElement.h
|
| diff --git a/Source/core/html/HTMLElement.h b/Source/core/html/HTMLElement.h
|
| index 590b8eff543b5b1692d5a03681e742c48e930649..082ca218edb6a9674ca8c24bd6baee87f78fd74e 100644
|
| --- a/Source/core/html/HTMLElement.h
|
| +++ b/Source/core/html/HTMLElement.h
|
| @@ -149,6 +149,15 @@ inline bool Node::hasTagName(const HTMLQualifiedName& name) const
|
| return isHTMLElement() && toHTMLElement(*this).hasTagName(name);
|
| }
|
|
|
| +// Functor used to match HTMLElements with a specific HTML tag when using the ElementTraversal API.
|
| +class HasHTMLTagName {
|
| +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) \
|
|
|