mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-24 16:17:29 +09:00
parent
d9112daf48
commit
7e48e4407c
8 changed files with 0 additions and 168 deletions
|
|
@ -1208,83 +1208,6 @@ Element::AttachShadowInternal(bool aClosed, ErrorResult& aError)
|
||||||
return shadowRoot.forget();
|
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
|
void
|
||||||
Element::GetAttribute(const nsAString& aName, DOMString& aReturn)
|
Element::GetAttribute(const nsAString& aName, DOMString& aReturn)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,6 @@ class CustomElementRegistry;
|
||||||
class Link;
|
class Link;
|
||||||
class DOMRect;
|
class DOMRect;
|
||||||
class DOMRectList;
|
class DOMRectList;
|
||||||
class DestinationInsertionPointList;
|
|
||||||
class Grid;
|
class Grid;
|
||||||
|
|
||||||
// IID for the dom::Element interface
|
// IID for the dom::Element interface
|
||||||
|
|
@ -933,7 +932,6 @@ public:
|
||||||
|
|
||||||
// [deprecated] Shadow DOM v0
|
// [deprecated] Shadow DOM v0
|
||||||
already_AddRefed<ShadowRoot> CreateShadowRoot(ErrorResult& aError);
|
already_AddRefed<ShadowRoot> CreateShadowRoot(ErrorResult& aError);
|
||||||
already_AddRefed<DestinationInsertionPointList> GetDestinationInsertionPoints();
|
|
||||||
|
|
||||||
ShadowRoot *FastGetShadowRoot() const
|
ShadowRoot *FastGetShadowRoot() const
|
||||||
{
|
{
|
||||||
|
|
@ -1616,30 +1614,6 @@ private:
|
||||||
nsCOMPtr<nsIDocument> mDoc;
|
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)
|
NS_DEFINE_STATIC_IID_ACCESSOR(Element, NS_ELEMENT_IID)
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
|
|
|
||||||
|
|
@ -1131,23 +1131,6 @@ FragmentOrElement::SetShadowRoot(ShadowRoot* aShadowRoot)
|
||||||
slots->mShadowRoot = 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*
|
HTMLSlotElement*
|
||||||
FragmentOrElement::GetAssignedSlot() const
|
FragmentOrElement::GetAssignedSlot() const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -155,8 +155,6 @@ public:
|
||||||
virtual void SetXBLBinding(nsXBLBinding* aBinding,
|
virtual void SetXBLBinding(nsXBLBinding* aBinding,
|
||||||
nsBindingManager* aOldBindingManager = nullptr) override;
|
nsBindingManager* aOldBindingManager = nullptr) override;
|
||||||
virtual ShadowRoot *GetContainingShadow() const override;
|
virtual ShadowRoot *GetContainingShadow() const override;
|
||||||
virtual nsTArray<nsIContent*> &DestInsertionPoints() override;
|
|
||||||
virtual nsTArray<nsIContent*> *GetExistingDestInsertionPoints() const override;
|
|
||||||
virtual void SetShadowRoot(ShadowRoot* aBinding) override;
|
virtual void SetShadowRoot(ShadowRoot* aBinding) override;
|
||||||
virtual mozilla::dom::HTMLSlotElement* GetAssignedSlot() const override;
|
virtual mozilla::dom::HTMLSlotElement* GetAssignedSlot() const override;
|
||||||
virtual void SetAssignedSlot(mozilla::dom::HTMLSlotElement* aSlot) override;
|
virtual void SetAssignedSlot(mozilla::dom::HTMLSlotElement* aSlot) override;
|
||||||
|
|
@ -296,12 +294,6 @@ public:
|
||||||
*/
|
*/
|
||||||
RefPtr<ShadowRoot> mContainingShadow;
|
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.
|
* The assigned slot associated with this element.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -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*
|
HTMLSlotElement*
|
||||||
nsGenericDOMDataNode::GetAssignedSlot() const
|
nsGenericDOMDataNode::GetAssignedSlot() const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -160,8 +160,6 @@ public:
|
||||||
virtual void SetXBLBinding(nsXBLBinding* aBinding,
|
virtual void SetXBLBinding(nsXBLBinding* aBinding,
|
||||||
nsBindingManager* aOldBindingManager = nullptr) override;
|
nsBindingManager* aOldBindingManager = nullptr) override;
|
||||||
virtual mozilla::dom::ShadowRoot *GetContainingShadow() const 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 void SetShadowRoot(mozilla::dom::ShadowRoot* aShadowRoot) override;
|
||||||
virtual mozilla::dom::HTMLSlotElement* GetAssignedSlot() const override;
|
virtual mozilla::dom::HTMLSlotElement* GetAssignedSlot() const override;
|
||||||
virtual void SetAssignedSlot(mozilla::dom::HTMLSlotElement* aSlot) override;
|
virtual void SetAssignedSlot(mozilla::dom::HTMLSlotElement* aSlot) override;
|
||||||
|
|
@ -268,11 +266,6 @@ protected:
|
||||||
*/
|
*/
|
||||||
RefPtr<mozilla::dom::ShadowRoot> mContainingShadow;
|
RefPtr<mozilla::dom::ShadowRoot> mContainingShadow;
|
||||||
|
|
||||||
/**
|
|
||||||
* @see nsIContent::GetDestInsertionPoints
|
|
||||||
*/
|
|
||||||
nsTArray<nsIContent*> mDestInsertionPoints;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see nsIContent::GetAssignedSlot
|
* @see nsIContent::GetAssignedSlot
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -696,20 +696,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual mozilla::dom::ShadowRoot *GetContainingShadow() const = 0;
|
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.
|
* Gets the assigned slot associated with this content.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -248,8 +248,6 @@ partial interface Element {
|
||||||
// [deprecated] Shadow DOM v0
|
// [deprecated] Shadow DOM v0
|
||||||
[Throws, Pref="nsDocument::IsWebComponentsEnabled"]
|
[Throws, Pref="nsDocument::IsWebComponentsEnabled"]
|
||||||
ShadowRoot createShadowRoot();
|
ShadowRoot createShadowRoot();
|
||||||
[Pref="nsDocument::IsWebComponentsEnabled"]
|
|
||||||
NodeList getDestinationInsertionPoints();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Element implements ChildNode;
|
Element implements ChildNode;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue