Skip to content

Commit 2282086

Browse files
author
Simon Pieters
committed
[cssom] Make removing a rule or style sheet null the parents.
1 parent 4f752da commit 2282086

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

cssom/Overview.src.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,8 @@ <h3>CSS Style Sheet Collections</h3>
987987
<ol>
988988
<li><p>Remove the <span>CSS style sheet</span> from the list of <span>document CSS style sheets</span>.
989989

990-
<li><p>Set the <span>CSS style sheet</span>'s <span title=concept-css-style-sheet-owner-node>owner node</span> to null.
990+
<li><p>Set the <span>CSS style sheet</span>'s <span title=concept-css-style-sheet-parent-css-style-sheet>parent CSS style sheet</span>,
991+
<span title=concept-css-style-sheet-owner-node>owner node</span> and <span title=concept-css-style-sheet-owner-css-rule>owner CSS rule</span> to null.
991992

992993
<!-- "associated CSS style sheet" is defined in terms of owner node, so we don't need to set it to null explicitly -->
993994

@@ -1621,24 +1622,23 @@ <h3>CSS Rules</h3>
16211622
<dl>
16221623
<dt><dfn title=concept-css-rule-type>type</dfn></dt>
16231624
<dd><p>A non-negative integer associated with a particular type of rule.
1624-
This item is initialized when a rule is created and must never change.</p></dd>
1625+
This item is initialized when a rule is created and cannot change.</p></dd>
16251626

16261627
<dt><dfn title=concept-css-rule-text>text</dfn></dt>
16271628
<dd><p>A text representation of the rule suitable for direct use in a style sheet.
1628-
This item is initialized when a rule is created, and may change over the lifetime of the rule.</p></dd>
1629+
This item is initialized when a rule is created and can be changed.</p></dd>
16291630

16301631
<dt><dfn title=concept-css-rule-parent-css-rule>parent CSS rule</dfn></dt>
16311632
<dd><p>A reference to an enclosing <span>CSS rule</span> or null.
1632-
If the rule has an enclosing rule when it is created, then this item is initialized to the enclosing rule; otherwise it is null.
1633-
Subsequent to initialization, this item is reset to null if the rule becomes non-enclosed. Once reset to null, it must never change.</p></dd>
1633+
If the rule has an enclosing rule when it is created, then this item is initialized to the enclosing rule; otherwise it is null. It can be changed to
1634+
null.</p></dd>
16341635

16351636
<dt><dfn title=concept-css-rule-parent-css-style-sheet>parent CSS style sheet</dfn></dt>
16361637
<dd><p>A reference to a parent <span>CSS style sheet</span> or null.
1637-
This item is initialized to reference an associated style sheet when the rule is created. Subsequent to initialization, this item
1638-
is reset to null if the rule becomes disassociated from its initial style sheet. Once reset to null, it must never change.</p></dd>
1638+
This item is initialized to reference an associated style sheet when the rule is created. It can be changed to null.</p></dd>
16391639

16401640
<dt><dfn title=concept-css-rule-child-css-rules>child CSS rules</dfn>
1641-
<dd><p>A list of child <span title="CSS rule">CSS rules</span>.
1641+
<dd><p>A list of child <span title="CSS rule">CSS rules</span>. The list can be mutated.
16421642
</dl>
16431643

16441644
<p>In addition to the above state, each <span>CSS rule</span> may be associated
@@ -1745,6 +1745,8 @@ <h3>CSS Rules</h3>
17451745
<code title>@charset</code> at-rules, <code title>@import</code> at-rules, and <code title>@namespace</code> at-rules,
17461746
<span data-anolis-spec='dom' title='concept-throw'>throw</span> an <code data-anolis-spec=dom>InvalidStateError</code> exception.
17471747
<li><p>Remove rule <var>old rule</var> from <var>list</var> at the zero-indexed position <var>index</var>.<p></li>
1748+
<li><p>Set <var>old rule</var>'s <span title=concept-css-rule-parent-css-rule>parent CSS rule</span> and
1749+
<span title=concept-css-rule-parent-css-style-sheet>parent CSS style sheet</span> to null.
17481750
</ol>
17491751

17501752

0 commit comments

Comments
 (0)