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
Родитель 0487326e6e
Коммит aa050b2336
1 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -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() {}