Skip to content

Commit f150645

Browse files
committed
fix selectorText linking
1 parent a5dfeb8 commit f150645

2 files changed

Lines changed: 78 additions & 92 deletions

File tree

cssom/Overview.html

Lines changed: 45 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
<div class=head>
3030
<h1 id=cssom>Cascading Style Sheets Object Model (<abbr>CSSOM</abbr>)</h1>
3131

32-
<h2 class="no-num no-toc" id="">Editor's Draft 27 December 2007</h2>
32+
<h2 class="no-num no-toc" id="">Editor's Draft 28 December 2007</h2>
3333

3434
<dl>
3535
<dt>This version:
3636

3737
<dd><a
3838
href="http://dev.w3.org/csswg/cssom/">http://dev.w3.org/csswg/cssom/</a></dd>
39-
<!--<dd><a href="http://www.w3.org/TR/2007/ED-cssom-20071227/">http://www.w3.org/TR/2007/WD-cssom-20071227/</a></dd>-->
39+
<!--<dd><a href="http://www.w3.org/TR/2007/ED-cssom-20071228/">http://www.w3.org/TR/2007/WD-cssom-20071228/</a></dd>-->
4040

4141
<dt>Latest version:
4242

@@ -407,7 +407,9 @@ <h3 id=style0><span class=secno>3.1. </span>Style Sheet</h3>
407407
href="#style-sheet" title="style sheet">style sheets</a> with the <a
408408
href="#style-sheet-alternate-flag">style sheet alternate flag</a> set to
409409
<i>true</i> and the <a href="#style-sheet-title">style sheet title</a> set
410-
to the empty string.
410+
to the empty string. In addition they <em class=ct>must not</em> allow the
411+
creation of <a href="#style-sheet" title="style sheet">style sheets</a>
412+
for which the user agent does not support the style sheet language.
411413

412414
<h4 id=the-stylesheet><span class=secno>3.1.1. </span>The <code
413415
title="">StyleSheet</code> Interface</h4>
@@ -1301,9 +1303,10 @@ <h5 id=examples0><span class=secno>4.1.1.1. </span>Examples of the CSS
13011303

13021304
<h4 id=selectors><span class=secno>4.1.2. </span>Selectors Rules</h4>
13031305

1304-
<p>The rules for <dfn id=parsing1 title=selectors-parsing>parsing a group
1305-
of selectors</dfn> are as given in the following algorithm. The return
1306-
value is either a group of selectors or "null" (if parsing failed).
1306+
<p>The rules for <dfn id=selectors-parsing title="selectors
1307+
parsing">parsing a group of selectors</dfn> are as given in the following
1308+
algorithm. The return value is either a group of selectors or "null" (if
1309+
parsing failed).
13071310

13081311
<ol>
13091312
<li>Parse the value using the <code>selectors_group</code> production. If
@@ -1313,7 +1316,7 @@ <h4 id=selectors><span class=secno>4.1.2. </span>Selectors Rules</h4>
13131316
<p>The aforementioned production is defined in the Selectors specification.
13141317
[Selectors]
13151318

1316-
<p>The rules for <dfn id=serializing0 title="selectors
1319+
<p>The rules for <dfn id=selectors-serializing title="selectors
13171320
serializing">serializing a group of selectors</dfn> are as given in the
13181321
following algorithm. The input is a a non-normalized group of selectors
13191322
and the output is a normalized group of selectors.
@@ -1347,10 +1350,11 @@ <h4 id=selectors><span class=secno>4.1.2. </span>Selectors Rules</h4>
13471350

13481351
<h4 id=css-page><span class=secno>4.1.3. </span>CSS Page Selectors Rules</h4>
13491352

1350-
<p class=issue>Need to define the rules for <dfn id=parsing2 title="CSS
1351-
page selector parsing">parsing a CSS page selector</dfn> and <dfn
1352-
id=serializing1 title="CSS page selector serializing">serializing a CSS
1353-
page selector</dfn>.
1353+
<p class=issue>Need to define the rules for <dfn
1354+
id=css-page-selectors-parsing title="CSS page selectors parsing">parsing a
1355+
CSS page selector</dfn> and <dfn id=css-page-selectors-serializing
1356+
title="CSS page selectors serializing">serializing a CSS page
1357+
selector</dfn>.
13541358

13551359
<h4 id=processing><span class=secno>4.1.4. </span>Processing CSS Statements</h4>
13561360

