Bug 1422197 - Add fast path to get DocGroup in binding code for [CEReactions]

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 07:29:57 -04:00 committed by Roy Tam
commit ca09afd0b0
30 changed files with 206 additions and 44 deletions

View file

@ -22,6 +22,11 @@
class nsIAtom;
class nsIDocument;
namespace mozilla {
namespace dom {
class DocGroup;
} // namespace dom
} // namespace mozilla
/**
* Structure used as a key for caching Attrs in nsDOMAttributeMap's mAttributeCache.
@ -87,6 +92,7 @@ class nsDOMAttributeMap final : public nsIDOMMozNamedAttrMap
{
public:
typedef mozilla::dom::Attr Attr;
typedef mozilla::dom::DocGroup DocGroup;
typedef mozilla::dom::Element Element;
typedef mozilla::ErrorResult ErrorResult;
@ -135,6 +141,7 @@ public:
return mContent;
}
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
DocGroup* GetDocGroup() const;
// WebIDL
Attr* GetNamedItem(const nsAString& aAttrName);