Skip to content

Commit d16d16c

Browse files
committed
[selectors] Make the absolutizing algo take into account when the scoping set is empty.
1 parent ca0d37e commit d16d16c

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

selectors/Overview.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,10 @@ <h4 id=absolutizing><span class=secno>3.3.1. </span> Absolutizing a
13741374
<a href="#scope-pseudo"><code>:scope</code></a> as the initial <a
13751375
href="#compound"><i>compound selector</i></a>.
13761376

1377+
<li> Otherwise, if the <a
1378+
href="#contextual-reference-element-set"><i>contextual reference element
1379+
set</i></a> is empty, the selector is already absolute.
1380+
13771381
<li> Otherwise, if the selector does not contain any instance of the <a
13781382
href="#scope-pseudo"><code>:scope</code></a> pseudo-class (either at the
13791383
top-level or as an argument to a functional pseudo-class), prepend <a

selectors/Overview.src.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,10 @@ <h4 id='absolutizing'>
693693
If the selector starts with a <i>combinator</i> other than the <i>descendant combinator</i>,
694694
prepend <code>:scope</code> as the initial <i>compound selector</i>.
695695

696+
<li>
697+
Otherwise, if the <i>contextual reference element set</i> is empty,
698+
the selector is already absolute.
699+
696700
<li>
697701
Otherwise, if the selector does not contain any instance of the <code>:scope</code> pseudo-class
698702
(either at the top-level or as an argument to a functional pseudo-class),

0 commit comments

Comments
 (0)