summaryrefslogtreecommitdiffstats
path: root/dom/base/nsGenericDOMDataNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsGenericDOMDataNode.cpp')
-rw-r--r--dom/base/nsGenericDOMDataNode.cpp36
1 files changed, 13 insertions, 23 deletions
diff --git a/dom/base/nsGenericDOMDataNode.cpp b/dom/base/nsGenericDOMDataNode.cpp
index 0ae15e09e..6aedebcc1 100644
--- a/dom/base/nsGenericDOMDataNode.cpp
+++ b/dom/base/nsGenericDOMDataNode.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -15,6 +14,7 @@
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/Element.h"
+#include "mozilla/dom/HTMLSlotElement.h"
#include "mozilla/dom/ShadowRoot.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
@@ -736,21 +736,18 @@ nsGenericDOMDataNode::SetShadowRoot(ShadowRoot* aShadowRoot)
{
}
-nsTArray<nsIContent*>&
-nsGenericDOMDataNode::DestInsertionPoints()
+HTMLSlotElement*
+nsGenericDOMDataNode::GetAssignedSlot() const
{
- nsDataSlots *slots = DataSlots();
- return slots->mDestInsertionPoints;
+ nsDataSlots *slots = GetExistingDataSlots();
+ return slots ? slots->mAssignedSlot.get() : nullptr;
}
-nsTArray<nsIContent*>*
-nsGenericDOMDataNode::GetExistingDestInsertionPoints() const
+void
+nsGenericDOMDataNode::SetAssignedSlot(HTMLSlotElement* aSlot)
{
- nsDataSlots *slots = GetExistingDataSlots();
- if (slots) {
- return &slots->mDestInsertionPoints;
- }
- return nullptr;
+ nsDataSlots *slots = DataSlots();
+ slots->mAssignedSlot = aSlot;
}
nsXBLBinding *
@@ -793,17 +790,6 @@ nsGenericDOMDataNode::SetXBLInsertionParent(nsIContent* aContent)
}
}
-CustomElementData *
-nsGenericDOMDataNode::GetCustomElementData() const
-{
- return nullptr;
-}
-
-void
-nsGenericDOMDataNode::SetCustomElementData(CustomElementData* aData)
-{
-}
-
bool
nsGenericDOMDataNode::IsNodeOfType(uint32_t aFlags) const
{
@@ -854,6 +840,9 @@ nsGenericDOMDataNode::nsDataSlots::Traverse(nsCycleCollectionTraversalCallback &
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mSlots->mContainingShadow");
cb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIContent*, mContainingShadow));
+
+ NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mSlots->mAssignedSlot");
+ cb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIContent*, mAssignedSlot.get()));
}
void
@@ -861,6 +850,7 @@ nsGenericDOMDataNode::nsDataSlots::Unlink()
{
mXBLInsertionParent = nullptr;
mContainingShadow = nullptr;
+ mAssignedSlot = nullptr;
}
//----------------------------------------------------------------------