Skip to content

Commit 1d036ee

Browse files
committed
parsing a list of media queries never fails; add a note on WindowProxy behavior; make CaretPosition a subchapter
1 parent cd9ade5 commit 1d036ee

2 files changed

Lines changed: 50 additions & 61 deletions

File tree

cssom-view/Overview.html

Lines changed: 40 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727

2828
<h1 id=cssom-view-module>CSSOM View Module</h1>
2929

30-
<h2 class="no-num no-toc" id=w3c-doctype>Editor's Draft 11 August 2010</h2>
30+
<h2 class="no-num no-toc" id=w3c-doctype>Editor's Draft 12 August 2010</h2>
3131

3232
<dl>
3333
<dt>This Version:
3434

3535
<dd><a
36-
href="http://www.w3.org/TR/2010/ED-cssom-view-20100811/">http://www.w3.org/TR/2010/ED-cssom-view-20100811/</a>
36+
href="http://www.w3.org/TR/2010/ED-cssom-view-20100812/">http://www.w3.org/TR/2010/ED-cssom-view-20100812/</a>
3737

3838
<dt>Latest Version:
3939

@@ -153,51 +153,51 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
153153

154154
<li><a href="#extensions-to-the-document-interface"><span class=secno>5.
155155
</span>Extensions to the <code title="">Document</code> Interface</a>
156+
<ul class=toc>
157+
<li><a href="#the-caretposition-interface"><span class=secno>5.1.
158+
</span>The <code title="">CaretPosition</code> Interface</a>
159+
</ul>
156160

157-
<li><a href="#the-caretposition-interface"><span class=secno>6. </span>The
158-
<code title="">CaretPosition</code> Interface</a>
159-
160-
<li><a href="#extensions-to-the-element-interface"><span class=secno>7.
161+
<li><a href="#extensions-to-the-element-interface"><span class=secno>6.
161162
</span>Extensions to the <code title="">Element</code> Interface</a>
162163
<ul class=toc>
163164
<li><a href="#the-getclientrects-and-getboundingclient"><span
164-
class=secno>7.1. </span>The <code title="">getClientRects()</code> and
165+
class=secno>6.1. </span>The <code title="">getClientRects()</code> and
165166
<code title="">getBoundingClientRect()</code> methods</a>
166167

167-
<li><a href="#scroll-attributes"><span class=secno>7.2. </span>The <code
168+
<li><a href="#scroll-attributes"><span class=secno>6.2. </span>The <code
168169
title="">scrollTop</code>, <code title="">scrollLeft</code>, <code
169170
title="">scrollWidth</code>, and <code title="">scrollHeight</code>
170171
attributes</a>
171172

172-
<li><a href="#client-attributes"><span class=secno>7.3. </span>The <code
173+
<li><a href="#client-attributes"><span class=secno>6.3. </span>The <code
173174
title="">clientTop</code>, <code title="">clientLeft</code>, <code
174175
title="">clientWidth</code>, and <code title="">clientHeight</code>
175176
attributes</a>
176177
</ul>
177178

178179
<li><a href="#extensions-to-the-htmlelement-interface"><span
179-
class=secno>8. </span>Extensions to the <code title="">HTMLElement</code>
180+
class=secno>7. </span>Extensions to the <code title="">HTMLElement</code>
180181
Interface</a>
181182
<ul class=toc>
182-
<li><a href="#offset-attributes"><span class=secno>8.1. </span>The <code
183+
<li><a href="#offset-attributes"><span class=secno>7.1. </span>The <code
183184
title="">offsetParent</code>, <code title="">offsetTop</code>, <code
184185
title="">offsetLeft</code>, <code title="">offsetWidth</code>, and
185186
<code title="">offsetHeight</code> attributes</a>
186187
</ul>
187188

188-
<li><a href="#extensions-to-the-range-interface"><span class=secno>9.
189+
<li><a href="#extensions-to-the-range-interface"><span class=secno>8.
189190
</span>Extensions to the <code title="">Range</code> Interface</a>
190191

191-
<li><a href="#extensions-to-the-mouseevent-interface"><span
192-
class=secno>10. </span>Extensions to the <code title="">MouseEvent</code>
193-
Interface</a>
192+
<li><a href="#extensions-to-the-mouseevent-interface"><span class=secno>9.
193+
</span>Extensions to the <code title="">MouseEvent</code> Interface</a>
194194

195-
<li><a href="#rectangles"><span class=secno>11. </span>Rectangles</a>
195+
<li><a href="#rectangles"><span class=secno>10. </span>Rectangles</a>
196196
<ul class=toc>
197-
<li><a href="#the-clientrectlist-interface"><span class=secno>11.1.
197+
<li><a href="#the-clientrectlist-interface"><span class=secno>10.1.
198198
</span>The <code title="">ClientRectList</code> Interface</a>
199199

200-
<li><a href="#the-clientrect-interface"><span class=secno>11.2.
200+
<li><a href="#the-clientrect-interface"><span class=secno>10.2.
201201
</span>The <code title="">ClientRect</code> Interface</a>
202202
</ul>
203203

@@ -355,6 +355,12 @@ <h2 id=extensions-to-the-window-interface><span class=secno>4.
355355
object associated with the <a href="#window"><code>Window</code></a>
356356
object. It always returns the same object.
357357

358+
<p class=note>Accessing <a href="#dom-window-stylemedia"><code
359+
title=dom-Window-styleMedia>styleMedia</code></a> or <a
360+
href="#dom-window-screen"><code title=dom-Window-screen>screen</code></a>
361+
through a <code>WindowProxy</code> object might yield different results
362+
when the document is navigated.
363+
358364
<p>The <dfn id=dom-window-innerwidth><code>innerWidth</code></dfn>
359365
attribute <em class=ct>must</em> return the <a
360366
href="#viewport">viewport</a> width including the size of a rendered
@@ -520,15 +526,9 @@ <h3 id=the-stylemedia-interface><span class=secno>4.1. </span>The <code
520526
queries">parsing</a> <var title="">mq_list</var>.
521527

522528
<li>
523-
<p>If <var title="">parsed_mq_list</var> is null terminate these steps.
524-
525-
<li>
526-
<p>If <var title="">parsed_mq_list</var> matches the state of the
527-
rendered <a href="#document"><code>Document</code></a> return true and
528-
terminate this algorithm.
529-
530-
<li>
531-
<p>Otherwise, return false.
529+
<p>Return true if <var title="">parsed_mq_list</var> matches the state of
530+
the rendered <a href="#document"><code>Document</code></a> and false if
531+
it does not.
532532
</ol>
533533

534534
<div class=example>
@@ -559,9 +559,6 @@ <h3 id=the-stylemedia-interface><span class=secno>4.1. </span>The <code
559559
href="#parse-a-list-of-media-queries" title="parse a list of media
560560
queries">parsing</a> <var title="">mq_list</var>.
561561

562-
<li>
563-
<p>If <var title="">parsed_mq_list</var> is null terminate these steps.
564-
565562
<li>
566563
<p>If <a href="#compare-lists-of-media-queries" title="compare lists of
567564
media queries">comparing</a> <var title="">parsed_mq_list</var> with any
@@ -587,9 +584,6 @@ <h3 id=the-stylemedia-interface><span class=secno>4.1. </span>The <code
587584
href="#parse-a-list-of-media-queries" title="parse a list of media
588585
queries">parsing</a> <var title="">mq_list</var>.
589586

590-
<li>
591-
<p>If <var title="">parsed_mq_list</var> is null terminate these steps.
592-
593587
<li>
594588
<p>If <a href="#compare-lists-of-media-queries" title="compare lists of
595589
media queries">comparing</a> <var title="">parsed_mq_list</var> with any
@@ -771,8 +765,8 @@ <h2 id=extensions-to-the-document-interface><span class=secno>5.
771765
are therefore too. Hit testing will hopefully be defined in a future
772766
revision of CSS or HTML.
773767

774-
<h2 id=the-caretposition-interface><span class=secno>6. </span>The <code
775-
title="">CaretPosition</code> Interface</h2>
768+
<h3 id=the-caretposition-interface><span class=secno>5.1. </span>The <code
769+
title="">CaretPosition</code> Interface</h3>
776770

777771
<p>A <dfn id=caret-position>caret position</dfn> gives the position of a
778772
text insertion point indicator. It always has an associated <dfn
@@ -799,7 +793,7 @@ <h2 id=the-caretposition-interface><span class=secno>6. </span>The <code
799793
class=ct>must</em> return the <a href="#caret-range">caret range</a>.</p>
800794
<!-- https://bugs.webkit.org/show_bug.cgi?id=27046 -->
801795