@@ -1487,7 +1491,8 @@ <h3 id=the-cssrulelist><span class=secno>4.3. </span>The <code
14871491
title="">CSSRuleList</code> Interface</h3>
14881492

14891493
<p>The <code><a href="#cssrulelist">CSSRuleList</a></code> object
1490-
represents an (ordered) list of statements.
1494+
represents an ordered collection of CSS statements.</p>
1495+
<!-- starting at 0 -->
14911496

14921497
<pre class=idl>interface <dfn id=cssrulelist>CSSRuleList</dfn> {
14931498
readonly attribute unsigned long <a href="#cssrulelist-length" title=cssrulelist-length>length</a>;
@@ -1506,7 +1511,7 @@ <h3 id=the-cssrulelist><span class=secno>4.3. </span>The <code
15061511
this method <em class=ct>must</em> return <code>null</code>. Otherwise,
15071512
this method <em class=ct>must</em> return the <code><a
15081513
href="#cssrule">CSSRule</a></code> in the list given by <var
1509-
title="">index</var>. <!-- negative numbers -->
1514+
title="">index</var>. <!-- XXX negative numbers -->
15101515

15111516
<h3 id=interfaces><span class=secno>4.4. </span>Interfaces for CSS
15121517
Statements</h3>
@@ -1517,8 +1522,9 @@ <h3 id=interfaces><span class=secno>4.4. </span>Interfaces for CSS
15171522
<h4 id=the-cssrule><span class=secno>4.4.1. </span>The <code
15181523
title="">CSSRule</code> Interface</h4>
15191524

1520-
<p>The <code><a href="#cssrule">CSSRule</a></code> interface is the base
1521-
interface from which all other CSS statement interfaces inherit.
1525+
<p>The <code><a href="#cssrule">CSSRule</a></code> interface a base
1526+
interface. Each specific CSS statement has an interface which inherits
1527+
from this one.
15221528

15231529
<pre class=idl>interface <dfn id=cssrule>CSSRule</dfn> {
15241530
// CSS statement type
@@ -1537,26 +1543,27 @@ <h4 id=the-cssrule><span class=secno>4.4.1. </span>The <code
15371543
readonly attribute <a href="#cssrule">CSSRule</a> <a href="#cssrule-parentrule" title=cssrule-parentrule>parentRule</a>;
15381544
readonly attribute <a href="#cssstylesheet">CSSStyleSheet</a> <a href="#cssrule-parentstylesheet" title=cssrule-parentstylesheet>parentStyleSheet</a>;
15391545
};</pre>
1546+
<!-- 0 is CSSUnknownRule and 2 is CSSCharsetRule, both dropped -->
15401547

15411548
<p>The <dfn id=cssrule-type title=cssrule-type><code>type</code></dfn>
15421549
attribute, on getting, <em class=ct>must</em> return the CSS statement
15431550
type as detailed for each specific type.
15441551

15451552
<p>The <dfn id=cssrule-csstext
1546-
title=cssrule-csstext><code>cssText</code></dfn> attribute allows for
1547-
replacing a CSS statement or getting a textual representation. On setting,
1548-
user agents <em class=ct>must</em> <a href="#replacing">replace a
1549-
statement</a> where <var>rule</var> is the value being set and <var>old
1550-
object</var> is the object of which this attribute is set.
1553+
title=cssrule-csstext><code>cssText</code></dfn> attribute, on setting,
1554+
<em class=ct>must</em> <a href="#replacing">replace a statement</a> where
1555+
<var>rule</var> is the value being set and <var>old object</var> is the
1556+
object of which this attribute is set.
15511557

15521558
<p>On getting the <code title=cssrule-csstext><a
15531559
href="#cssrule-csstext">cssText</a></code> attribute, <span
1554-
class=issue>...</span>.
1560+
class=issue>...</span>.</p>
1561+
<!-- XXX the serialization depends on the type -->
15551562

15561563
<p>The <dfn id=cssrule-parentrule
15571564
title=cssrule-parentrule><code>parentRule</code></dfn> attribute <em
15581565
class=ct>must</em> return the nearest enclosing rule of the current rule
1559-
or <code>null</code> if there is no enclosing rule. For example, an <code
1566+
or <code>null</code>, if there is no enclosing rule. For example, an <code
15601567
title="">@media</code> block enclosing the current rule.
15611568

15621569
<p>The <dfn id=cssrule-parentstylesheet
@@ -1604,20 +1611,14 @@ <h4 id=the-cssstylerule><span class=secno>4.4.2. </span>The <code
16041611
};</pre>
16051612

16061613
<p>The <dfn id=cssstylerule-selectortext
1607-
title=cssstylerule-selectortext><code>selectorText</code></dfn> attribute
1608-
allows for manipulation of the associated group of selectors or getting a
1609-
textual representation of them. On setting, user agents <em
1610-
class=ct>must</em> parse the given string as a group of selectors. If the
1611-
given string is ignored user agents <em class=ct>must</em> act as if
1612-
setting did not occur. Otherwise, set the attribute to the parsed string
1613-
and re-apply the style rules stored in the <code
1614-
title=cssstylerule-style><a href="#cssstylerule-style">style</a></code>
1615-
attribute.
1616-
1617-
<p>When getting the <code title=cssstylerule-selectortext><a
1618-
href="#cssstylerule-selectortext">selectorText</a></code> attribute it <em
1619-
class=ct>must</em> return a <span title=canon-selectors>textual
1620-
representation of the group of selectors</span>.
1614+
title=cssstylerule-selectortext><code>selectorText</code></dfn> attribute,
1615+
on getting, <em class=ct>must</em> return the result of <a
1616+
href="#selectors-serializing" title="selectors serializing">serializing a
1617+
group of selectors</a>. On setting, the setted value <em
1618+
class=ct>must</em> be used as input for <a href="#selectors-parsing"
1619+
title="selectors parsing">parsing a group of selectors</a> and if that
1620+
returns a non-"null" value that is to be used as a selector for the CSS
1621+
statement.
16211622

16221623
<p>The <dfn id=cssstylerule-style
16231624
title=cssstylerule-style><code>style</code></dfn> attribute <em
@@ -1768,20 +1769,14 @@ <h4 id=the-csspagerule><span class=secno>4.4.6. </span>The <code
17681769
};</pre>
17691770

17701771
<p>The <dfn id=csspagerule-selectortext
1771-
title=csspagerule-selectortext><code>selectorText</code></dfn> allows for
1772-
setting a new page selector or getting the textual representation of the
1773-
current one. On setting, user agents <em class=ct>must</em> parse the
1774-
given string as a page selector. If the given string is ignored user
1775-
agents <em class=ct>must</em> act as if setting did not occur. Otherwise,
1776-
the attribute <em class=ct>must</em> be set to the parsed string and the
1777-
styles <em class=ct>must</em> be re-applied.
1778-
1779-
<p>When getting the <code title=csspagerule-selectortext><a
1780-
href="#csspagerule-selectortext">selectorText</a></code> attribute it <em
1781-
class=ct>must</em> return a textual representation of the page selector
1782-
for the rule.
1783-
1784-
<p class=issue>We need to define normalization...
1772+
title=csspagerule-selectortext><code>selectorText</code></dfn> attribute,
1773+
on getting, <em class=ct>must</em> return the result of <a
1774+
href="#css-page-selectors-serializing" title="CSS page selectors
1775+
serializing">serializing CSS page selectors</a>. On setting, the setted
1776+
value <em class=ct>must</em> be used as input for <a
1777+
href="#css-page-selectors-parsing" title="CSS page selectors
1778+
parsing">parsing CSS page selectors</a> and if that returns a non-"null"
1779+
value that is to be used as a selector for the <code>@page</code> rule.
17851780

17861781
<p>The <dfn id=csspagerule-style
17871782
title=csspagerule-style><code>style</code></dfn> attribute, on getting,

cssom/Overview.src.html

Lines changed: 33 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,10 @@ <h3>Style Sheet</h3>
220220
<p>Specifications <em class="ct">must not</em> allow the creation of
221221
<span title="style sheet">style sheets</span> with the <span>style sheet
222222
alternate flag</span> set to <i>true</i> and the <span>style sheet
223-
title</span> set to the empty string.</p>
223+
title</span> set to the empty string. In addition they <em class="ct">must
224+
not</em> allow the creation of <span title="style sheet">style
225+
sheets</span> for which the user agent does not support the style sheet
226+
language.</p>
224227

225228

226229

@@ -1015,7 +1018,7 @@ <h5>Examples of the CSS Value Serializing Algorithm</h4>
10151018

10161019
<h4>Selectors Rules</h4>
10171020

1018-
<p>The rules for <dfn title="selectors-parsing">parsing a group of
1021+
<p>The rules for <dfn id="selectors-parsing" title="selectors parsing">parsing a group of
10191022
selectors</dfn> are as given in the following algorithm. The return value is
10201023
either a group of selectors or "null" (if parsing failed).</p>
10211024

