Bug 1134280 - Get rid of Tag() - patch 5 - nsGenericHTMLElement::IsHTMLElement, r=smaug

This commit is contained in:
Andrea Marchesini 2015-03-03 11:09:01 +00:00
parent aed2bddb2b
commit bacbce5147

View File

@ -291,6 +291,25 @@ public:
return rcFrame.height;
}
// These methods are already implemented in nsIContent but we want something
// faster for HTMLElements ignoring the namespace checking.
// This is safe because we already know that we are in the HTML namespace.
inline bool IsHTMLElement() const
{
return true;
}
inline bool IsHTMLElement(nsIAtom* aTag) const
{
return mNodeInfo->Equals(aTag);
}
template<typename First, typename... Args>
inline bool IsAnyOfHTMLElements(First aFirst, Args... aArgs) const
{
return IsNodeInternal(aFirst, aArgs...);
}
protected:
virtual ~nsGenericHTMLElement() {}