summaryrefslogtreecommitdiffstats
path: root/dom/base/ShadowRoot.h
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 06:34:38 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 06:34:38 -0400
commit5f12940329ba496da5730863cae94cd8c0b145da (patch)
tree7dede8dd472329aac367a5bd1c02494fca44482f /dom/base/ShadowRoot.h
parenta72b827325c25c5951b57146e482e49e92e60f32 (diff)
downloadUXP-5f12940329ba496da5730863cae94cd8c0b145da.tar
UXP-5f12940329ba496da5730863cae94cd8c0b145da.tar.gz
UXP-5f12940329ba496da5730863cae94cd8c0b145da.tar.lz
UXP-5f12940329ba496da5730863cae94cd8c0b145da.tar.xz
UXP-5f12940329ba496da5730863cae94cd8c0b145da.zip
Bug 1396584 - Remove support for multiple ShadowRoots
Tag #1375
Diffstat (limited to 'dom/base/ShadowRoot.h')
-rw-r--r--dom/base/ShadowRoot.h51
1 files changed, 2 insertions, 49 deletions
diff --git a/dom/base/ShadowRoot.h b/dom/base/ShadowRoot.h
index e76e4ab3f..04943752b 100644
--- a/dom/base/ShadowRoot.h
+++ b/dom/base/ShadowRoot.h
@@ -25,7 +25,6 @@ namespace dom {
class Element;
class HTMLContentElement;
-class HTMLShadowElement;
class ShadowRootStyleSheetList;
class ShadowRoot final : public DocumentFragment,
@@ -42,7 +41,8 @@ public:
NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
- ShadowRoot(Element* aElement, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
+ ShadowRoot(Element* aElement,
+ already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
nsXBLPrototypeBinding* aProtoBinding);
void AddToIdTable(Element* aElement, nsIAtom* aId);
@@ -52,24 +52,6 @@ public:
bool ApplyAuthorStyles();
void SetApplyAuthorStyles(bool aApplyAuthorStyles);
StyleSheetList* StyleSheets();
- HTMLShadowElement* GetShadowElement() { return mShadowElement; }
-
- /**
- * Sets the current shadow insertion point where the older
- * ShadowRoot will be projected.
- */
- void SetShadowElement(HTMLShadowElement* aShadowElement);
-
- /**
- * Change the node that populates the distribution pool with
- * its children. This is distinct from the ShadowRoot host described
- * in the specifications. The ShadowRoot host is the element
- * which created this ShadowRoot and does not change. The pool host
- * is the same as the ShadowRoot host if this is the youngest
- * ShadowRoot. If this is an older ShadowRoot, the pool host is
- * the <shadow> element in the younger ShadowRoot (if it exists).
- */
- void ChangePoolHost(nsIContent* aNewHost);
/**
* Distributes a single explicit child of the pool host to the content
@@ -92,23 +74,15 @@ public:
void AddInsertionPoint(HTMLContentElement* aInsertionPoint);
void RemoveInsertionPoint(HTMLContentElement* aInsertionPoint);
- void SetYoungerShadow(ShadowRoot* aYoungerShadow);
- ShadowRoot* GetYoungerShadowRoot() { return mYoungerShadow; }
void SetInsertionPointChanged() { mInsertionPointChanged = true; }
void SetAssociatedBinding(nsXBLBinding* aBinding) { mAssociatedBinding = aBinding; }
- nsISupports* GetParentObject() const { return mPoolHost; }
-
- nsIContent* GetPoolHost() { return mPoolHost; }
- nsTArray<HTMLShadowElement*>& ShadowDescendants() { return mShadowDescendants; }
-
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
static bool IsPooledNode(nsIContent* aChild, nsIContent* aContainer,
nsIContent* aHost);
static ShadowRoot* FromNode(nsINode* aNode);
- static bool IsShadowInsertionPoint(nsIContent* aContent);
static void RemoveDestInsertionPoint(nsIContent* aInsertionPoint,
nsTArray<nsIContent*>& aDestInsertionPoints);
@@ -125,7 +99,6 @@ public:
void GetInnerHTML(nsAString& aInnerHTML);
void SetInnerHTML(const nsAString& aInnerHTML, ErrorResult& aError);
Element* Host();
- ShadowRoot* GetOlderShadowRoot() { return mOlderShadow; }
void StyleSheetChanged();
bool IsComposedDocParticipant() { return mIsComposedDocParticipant; }
@@ -134,14 +107,9 @@ public:
mIsComposedDocParticipant = aIsComposedDocParticipant;
}
- virtual void DestroyContent() override;
protected:
virtual ~ShadowRoot();
- // The pool host is the parent of the nodes that will be distributed
- // into the insertion points in this ShadowRoot. See |ChangeShadowRoot|.
- nsCOMPtr<nsIContent> mPoolHost;
-
// An array of content insertion points that are a descendant of the ShadowRoot
// sorted in tree order. Insertion points are responsible for notifying
// the ShadowRoot when they are removed or added as a descendant. The insertion
@@ -149,10 +117,6 @@ protected:
// by the array.
nsTArray<HTMLContentElement*> mInsertionPoints;
- // An array of the <shadow> elements that are descendant of the ShadowRoot
- // sorted in tree order. Only the first may be a shadow insertion point.
- nsTArray<HTMLShadowElement*> mShadowDescendants;
-
nsTHashtable<nsIdentifierMapEntry> mIdentifierMap;
nsXBLPrototypeBinding* mProtoBinding;
@@ -163,17 +127,6 @@ protected:
RefPtr<ShadowRootStyleSheetList> mStyleSheetList;
- // The current shadow insertion point of this ShadowRoot.
- HTMLShadowElement* mShadowElement;
-
- // The ShadowRoot that was created by the host element before
- // this ShadowRoot was created.
- RefPtr<ShadowRoot> mOlderShadow;
-
- // The ShadowRoot that was created by the host element after
- // this ShadowRoot was created.
- RefPtr<ShadowRoot> mYoungerShadow;
-
// A boolean that indicates that an insertion point was added or removed
// from this ShadowRoot and that the nodes need to be redistributed into
// the insertion points. After this flag is set, nodes will be distributed