summaryrefslogtreecommitdiffstats
path: root/dom/base/ShadowRoot.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 07:04:42 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 07:04:42 -0400
commit873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806 (patch)
tree11bf691b4aed8b1a0834bdc7b7c1bc4eda739713 /dom/base/ShadowRoot.cpp
parent96dfc63bc583454fb895c7a23f685995f5410388 (diff)
downloadUXP-873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806.tar
UXP-873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806.tar.gz
UXP-873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806.tar.lz
UXP-873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806.tar.xz
UXP-873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806.zip
Bug 1404842 - Implement Element.attachShadow and Element.slot
Tag #1375
Diffstat (limited to 'dom/base/ShadowRoot.cpp')
-rw-r--r--dom/base/ShadowRoot.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/dom/base/ShadowRoot.cpp b/dom/base/ShadowRoot.cpp
index 5f61b1f4d..e00bb69d8 100644
--- a/dom/base/ShadowRoot.cpp
+++ b/dom/base/ShadowRoot.cpp
@@ -51,7 +51,7 @@ NS_INTERFACE_MAP_END_INHERITING(DocumentFragment)
NS_IMPL_ADDREF_INHERITED(ShadowRoot, DocumentFragment)
NS_IMPL_RELEASE_INHERITED(ShadowRoot, DocumentFragment)
-ShadowRoot::ShadowRoot(Element* aElement,
+ShadowRoot::ShadowRoot(Element* aElement, bool aClosed,
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
nsXBLPrototypeBinding* aProtoBinding)
: DocumentFragment(aNodeInfo)
@@ -60,6 +60,7 @@ ShadowRoot::ShadowRoot(Element* aElement,
, mIsComposedDocParticipant(false)
{
SetHost(aElement);
+ mMode = aClosed ? ShadowRootMode::Closed : ShadowRootMode::Open;
// Nodes in a shadow tree should never store a value
// in the subtree root pointer, nodes in the shadow tree