802-
<h2 id=extensions-to-the-element-interface><span class=secno>7.
796+
<h2 id=extensions-to-the-element-interface><span class=secno>6.
803797
</span>Extensions to the <code title="">Element</code> Interface</h2>
804798

805799
<pre class=idl>[Supplemental] interface <a href="#element">Element</a> {
@@ -817,7 +811,7 @@ <h2 id=extensions-to-the-element-interface><span class=secno>7.
817811
readonly attribute long <a href="#dom-element-clientheight">clientHeight</a>;
818812
};</pre>
819813

820-
<h3 id=the-getclientrects-and-getboundingclient><span class=secno>7.1.
814+
<h3 id=the-getclientrects-and-getboundingclient><span class=secno>6.1.
821815
</span>The <code title="">getClientRects()</code> and <code
822816
title="">getBoundingClientRect()</code> methods</h3>
823817

@@ -914,7 +908,7 @@ <h3 id=the-getclientrects-and-getboundingclient><span class=secno>7.1.
914908
var exampleHeight = example.height;</code></pre>
915909
</div>
916910

917-
<h3 id=scroll-attributes><span class=secno>7.2. </span>The <code
911+
<h3 id=scroll-attributes><span class=secno>6.2. </span>The <code
918912
title="">scrollTop</code>, <code title="">scrollLeft</code>, <code
919913
title="">scrollWidth</code>, and <code title="">scrollHeight</code>
920914
attributes</h3>
@@ -1058,7 +1052,7 @@ <h3 id=scroll-attributes><span class=secno>7.2. </span>The <code
10581052
</ol>
10591053
<!-- for inline boxes offsetWidth and offsetHeight are identical to offset* -->
10601054

1061-
<h3 id=client-attributes><span class=secno>7.3. </span>The <code
1055+
<h3 id=client-attributes><span class=secno>6.3. </span>The <code
10621056
title="">clientTop</code>, <code title="">clientLeft</code>, <code
10631057
title="">clientWidth</code>, and <code title="">clientHeight</code>
10641058
attributes</h3>
@@ -1099,7 +1093,7 @@ <h3 id=client-attributes><span class=secno>7.3. </span>The <code
10991093
href="#padding-edge">padding edge</a> and the <a
11001094
href="#border-edge">border edge</a>) otherwise.
11011095

1102-
<h2 id=extensions-to-the-htmlelement-interface><span class=secno>8.
1096+
<h2 id=extensions-to-the-htmlelement-interface><span class=secno>7.
11031097
</span>Extensions to the <code title="">HTMLElement</code> Interface</h2>
11041098

11051099
<pre
@@ -1111,7 +1105,7 @@ <h2 id=extensions-to-the-htmlelement-interface><span class=secno>8.
11111105
readonly attribute long <a href="#dom-htmlelement-offsetheight">offsetHeight</a>;
11121106
};</pre>
11131107

1114-
<h3 id=offset-attributes><span class=secno>8.1. </span>The <code
1108+
<h3 id=offset-attributes><span class=secno>7.1. </span>The <code
11151109
title="">offsetParent</code>, <code title="">offsetTop</code>, <code
11161110
title="">offsetLeft</code>, <code title="">offsetWidth</code>, and <code
11171111
title="">offsetHeight</code> attributes</h3>
@@ -1267,7 +1261,7 @@ <h3 id=offset-attributes><span class=secno>8.1. </span>The <code
12671261
<var>A</var>.
12681262
</ol>
12691263

1270-
<h2 id=extensions-to-the-range-interface><span class=secno>9.
1264+
<h2 id=extensions-to-the-range-interface><span class=secno>8.
12711265
</span>Extensions to the <code title="">Range</code> Interface</h2>
12721266

