summaryrefslogtreecommitdiff
path: root/dom/base/nsDocument.h
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 07:42:07 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 07:42:07 -0400
commit9e5e58c0f6e1c65674cc688816f387532661d6f1 (patch)
treee211b95d505d1ecdf8f7b3513464dd329cbbcc54 /dom/base/nsDocument.h
parent16dba9a30b849c9381fab5fe53b722c7901e5283 (diff)
downloaduxp-9e5e58c0f6e1c65674cc688816f387532661d6f1.tar.gz
Bug 1425769 - Base class for ShadowRoot and Document to manage style state
Tag #1375
Diffstat (limited to 'dom/base/nsDocument.h')
-rw-r--r--dom/base/nsDocument.h44
1 files changed, 2 insertions, 42 deletions
diff --git a/dom/base/nsDocument.h b/dom/base/nsDocument.h
index 931bdd89d8..4ab2858408 100644
--- a/dom/base/nsDocument.h
+++ b/dom/base/nsDocument.h
@@ -293,36 +293,6 @@ public:
nsDocHeaderData* mNext;
};
-class nsDOMStyleSheetList : public mozilla::dom::StyleSheetList,
- public nsStubDocumentObserver
-{
-public:
- explicit nsDOMStyleSheetList(nsIDocument* aDocument);
-
- NS_DECL_ISUPPORTS_INHERITED
-
- // nsIDocumentObserver
- NS_DECL_NSIDOCUMENTOBSERVER_STYLESHEETADDED
- NS_DECL_NSIDOCUMENTOBSERVER_STYLESHEETREMOVED
-
- // nsIMutationObserver
- NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
-
- virtual nsINode* GetParentObject() const override
- {
- return mDocument;
- }
-
- uint32_t Length() override;
- mozilla::StyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) override;
-
-protected:
- virtual ~nsDOMStyleSheetList();
-
- int32_t mLength;
- nsIDocument* mDocument;
-};
-
class nsOnloadBlocker final : public nsIRequest
{
public:
@@ -624,14 +594,6 @@ public:
virtual void EnsureOnDemandBuiltInUASheet(mozilla::StyleSheet* aSheet) override;
- /**
- * Get the (document) style sheets owned by this document.
- * These are ordered, highest priority last
- */
- virtual int32_t GetNumberOfStyleSheets() const override;
- virtual mozilla::StyleSheet* GetStyleSheetAt(int32_t aIndex) const override;
- virtual int32_t GetIndexOfStyleSheet(
- const mozilla::StyleSheet* aSheet) const override;
virtual void AddStyleSheet(mozilla::StyleSheet* aSheet) override;
virtual void RemoveStyleSheet(mozilla::StyleSheet* aSheet) override;
@@ -642,7 +604,7 @@ public:
virtual void RemoveStyleSheetFromStyleSets(mozilla::StyleSheet* aSheet);
virtual void InsertStyleSheetAt(mozilla::StyleSheet* aSheet,
- int32_t aIndex) override;
+ size_t aIndex) override;
virtual void SetStyleSheetApplicableState(mozilla::StyleSheet* aSheet,
bool aApplicable) override;
@@ -1128,7 +1090,7 @@ public:
// WebIDL bits
virtual mozilla::dom::DOMImplementation*
GetImplementation(mozilla::ErrorResult& rv) override;
- virtual mozilla::dom::StyleSheetList* StyleSheets() override;
+
virtual void SetSelectedStyleSheetSet(const nsAString& aSheetSet) override;
virtual void GetLastStyleSheetSet(nsString& aSheetSet) override;
virtual mozilla::dom::DOMStringList* StyleSheetSets() override;
@@ -1350,7 +1312,6 @@ protected:
// EndLoad() has already happened.
nsWeakPtr mWeakSink;
- nsTArray<RefPtr<mozilla::StyleSheet>> mStyleSheets;
nsTArray<RefPtr<mozilla::StyleSheet>> mOnDemandBuiltInUASheets;
nsTArray<RefPtr<mozilla::StyleSheet>> mAdditionalSheets[AdditionalSheetTypeCount];
@@ -1392,7 +1353,6 @@ public:
static bool IsWebComponentsEnabled(nsPIDOMWindowInner* aWindow);
RefPtr<mozilla::EventListenerManager> mListenerManager;
- RefPtr<mozilla::dom::StyleSheetList> mDOMStyleSheets;
RefPtr<nsDOMStyleSheetSetList> mStyleSheetSetList;
RefPtr<nsScriptLoader> mScriptLoader;
nsDocHeaderData* mHeaderData;