summaryrefslogtreecommitdiff
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
commitad74b1ce285012bdca847a5358317b1dde97cd9f (patch)
tree11bf691b4aed8b1a0834bdc7b7c1bc4eda739713 /dom/base/ShadowRoot.cpp
parent7127db7fe1a899b58ebde0c53be7e3d709dbed60 (diff)
downloadaura-central-ad74b1ce285012bdca847a5358317b1dde97cd9f.tar.gz
Bug 1404842 - Implement Element.attachShadow and Element.slot
Tag mcp-graveyard/UXP%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