12731267
<pre class=idl>[Supplemental] interface <a href="#range">Range</a> {
@@ -1334,7 +1328,7 @@ <h2 id=extensions-to-the-range-interface><span class=secno>9.
13341328
which the height or width is not zero.
13351329
</ol>
13361330

1337-
<h2 id=extensions-to-the-mouseevent-interface><span class=secno>10.
1331+
<h2 id=extensions-to-the-mouseevent-interface><span class=secno>9.
13381332
</span>Extensions to the <code title="">MouseEvent</code> Interface</h2>
13391333

13401334
<pre
@@ -1407,9 +1401,9 @@ <h2 id=extensions-to-the-mouseevent-interface><span class=secno>10.
14071401
event occurred relative to the origin of the <a
14081402
href="#padding-edge">padding edge</a> of the target node.
14091403

1410-
<h2 id=rectangles><span class=secno>11. </span>Rectangles</h2>
1404+
<h2 id=rectangles><span class=secno>10. </span>Rectangles</h2>
14111405

1412-
<h3 id=the-clientrectlist-interface><span class=secno>11.1. </span>The
1406+
<h3 id=the-clientrectlist-interface><span class=secno>10.1. </span>The
14131407
<code title="">ClientRectList</code> Interface</h3>
14141408

14151409
<p>The <a href="#clientrectlist"><code>ClientRectList</code></a> object
@@ -1436,7 +1430,7 @@ <h3 id=the-clientrectlist-interface><span class=secno>11.1. </span>The
14361430
object. Otherwise, the <a href="#clientrect"><code>ClientRect</code></a>
14371431
object at <var title="">index</var> <em class=ct>must</em> be returned.
14381432

1439-
<h3 id=the-clientrect-interface><span class=secno>11.2. </span>The <code
1433+
<h3 id=the-clientrect-interface><span class=secno>10.2. </span>The <code
14401434
title="">ClientRect</code> Interface</h3>
14411435

14421436
<p>Objects implementing the <a

cssom-view/Overview.src.html

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,12 @@ <h2 id="extensions-to-the-window-interface">Extensions to the <code title="">Win
228228
associated with the <code>Window</code> object. It always returns the same
229229
object.</p>
230230

231+
<p class="note">Accessing
232+
<code title="dom-Window-styleMedia">styleMedia</code> or
233+
<code title="dom-Window-screen">screen</code> through a
234+
<code>WindowProxy</code> object might yield different results when the
235+
document is navigated.</p>
236+
231237

232238
<p>The <dfn id="dom-window-innerwidth"><code>innerWidth</code></dfn>
233239
attribute <em class="ct">must</em> return the
@@ -379,14 +385,9 @@ <h3 id="the-stylemedia-interface">The <code title="">StyleMedia</code> Interface
379385
<span title="parse a list of media queries">parsing</span>
380386
<var title="">mq_list</var>.</p></li>
381387

382-
<li><p>If <var title="">parsed_mq_list</var> is null terminate these
383-
steps.</p></li>
384-
385-
<li><p>If <var title="">parsed_mq_list</var> matches the state of the
386-
rendered <code>Document</code> return true and terminate this
387-
algorithm.</p></li>
388-
389-
<li><p>Otherwise, return false.</p></li>
388+
<li><p>Return true if <var title="">parsed_mq_list</var> matches the
389+
state of the rendered <code>Document</code> and false if it
390+
does not.</p></li>
390391
</ol>
391392

392393
<div class="example">
@@ -415,9 +416,6 @@ <h3 id="the-stylemedia-interface">The <code title="">StyleMedia</code> Interface
415416
<span title="parse a list of media queries">parsing</span>
416417
<var title="">mq_list</var>.</p></li>
417418

418-
<li><p>If <var title="">parsed_mq_list</var> is null terminate these
419-
steps.</p></li>
420-
421419
<li><p>If <span title="compare lists of media queries">comparing</span>
422420
<var title="">parsed_mq_list</var> with any of the list of media queries
423421
in the <span>list of media listeners</span> returns true
@@ -438,9 +436,6 @@ <h3 id="the-stylemedia-interface">The <code title="">StyleMedia</code> Interface
438436
<span title="parse a list of media queries">parsing</span>
439437
<var title="">mq_list</var>.</p></li>
440438

441-
<li><p>If <var title="">parsed_mq_list</var> is null terminate these
442-
steps.</p></li>
443-
444439
<li><p>If <span title="compare lists of media queries">comparing</span>
445440
<var title="">parsed_mq_list</var> with any of the media queries in the
446441
<span>list of media listeners</span> returns true <em>and</em> the
@@ -605,7 +600,7 @@ <h2 id="extensions-to-the-document-interface">Extensions to the <code title="">D
605600

606601

607602

608-
<h2 id="the-caretposition-interface">The <code title="">CaretPosition</code> Interface</h2>
603+
<h3 id="the-caretposition-interface">The <code title="">CaretPosition</code> Interface</h3>
609604

610605
<p>A <dfn>caret position</dfn> gives the position of a
611606
text insertion point indicator. It always has an associated

0 commit comments

Comments
 (0)