@@ -1027,7 +1030,7 @@ <h4>Selectors Rules</h4>
10271030
<p>The aforementioned production is defined in the Selectors specification.
10281031
[Selectors]</p>
10291032

1030-
<p>The rules for <dfn title="selectors serializing">serializing a group of
1033+
<p>The rules for <dfn id="selectors-serializing" title="selectors serializing">serializing a group of
10311034
selectors</dfn> are as given in the following algorithm. The input is a a
10321035
non-normalized group of selectors and the output is a normalized group of
10331036
selectors.</p>
@@ -1058,8 +1061,8 @@ <h4>Selectors Rules</h4>
10581061
<h4>CSS Page Selectors Rules</h4>
10591062

10601063
<p class="issue">Need to define the rules for
1061-
<dfn title="CSS page selector parsing">parsing a CSS page selector</dfn> and
1062-
<dfn title="CSS page selector serializing">serializing a CSS page
1064+
<dfn id="css-page-selectors-parsing" title="CSS page selectors parsing">parsing a CSS page selector</dfn> and
1065+
<dfn id="css-page-selectors-serializing" title="CSS page selectors serializing">serializing a CSS page
10631066
selector</dfn>.</p>
10641067

10651068

@@ -1184,8 +1187,8 @@ <h3>The <code title="">CSSStyleSheet</code> Interface</h3>
11841187

11851188
<h3>The <code title="">CSSRuleList</code> Interface</h3>
11861189

1187-
<p>The <code>CSSRuleList</code> object represents an (ordered) list of
1188-
statements.</p>
1190+
<p>The <code>CSSRuleList</code> object represents an ordered collection of
1191+
CSS statements.</p> <!-- starting at 0 -->
11891192

