From 51f3b9373bc510b68c75dd27946f04abfe6bb7ec Mon Sep 17 00:00:00 2001
From: Yu Han
If the open flag is set and shadow's mode is
not "open
", then return null.
If the shadow's slot assignment is set to "manual
",
+ return the associated slot in shadow where the slottable is
+ assigned
,
+ otherwise return null.
Return the first slot in tree order in shadow's descendants whose name is slottable's name, if any, and null otherwise.
{{ShadowRoot}} nodes are simply known as @@ -5731,6 +5738,9 @@ It is initially set to false.
+Shadow roots have an associated slot assignment
+("manual
" or "auto
"). It is default to "auto
"
A shadow root's get the parent algorithm, given an event, returns
null if event's composed flag is unset and shadow root is the
root of event's path's first struct's
@@ -5748,6 +5758,9 @@ null if event's composed flag is unset and shadow roo
onslotchange
event handler, whose
event handler event type is {{HTMLSlotElement/slotchange}}.
+
The slotAssignment
attribute's getter must
+return this's slot assignment.
In shadow-including tree order is @@ -5871,6 +5884,7 @@ interface Element : Node { dictionary ShadowRootInit { required ShadowRootMode mode; boolean delegatesFocus = false; + SlotAssignmentMode slotAssignment = "auto"; }; @@ -6744,6 +6758,9 @@ invoked, must run these steps:
Set shadow's delegates focus to init's {{ShadowRootInit/delegatesFocus}}. +
Set shadow's slot assignment to init's + {{ShadowRootInit/slotAssignment}}. +
Set this's shadow root to shadow.
Return shadow.
@@ -10187,7 +10204,8 @@ Xidorn Quan,
Yehuda Katz,
Yoav Weiss,
Yoichi Osato,
-Yoshinori Sano, and
+Yoshinori Sano,
+Yu Han, and
Zack Weinberg
for being awesome!
From bc401e18deb5c0c0237aa5a01bb6fadadadf9735 Mon Sep 17 00:00:00 2001
From: Yu Han
Shadow roots have an associated slot assignment
-("manual
" or "auto
"). It is default to "auto
"
manual
" or "auto
"), whose default value is "auto
"
A shadow root's get the parent algorithm, given an event, returns
null if event's composed flag is unset and shadow root is the
From c62252eaee84577f28c5d1c93860b5e7a1501116 Mon Sep 17 00:00:00 2001
From: Yu Han
If the open flag is set and shadow's mode is
not "open
", then return null.
If the shadow's slot assignment is set to "manual
",
- return the associated slot in shadow where the slottable is
- assigned
,
- otherwise return null.
If the shadow's slot assignment is set to "manual
", then:
Let manuallyAssignedNodes be nodes that are
+ assigned
+ to a slot in shadow's descendants.
If nodeSlotMap doesn't exists, let nodeSlotMap be an empty map.
For each node in manuallyAssignedNodes, set nodeSlotMap[node] + to slot.
Set manuallyAssignedNodes to empty list.
If nodeSlotMap[slottable] exists, then return nodeSlotMap[slottable].
Return null.
Return the first slot in tree order in shadow's descendants whose name is slottable's @@ -5716,9 +5730,9 @@ invoked, must return a new {{DocumentFragment}} node whose no [Exposed=Window] interface ShadowRoot : DocumentFragment { readonly attribute ShadowRootMode mode; + readonly attribute SlotAssignmentMode slotAssignment; readonly attribute Element host; attribute EventHandler onslotchange; - readonly attribute SlotAssignmentMode slotAssignment; }; enum ShadowRootMode { "open", "closed" }; @@ -5739,7 +5753,7 @@ It is initially set to false.
consequences for innerHTML. -->Shadow roots have an associated slot assignment
-("manual
" or "auto
"), whose default value is "auto
"
manual
" or "auto
"), whose default value is "auto
".
A shadow root's get the parent algorithm, given an event, returns
null if event's composed flag is unset and shadow root is the
From 4998818363afe60efe93ebd6672d5c1db07ee1c2 Mon Sep 17 00:00:00 2001
From: Yu Han
If the open flag is set and shadow's mode is
not "open
", then return null.
If the shadow's slot assignment is set to "manual
", then:
Let manuallyAssignedNodes be nodes that are
- assigned
- to a slot in shadow's descendants.
If nodeSlotMap doesn't exists, let nodeSlotMap be an empty map.
For each node in manuallyAssignedNodes, set nodeSlotMap[node] - to slot.
Set manuallyAssignedNodes to empty list.
If nodeSlotMap[slottable] exists, then return nodeSlotMap[slottable].
Return null.
If the shadow's slot assignment is set to "manual
",
+ return the associated slot in shadow's tree whose manuallyAssignedNodes includes
+ slottable, if any, and null otherwise.
Return the first slot in tree order in shadow's
descendants whose name is slottable's
From d09a9781dd1ddd8af173a9e90a8ff1609af99054 Mon Sep 17 00:00:00 2001
From: Yu Han
open
", then return null.If the shadow's slot assignment is set to "manual
",
- return the associated slot in shadow's tree whose manuallyAssignedNodes includes
- slottable, if any, and null otherwise.
Return the first slot in tree order in shadow's descendants whose name is slottable's @@ -5738,7 +5738,7 @@ It is initially set to false.
consequences for innerHTML. -->Shadow roots have an associated slot assignment
-("manual
" or "auto
"), whose default value is "auto
".
manual
" or "auto
").
A shadow root's get the parent algorithm, given an event, returns
null if event's composed flag is unset and shadow root is the
From d07a8437dbc8168ec9fea3f0ea20059aa315f00c Mon Sep 17 00:00:00 2001
From: yuzhehan <57230755+yuzhe-han@users.noreply.github.com>
Date: Wed, 17 Jun 2020 06:19:14 -0700
Subject: [PATCH 06/15] Update dom.bs
Co-authored-by: Anne van Kesteren
open
", then return null.If the shadow's slot assignment is set to "manual
",
- return the slot in shadow's descendants whose manuallyAssignedNodes
+ return the slot in shadow's descendants whose manuallyAssignedNodes
includes slottable, if any, and null otherwise.
Return the first slot in tree order in shadow's
From eed81d32cfc766968fc6f457426149e9189b9d08 Mon Sep 17 00:00:00 2001
From: yuzhehan <57230755+yuzhe-han@users.noreply.github.com>
Date: Wed, 17 Jun 2020 06:19:51 -0700
Subject: [PATCH 07/15] Update dom.bs
Co-authored-by: Anne van Kesteren
If the open flag is set and shadow's mode is
not "open
", then return null.
If the shadow's slot assignment is set to "manual
",
+
If shadow's slot assignment is set to "manual
",
return the slot in shadow's descendants whose manuallyAssignedNodes
includes slottable, if any, and null otherwise.
open
", then return null.
If shadow's slot assignment is set to "manual
",
- return the slot in shadow's descendants whose manuallyAssignedNodes
+ return the slot in shadow's descendants whose manually assigned nodes
includes slottable, if any, and null otherwise.
Return the first slot in tree order in shadow's @@ -2284,6 +2284,10 @@ run these steps:
Set slot's assigned nodes to slottables. +
If slot's root is a shadow root and its
+ slot assignment is "manual
", then set slot's
+ manually assigned nodes to slottables.
+
For each slottable in slottables, set slottable's
assigned slot to slot.
From 3ab244d871f9cdd4579fd28a26ccdd03e11ec140 Mon Sep 17 00:00:00 2001
From: Yu Han Set slot's assigned nodes to slottables.
- If slot's root is a shadow root and its
- slot assignment is " For each slottable in slottables, set slottable's
assigned slot to slot.
From ae51d53dfa8e17d615f62b3c428a51fa551de580 Mon Sep 17 00:00:00 2001
From: Yu Han Otherwise, insert node into parent's
children before child's index.
- If parent is a shadow host and node is a
+ If parent is a shadow host with its root's
+ slot assignment set to " If parent's root is a shadow root, and
parent is a slot whose assigned nodes is the empty list,
then run signal a slot change for parent.
- Run assign slottables for a tree with node's root.
+ If node's root is a shadow root with its root's
+ slot assignment set to " For each shadow-including inclusive descendant inclusiveDescendant of
@@ -2671,8 +2674,16 @@ indicated in the remove algorithm below.
If node is assigned, then run assign slottables for
- node's assigned slot.
+ If node is assigned, then:
+
+ If parent's root is a shadow root with its
+ root's slot assignment set to " Run assign slottables for node's assigned slot.
+ If parent's root is a shadow root, and
parent is a slot whose assigned nodes is the empty list,
@@ -2682,6 +2693,11 @@ indicated in the remove algorithm below.
If node has an inclusive descendant that is a slot, then:
for each slot slot in node's inclusive descendants,
+ if slot's root is a shadow root with its root's
+ slot assignment set to " Run assign slottables for a tree with parent's root.
Run assign slottables for a tree with node.
From adf8f6411b360fe006a07f7b88bf39e8c5cff170 Mon Sep 17 00:00:00 2001
From: Yu Han If node's root is a shadow root with its root's
- slot assignment set to " Run assign slottables for a tree with node's root.
For each shadow-including inclusive descendant inclusiveDescendant of
From 26b8b9928797f24e5d64256234fbbd39c34b2175 Mon Sep 17 00:00:00 2001
From: Yu Han If shadow's slot assignment is set to " Return the first slot in tree order in shadow's
descendants whose name is slottable's
@@ -2676,7 +2676,7 @@ indicated in the remove algorithm below.
If node is assigned, then:
If parent's root is a shadow root with its
+ If parent's root is a shadow root with its
root's slot assignment set to " If parent's root is a shadow root with its
- root's slot assignment set to " Run assign slottables for node's assigned slot.
From 31ab4801e99ef45bdeb8fcd409eecd65fddb338c Mon Sep 17 00:00:00 2001
From: Yu Han If the open flag is set and shadow's mode is
not " If shadow's slot assignment is set to " If shadow's slot assignment is " Otherwise, insert node into parent's
children before child's index.
- If parent is a shadow host with its root's
- slot assignment set to " If parent is a shadow host whose shadow root's
+ slot assignment is " If parent's root is a shadow root, and
@@ -2666,8 +2666,8 @@ indicated in the remove algorithm below.
If node is assigned, then:
If parent's root is a shadow root with its
- root's slot assignment set to " If parent's root is a shadow root whose
+ root's slot assignment is " Run assign slottables for node's assigned slot.
@@ -2682,9 +2682,9 @@ indicated in the remove algorithm below.
for each slot slot in node's inclusive descendants,
- if slot's root is a shadow root with its root's
- slot assignment set to " Run assign slottables for a tree with parent's root.
From 49ce9861f326c9e4337338316bc1e8d29a2495a9 Mon Sep 17 00:00:00 2001
From: Yu Han For each slottable child of host, slottable, in
+ If slot's shadow root's slot assignment is " Set result to slot's manually assigned nodes. Otherwise, for each slottable child of host, slottable, in
tree order: If parent is a shadow host whose shadow root's
- slot assignment is " If parent's root is a shadow root, and
@@ -5717,7 +5726,7 @@ interface ShadowRoot : DocumentFragment {
};
enum ShadowRootMode { "open", "closed" };
-enum SlotAssignmentMode { "manual", "auto" };
+enum SlotAssignmentMode { "manual", "name" };
{{ShadowRoot}} nodes are simply known as
@@ -5737,7 +5746,7 @@ It is initially set to false. Shadow roots have an associated slot assignment
-("manual
", then set slot's
- manually assigned nodes to slottables.
-
auto
" and node is a
slottable, then assign a slot for node.
auto
", then run assign slottables for a tree
+ with node's root.
+
auto
",
+ then remove node from its assigned slot's manually assigned nodes.
+
+
+
manual
", then set slot's
+ manually assigned nodes to an empty list.
+
auto
", then run assign slottables for a tree
- with node's root.
+ open
", then return null.manual
",
- return the slot in shadow's descendants whose manually assigned nodes
- includes slottable, if any, and null otherwise.
-
auto
",
then remove node from its assigned slot's manually assigned nodes.
From 901506d2d0739ba13da31bfe3a809ddfc172da23 Mon Sep 17 00:00:00 2001
From: Yu Han
auto
",
+ root's slot assignment set to "manual
",
then remove node from its assigned slot's manually assigned nodes.
open
", then return null.manual
",
+ manual
",
then return the slot in shadow's descendants whose manually assigned nodes
contains slottable, if any, and null otherwise.auto
" and node is a
+ auto
" and node is a
slottable, then assign a slot for node.
-
manual
",
+ manual
",
then remove node from its assigned slot's manually assigned nodes.
manual
", then set slot's
- manually assigned nodes to an empty list.
+ if slot's root is a shadow root whose root's
+ slot assignment is "manual
", then set slot's
+ manually assigned nodes to an empty set.
manual
",
+ then:
+
+
@@ -2437,7 +2446,7 @@ before a child, with an optional suppress observers flag, run
children before child's index.
auto
" and node is a
+ slot assignment is "name
" and node is a
slottable, then assign a slot for node.
manual
" or "auto
").manual
" or "name
").
A shadow root's get the parent algorithm, given an event, returns null if event's composed flag is unset and shadow root is the @@ -5882,7 +5891,7 @@ interface Element : Node { dictionary ShadowRootInit { required ShadowRootMode mode; boolean delegatesFocus = false; - SlotAssignmentMode slotAssignment = "auto"; + SlotAssignmentMode slotAssignment = "name"; };