summaryrefslogtreecommitdiff
path: root/dom/base/StyleSheetList.h
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-06-13 08:21:48 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-06-13 08:21:48 -0400
commit43725c7264ca3f63de348d1d1596ce1fe9e64d2d (patch)
treee1ff1b11cc54e63b665aab1aa3776a62ee56250d /dom/base/StyleSheetList.h
parent35754dd1af72abcae49edd2eeb76855d999a4e6d (diff)
downloaduxp-43725c7264ca3f63de348d1d1596ce1fe9e64d2d.tar.gz
Bug 1426494 - Share more code between nsIDocument and ShadowRoot
Tag #1375
Diffstat (limited to 'dom/base/StyleSheetList.h')
-rw-r--r--dom/base/StyleSheetList.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/dom/base/StyleSheetList.h b/dom/base/StyleSheetList.h
index ea5c33a983..f8f371a81b 100644
--- a/dom/base/StyleSheetList.h
+++ b/dom/base/StyleSheetList.h
@@ -7,7 +7,7 @@
#ifndef mozilla_dom_StyleSheetList_h
#define mozilla_dom_StyleSheetList_h
-#include "mozilla/dom/StyleScope.h"
+#include "mozilla/dom/DocumentOrShadowRoot.h"
#include "nsIDOMStyleSheetList.h"
#include "nsWrapperCache.h"
#include "nsStubDocumentObserver.h"
@@ -31,28 +31,28 @@ public:
NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
- explicit StyleSheetList(StyleScope& aScope);
+ explicit StyleSheetList(DocumentOrShadowRoot& aScope);
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override final;
nsINode* GetParentObject() const
{
- return mStyleScope ? &mStyleScope->AsNode() : nullptr;
+ return mDocumentOrShadowRoot ? &mDocumentOrShadowRoot->AsNode() : nullptr;
}
uint32_t Length() const
{
- return mStyleScope ? mStyleScope->SheetCount() : 0;
+ return mDocumentOrShadowRoot ? mDocumentOrShadowRoot->SheetCount() : 0;
}
StyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) const
{
- if (!mStyleScope) {
+ if (!mDocumentOrShadowRoot) {
aFound = false;
return nullptr;
}
- StyleSheet* sheet = mStyleScope->SheetAt(aIndex);
+ StyleSheet* sheet = mDocumentOrShadowRoot->SheetAt(aIndex);
aFound = !!sheet;
return sheet;
}
@@ -66,7 +66,7 @@ public:
protected:
virtual ~StyleSheetList();
- StyleScope* mStyleScope; // Weak, cleared on "NodeWillBeDestroyed".
+ DocumentOrShadowRoot* mDocumentOrShadowRoot; // Weak, cleared on "NodeWillBeDestroyed".
};
} // namespace dom