summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 07:37:07 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 07:37:07 -0400
commit53df3a74f46fa6b5d3778f9635a1afb7522c345f (patch)
treed14a398349b7e7dea85447d12eaffda02d2ed674 /dom
parentb93fb57514781ea406fb152cf46b502cffd272ff (diff)
downloadUXP-53df3a74f46fa6b5d3778f9635a1afb7522c345f.tar
UXP-53df3a74f46fa6b5d3778f9635a1afb7522c345f.tar.gz
UXP-53df3a74f46fa6b5d3778f9635a1afb7522c345f.tar.lz
UXP-53df3a74f46fa6b5d3778f9635a1afb7522c345f.tar.xz
UXP-53df3a74f46fa6b5d3778f9635a1afb7522c345f.zip
Bug 1426503 - Remove DestInsertionPoints stuff
Tag #1375
Diffstat (limited to 'dom')
-rw-r--r--dom/base/Element.cpp77
-rw-r--r--dom/base/Element.h26
-rw-r--r--dom/base/FragmentOrElement.cpp17
-rw-r--r--dom/base/FragmentOrElement.h8
-rw-r--r--dom/base/nsGenericDOMDataNode.cpp17
-rw-r--r--dom/base/nsGenericDOMDataNode.h7
-rw-r--r--dom/base/nsIContent.h14
-rw-r--r--dom/webidl/Element.webidl2
8 files changed, 0 insertions, 168 deletions
diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp
index f3c8a1129..8e9225a64 100644
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1208,83 +1208,6 @@ Element::AttachShadowInternal(bool aClosed, ErrorResult& aError)
return shadowRoot.forget();
}
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DestinationInsertionPointList, mParent,
- mDestinationPoints)
-
-NS_INTERFACE_TABLE_HEAD(DestinationInsertionPointList)
- NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
- NS_INTERFACE_TABLE(DestinationInsertionPointList, nsINodeList, nsIDOMNodeList)
- NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(DestinationInsertionPointList)
-NS_INTERFACE_MAP_END
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(DestinationInsertionPointList)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(DestinationInsertionPointList)
-
-DestinationInsertionPointList::DestinationInsertionPointList(Element* aElement)
- : mParent(aElement)
-{
- nsTArray<nsIContent*>* destPoints = aElement->GetExistingDestInsertionPoints();
- if (destPoints) {
- for (uint32_t i = 0; i < destPoints->Length(); i++) {
- mDestinationPoints.AppendElement(destPoints->ElementAt(i));
- }
- }
-}
-
-DestinationInsertionPointList::~DestinationInsertionPointList()
-{
-}
-
-nsIContent*
-DestinationInsertionPointList::Item(uint32_t aIndex)
-{
- return mDestinationPoints.SafeElementAt(aIndex);
-}
-
-NS_IMETHODIMP
-DestinationInsertionPointList::Item(uint32_t aIndex, nsIDOMNode** aReturn)
-{
- nsIContent* item = Item(aIndex);
- if (!item) {
- return NS_ERROR_FAILURE;
- }
-
- return CallQueryInterface(item, aReturn);
-}
-
-uint32_t
-DestinationInsertionPointList::Length() const
-{
- return mDestinationPoints.Length();
-}
-
-NS_IMETHODIMP
-DestinationInsertionPointList::GetLength(uint32_t* aLength)
-{
- *aLength = Length();
- return NS_OK;
-}
-
-int32_t
-DestinationInsertionPointList::IndexOf(nsIContent* aContent)
-{
- return mDestinationPoints.IndexOf(aContent);
-}
-
-JSObject*
-DestinationInsertionPointList::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-{
- return NodeListBinding::Wrap(aCx, this, aGivenProto);
-}
-
-already_AddRefed<DestinationInsertionPointList>
-Element::GetDestinationInsertionPoints()
-{
- RefPtr<DestinationInsertionPointList> list =
- new DestinationInsertionPointList(this);
- return list.forget();
-}
-
void
Element::GetAttribute(const nsAString& aName, DOMString& aReturn)
{
diff --git a/dom/base/Element.h b/dom/base/Element.h
index 23a9fee52..3d9b80a98 100644
--- a/dom/base/Element.h
+++ b/dom/base/Element.h
@@ -144,7 +144,6 @@ class CustomElementRegistry;
class Link;
class DOMRect;
class DOMRectList;
-class DestinationInsertionPointList;
class Grid;
// IID for the dom::Element interface
@@ -933,7 +932,6 @@ public:
// [deprecated] Shadow DOM v0
already_AddRefed<ShadowRoot> CreateShadowRoot(ErrorResult& aError);
- already_AddRefed<DestinationInsertionPointList> GetDestinationInsertionPoints();
ShadowRoot *FastGetShadowRoot() const
{
@@ -1616,30 +1614,6 @@ private:
nsCOMPtr<nsIDocument> mDoc;
};
-class DestinationInsertionPointList : public nsINodeList
-{
-public:
- explicit DestinationInsertionPointList(Element* aElement);
-
- NS_DECL_CYCLE_COLLECTING_ISUPPORTS
- NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DestinationInsertionPointList)
-
- // nsIDOMNodeList
- NS_DECL_NSIDOMNODELIST
-
- // nsINodeList
- virtual nsIContent* Item(uint32_t aIndex) override;
- virtual int32_t IndexOf(nsIContent* aContent) override;
- virtual nsINode* GetParentObject() override { return mParent; }
- virtual uint32_t Length() const;
- virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
-protected:
- virtual ~DestinationInsertionPointList();
-
- RefPtr<Element> mParent;
- nsCOMArray<nsIContent> mDestinationPoints;
-};
-
NS_DEFINE_STATIC_IID_ACCESSOR(Element, NS_ELEMENT_IID)
inline bool
diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp
index 676665c09..6fbe04d25 100644
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -1131,23 +1131,6 @@ FragmentOrElement::SetShadowRoot(ShadowRoot* aShadowRoot)
slots->mShadowRoot = aShadowRoot;
}
-nsTArray<nsIContent*>&
-FragmentOrElement::DestInsertionPoints()
-{
- nsExtendedDOMSlots* slots = ExtendedDOMSlots();
- return slots->mDestInsertionPoints;
-}
-
-nsTArray<nsIContent*>*
-FragmentOrElement::GetExistingDestInsertionPoints() const
-{
- nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots();
- if (slots) {
- return &slots->mDestInsertionPoints;
- }
- return nullptr;
-}
-
HTMLSlotElement*
FragmentOrElement::GetAssignedSlot() const
{
diff --git a/dom/base/FragmentOrElement.h b/dom/base/FragmentOrElement.h
index df05bcb50..f1fa046ee 100644
--- a/dom/base/FragmentOrElement.h
+++ b/dom/base/FragmentOrElement.h
@@ -155,8 +155,6 @@ public:
virtual void SetXBLBinding(nsXBLBinding* aBinding,
nsBindingManager* aOldBindingManager = nullptr) override;
virtual ShadowRoot *GetContainingShadow() const override;
- virtual nsTArray<nsIContent*> &DestInsertionPoints() override;
- virtual nsTArray<nsIContent*> *GetExistingDestInsertionPoints() const override;
virtual void SetShadowRoot(ShadowRoot* aBinding) override;
virtual mozilla::dom::HTMLSlotElement* GetAssignedSlot() const override;
virtual void SetAssignedSlot(mozilla::dom::HTMLSlotElement* aSlot) override;
@@ -297,12 +295,6 @@ public:
RefPtr<ShadowRoot> mContainingShadow;
/**
- * An array of web component insertion points to which this element
- * is distributed.
- */
- nsTArray<nsIContent*> mDestInsertionPoints;
-
- /**
* The assigned slot associated with this element.
*/
RefPtr<mozilla::dom::HTMLSlotElement> mAssignedSlot;
diff --git a/dom/base/nsGenericDOMDataNode.cpp b/dom/base/nsGenericDOMDataNode.cpp
index e5cc852d2..d23783368 100644
--- a/dom/base/nsGenericDOMDataNode.cpp
+++ b/dom/base/nsGenericDOMDataNode.cpp
@@ -737,23 +737,6 @@ nsGenericDOMDataNode::SetShadowRoot(ShadowRoot* aShadowRoot)
{
}
-nsTArray<nsIContent*>&
-nsGenericDOMDataNode::DestInsertionPoints()
-{
- nsDataSlots *slots = DataSlots();
- return slots->mDestInsertionPoints;
-}
-
-nsTArray<nsIContent*>*
-nsGenericDOMDataNode::GetExistingDestInsertionPoints() const
-{
- nsDataSlots *slots = GetExistingDataSlots();
- if (slots) {
- return &slots->mDestInsertionPoints;
- }
- return nullptr;
-}
-
HTMLSlotElement*
nsGenericDOMDataNode::GetAssignedSlot() const
{
diff --git a/dom/base/nsGenericDOMDataNode.h b/dom/base/nsGenericDOMDataNode.h
index 97bd79129..4d0114cb1 100644
--- a/dom/base/nsGenericDOMDataNode.h
+++ b/dom/base/nsGenericDOMDataNode.h
@@ -160,8 +160,6 @@ public:
virtual void SetXBLBinding(nsXBLBinding* aBinding,
nsBindingManager* aOldBindingManager = nullptr) override;
virtual mozilla::dom::ShadowRoot *GetContainingShadow() const override;
- virtual nsTArray<nsIContent*> &DestInsertionPoints() override;
- virtual nsTArray<nsIContent*> *GetExistingDestInsertionPoints() const override;
virtual void SetShadowRoot(mozilla::dom::ShadowRoot* aShadowRoot) override;
virtual mozilla::dom::HTMLSlotElement* GetAssignedSlot() const override;
virtual void SetAssignedSlot(mozilla::dom::HTMLSlotElement* aSlot) override;
@@ -269,11 +267,6 @@ protected:
RefPtr<mozilla::dom::ShadowRoot> mContainingShadow;
/**
- * @see nsIContent::GetDestInsertionPoints
- */
- nsTArray<nsIContent*> mDestInsertionPoints;
-
- /**
* @see nsIContent::GetAssignedSlot
*/
RefPtr<mozilla::dom::HTMLSlotElement> mAssignedSlot;
diff --git a/dom/base/nsIContent.h b/dom/base/nsIContent.h
index 975173656..ce0a4e596 100644
--- a/dom/base/nsIContent.h
+++ b/dom/base/nsIContent.h
@@ -697,20 +697,6 @@ public:
virtual mozilla::dom::ShadowRoot *GetContainingShadow() const = 0;
/**
- * Gets an array of destination insertion points where this content
- * is distributed by web component distribution algorithms.
- * The array is created if it does not already exist.
- */
- virtual nsTArray<nsIContent*> &DestInsertionPoints() = 0;
-
- /**
- * Same as DestInsertionPoints except that this method will return
- * null if the array of destination insertion points does not already
- * exist.
- */
- virtual nsTArray<nsIContent*> *GetExistingDestInsertionPoints() const = 0;
-
- /**
* Gets the assigned slot associated with this content.
*
* @return The assigned slot element or null.
diff --git a/dom/webidl/Element.webidl b/dom/webidl/Element.webidl
index f6d0f7f93..2f7e934b8 100644
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -248,8 +248,6 @@ partial interface Element {
// [deprecated] Shadow DOM v0
[Throws, Pref="nsDocument::IsWebComponentsEnabled"]
ShadowRoot createShadowRoot();
- [Pref="nsDocument::IsWebComponentsEnabled"]
- NodeList getDestinationInsertionPoints();
};
Element implements ChildNode;