11901193
<pre class="idl">interface <dfn>CSSRuleList</dfn> {
11911194
readonly attribute unsigned long <span title="cssrulelist-length">length</span>;
@@ -1204,7 +1207,7 @@ <h3>The <code title="">CSSRuleList</code> Interface</h3>
12041207
<em class="ct">must</em> return <code>null</code>. Otherwise, this method
12051208
<em class="ct">must</em> return the <code>CSSRule</code> in the list given by
12061209
<var title="">index</var>.</dd>
1207-
<!-- negative numbers -->
1210+
<!-- XXX negative numbers -->
12081211

12091212

12101213

@@ -1216,8 +1219,8 @@ <h3>Interfaces for CSS Statements</h3>
12161219

12171220
<h4>The <code title="">CSSRule</code> Interface</h4>
12181221

1219-
<p>The <code>CSSRule</code> interface is the base interface from which all
1220-
other CSS statement interfaces inherit.</p>
1222+
<p>The <code>CSSRule</code> interface a base interface. Each specific CSS
1223+
statement has an interface which inherits from this one.</p>
12211224

12221225
<pre class="idl">interface <dfn>CSSRule</dfn> {
12231226
// CSS statement type
@@ -1237,24 +1240,27 @@ <h4>The <code title="">CSSRule</code> Interface</h4>
12371240
readonly attribute <span>CSSStyleSheet</span> <span title="cssrule-parentstylesheet">parentStyleSheet</span>;
12381241
};</pre>
12391242

1243+
<!-- 0 is CSSUnknownRule and 2 is CSSCharsetRule, both dropped -->
1244+
12401245
<p>The <dfn id="cssrule-type" title="cssrule-type"><code>type</code></dfn>
1241-
attribute, on getting, <em class="ct">must</em> return the CSS statement type
1242-
as detailed for each specific type.</p>
1246+
attribute, on getting, <em class="ct">must</em> return the CSS statement
1247+
type as detailed for each specific type.</p>
12431248

12441249
<p>The
12451250
<dfn id="cssrule-csstext" title="cssrule-csstext"><code>cssText</code></dfn>
1246-
attribute allows for replacing a CSS statement or getting a textual
1247-
representation. On setting, user agents <em class="ct">must</em> <span>replace
1248-
a statement</span> where <var>rule</var> is the value being set and <var>old
1251+
attribute, on setting, <em class="ct">must</em> <span>replace a
1252+
statement</span> where <var>rule</var> is the value being set and <var>old
12491253
object</var> is the object of which this attribute is set.</p>
12501254

12511255
<p>On getting the <code title="cssrule-csstext">cssText</code> attribute,
12521256
<span class="issue">...</span>.</p>
12531257

1258+
<!-- XXX the serialization depends on the type -->
1259+
12541260
<p>The
12551261
<dfn id="cssrule-parentrule" title="cssrule-parentrule"><code>parentRule</code></dfn>
12561262
attribute <em class="ct">must</em> return the nearest enclosing rule of the
1257-
current rule or <code>null</code> if there is no enclosing rule. For example,
1263+
current rule or <code>null</code>, if there is no enclosing rule. For example,
12581264
an <code title="">@media</code> block enclosing the current rule.</p>
12591265

12601266
<p>The
@@ -1270,11 +1276,11 @@ <h5>Extensibility</h5>
12701276
so that they do not clash with extensions from other vendors. For example, the
12711277
first value for Mozilla could be <code>0x0<strong>8EC0</strong>001</code> and
12721278
<code>0x<strong>09E8A</strong>001</code> could be the first for Opera.</p>
1273-
1279+
12741280
<p>Vendors are encouraged to prefix the new interface names with a vendor
12751281
specific prefix. For example, "Example company" could have an interface called
12761282
"ExampleCSSTestRule".</p>
1277-
1283+
12781284
<p>In general, vendors are encouraged to discuss extensions on a public forum,
12791285
such as <code>www-style@w3.org</code>.</p>
12801286

@@ -1297,18 +1303,11 @@ <h4>The <code title="">CSSStyleRule</code> Interface</h4>
12971303

12981304
<p>The
12991305
<dfn id="cssstylerule-selectortext" title="cssstylerule-selectortext"><code>selectorText</code></dfn>
1300-
attribute allows for manipulation of the associated group of selectors or
1301-
getting a textual representation of them. On setting, user agents
1302-
<em class="ct">must</em> parse the given string as a group of selectors. If
1303-
the given string is ignored user agents <em class="ct">must</em> act as if
1304-
setting did not occur. Otherwise, set the attribute to the parsed string and
1305-
re-apply the style rules stored in the
1306-
<code title="cssstylerule-style">style</code> attribute.</p>
1307-
1308-
<p>When getting the
1309-
<code title="cssstylerule-selectortext">selectorText</code> attribute it
1310-
<em class="ct">must</em> return a <span title="canon-selectors">textual
1311-
representation of the group of selectors</span>.</p>
1306+
attribute, on getting, <em class="ct">must</em> return the result of
1307+
<span title="selectors serializing">serializing a group of selectors</span>. On setting, the setted
1308+
value <em class="ct">must</em> be used as input for <span title="selectors parsing">parsing a group
1309+
of selectors</span> and if that returns a non-"null" value that is to be
1310+
used as a selector for the CSS statement.</p>
13121311

13131312
<p>The
13141313
<dfn id="cssstylerule-style" title="cssstylerule-style"><code>style</code></dfn>
@@ -1439,18 +1438,10 @@ <h4>The <code title="">CSSPageRule</code> Interface</h4>
14391438

14401439
<p>The
14411440
<dfn id="csspagerule-selectortext" title="csspagerule-selectortext"><code>selectorText</code></dfn>
1442-
allows for setting a new page selector or getting the textual representation
1443-
of the current one. On setting, user agents <em class="ct">must</em> parse the
1444-
given string as a page selector. If the given string is ignored user agents
1445-
<em class="ct">must</em> act as if setting did not occur. Otherwise, the
1446-
attribute <em class="ct">must</em> be set to the parsed string and the styles
1447-
<em class="ct">must</em> be re-applied.</p>
1448-
1449-
<p>When getting the <code title="csspagerule-selectortext">selectorText</code>
1450-
attribute it <em class="ct">must</em> return a textual representation of the
1451-
page selector for the rule.</p>
1452-
1453-
<p class="issue">We need to define normalization...</p>
1441+
attribute, on getting, <em class="ct">must</em> return the result of
1442+
<span title="CSS page selectors serializing">serializing CSS page selectors</span>. On setting, the setted
1443+
value <em class="ct">must</em> be used as input for <span title="CSS page selectors parsing">parsing CSS page selectors</span> and if that returns a non-"null" value that is to be
1444+
used as a selector for the <code>@page</code> rule.</p>
14541445

14551446
<p>The
14561447
<dfn id="csspagerule-style" title="csspagerule-style"><code>style</code></dfn>

0 commit comments

Comments
 (0)