3535 < div class =head >
3636 < h1 id =cssom > Cascading Style Sheets Object Model (< abbr > CSSOM</ abbr > )</ h1 >
3737
38- < h2 class ="no-num no-toc " id =""> Editor's draft <!--W3C Working Draft--> 9
38+ < h2 class ="no-num no-toc " id =""> Editor's draft <!--W3C Working Draft--> 13
3939 June 2007</ h2 >
4040
4141 < dl >
4242 < dt > This version:</ dt >
4343 <!--
44- <dd><a href="http://www.w3.org/TR/2007/WD-cssom-20070609 /">http://www.w3.org/TR/2007/WD-cssom-20070609 /</a></dd>
44+ <dd><a href="http://www.w3.org/TR/2007/WD-cssom-20070613 /">http://www.w3.org/TR/2007/WD-cssom-20070613 /</a></dd>
4545 -->
4646
4747 < dd > ...
@@ -269,6 +269,9 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
269269 < ul class =toc >
270270 < li > < a href ="#the-screen "> < span class =secno > 4.1.1. </ span > The < code
271271 title =""> Screen</ code > Interface</ a >
272+
273+ < li > < a href ="#the-media "> < span class =secno > 4.1.2. </ span > The < code
274+ title =""> Media</ code > Interface</ a >
272275 </ ul >
273276
274277 < li > < a href ="#the-documentlayout "> < span class =secno > 4.2. </ span > The
@@ -301,7 +304,7 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
301304
302305 < li > < a href ="#canon "> < span class =secno > 5. </ span > Canonicalization </ a >
303306 < ul class =toc >
304- < li > < a href ="#media "> < span class =secno > 5.1. </ span > Media queries</ a >
307+ < li > < a href ="#media0 "> < span class =secno > 5.1. </ span > Media queries</ a >
305308 < ul class =toc >
306309 < li > < a href ="#examples1 "> < span class =secno > 5.1.1. </ span > Examples</ a >
307310 </ ul >
@@ -544,8 +547,8 @@ <h4 id=ltxml-stylesheet><span class=secno>2.2.3.
544547 < dt > < code title =stylesheet-media > < a
545548 href ="#stylesheet-media "> media</ a > </ code >
546549
547- < dd > This < em class =ct > must</ em > be the value of the < code > media </ code >
548- pseudo-attribute.
550+ < dd > This < em class =ct > must</ em > be the value of the < code
551+ title ="" > media </ code > pseudo-attribute.
549552
550553 < dt > < code title =stylesheet-title > < a
551554 href ="#stylesheet-title "> title</ a > </ code >
@@ -1653,8 +1656,8 @@ <h4 id=the-cssrule><span class=secno>3.4.1. </span>The <code
16531656 < p > The < dfn id =cssrule-parentrule
16541657 title =cssrule-parentrule > < code > parentRule</ code > </ dfn > attribute < em
16551658 class =ct > must</ em > return the nearest enclosing rule of the current rule
1656- or < code > null</ code > if there is no enclosing rule. For example, an
1657- < code > @media</ code > block enclosing the current rule.
1659+ or < code > null</ code > if there is no enclosing rule. For example, an < code
1660+ title ="" > @media</ code > block enclosing the current rule.
16581661
16591662 < p > The < dfn id =cssrule-parentstylesheet
16601663 title =cssrule-parentstylesheet > < code > parentStyleSheet</ code > </ dfn >
@@ -1803,7 +1806,7 @@ <h4 id=the-cssmediarule><span class=secno>3.4.5. </span>The <code
18031806 return the value of that constant.
18041807
18051808 < p > The < code > < a href ="#cssmediarule "> CSSMediaRule</ a > </ code > object
1806- represents an < code > @media</ code > rule specified (if any) in a < a
1809+ represents an < code title ="" > @media</ code > rule specified (if any) in a < a
18071810 href ="#css-style-sheet "> CSS style sheet</ a > . It is a single statement that
18081811 contains zero or more rulesets which are contrained by one or more media
18091812 queries (unless one happens to be < code > all</ code > ).
@@ -1820,13 +1823,13 @@ <h4 id=the-cssmediarule><span class=secno>3.4.5. </span>The <code
18201823 title =cssmediarule-media > < code > media</ code > </ dfn > attribute, on getting,
18211824 < em class =ct > must</ em > return a < code > < a
18221825 href ="#medialist "> MediaList</ a > </ code > object containing a list of media
1823- queries specified with the < code > @media</ code > rule.
1826+ queries specified with the < code title ="" > @media</ code > rule.
18241827
18251828 < p > The < dfn id =cssmediarule-cssrules
18261829 title =cssmediarule-cssrules > < code > cssRules</ code > </ dfn > attribute, on
18271830 getting, < em class =ct > must</ em > return a < code > < a
18281831 href ="#cssrulelist "> CSSRuleList</ a > </ code > object containing a list of all
1829- the rulesets specified within the < code > @media</ code > rule.
1832+ the rulesets specified within the < code title ="" > @media</ code > rule.
18301833
18311834 < p > The < dfn id =cssmediarule-insertrule
18321835 title =cssmediarule-insertrule > < code > insertRule(< var title =""> rule</ var > ,
@@ -2481,6 +2484,7 @@ <h3 id=the-windowlayout><span class=secno>4.1. </span>The <code><a
24812484 readonly attribute float < a href ="#windowlayout-pageyoffset " title =windowlayout-pageyoffset > pageYOffset</ a > ;
24822485 readonly attribute float < a href ="#windowlayout-screenx " title =windowlayout-screenx > screenX</ a > ;
24832486 readonly attribute float < a href ="#windowlayout-screeny " title =windowlayout-screeny > screenY</ a > ;
2487+ readonly attribute < a href ="#media "> Media</ a > < a href ="#windowlayout-media " title =windowlayout-media > media</ a > ;
24842488 readonly attribute < a href ="#screen "> Screen</ a > < a href ="#windowlayout-screen " title =windowlayout-screen > screen</ a > ;
24852489};</ pre >
24862490 <!-- XXX float? -->
@@ -2534,16 +2538,22 @@ <h3 id=the-windowlayout><span class=secno>4.1. </span>The <code><a
25342538 device. If there is no browser window this attribute < em
25352539 class =ct > must</ em > return zero.
25362540
2541+ < p > The < dfn id =windowlayout-media
2542+ title =windowlayout-media > < code > media</ code > </ dfn > attribute, on getting,
2543+ < em class =ct > must</ em > return a < code > < a href ="#media "> Media</ a > </ code >
2544+ object.
2545+
25372546 < p > The < dfn id =windowlayout-screen
25382547 title =windowlayout-screen > < code > screen</ code > </ dfn > attribute, on getting,
25392548 < em class =ct > must</ em > return a < code > < a href ="#screen "> Screen</ a > </ code >
25402549 object.
25412550
25422551 < p > If the user agent supports multiple views and the current view does not
25432552 have a notion of an output device the above attributes with the exception
2544- of < code title =windowlayout-screen > < a
2545- href ="#windowlayout-screen "> screen</ a > </ code > < em class =ct > should</ em >
2546- return zero. [DOM2View]
2553+ of < code title =windowlayout-media > < a
2554+ href ="#windowlayout-media "> media</ a > </ code > and < code
2555+ title =windowlayout-screen > < a href ="#windowlayout-screen "> screen</ a > </ code >
2556+ < em class =ct > should</ em > return zero. [DOM2View]
25472557
25482558 < h4 id =the-screen > < span class =secno > 4.1.1. </ span > The < code
25492559 title =""> Screen</ code > Interface</ h4 >
@@ -2590,6 +2600,36 @@ <h4 id=the-screen><span class=secno>4.1.1. </span>The <code
25902600 have a notion of an output device the above attributes < em
25912601 class =ct > should</ em > return zero. [DOM2View]
25922602
2603+ < h4 id =the-media > < span class =secno > 4.1.2. </ span > The < code
2604+ title =""> Media</ code > Interface</ h4 >
2605+ <!-- XXX arguably this is the wrong place -->
2606+
2607+ < pre class =idl > interface < dfn id =media > Media</ dfn > {
2608+ readonly attribute DOMString < a href ="#type " title =media-type > type</ a > ;
2609+ boolean < a href ="#matchmedia " title =media-matchmedia > matchMedia</ a > (in DOMString < var title =""> mediaquery</ var > );
2610+ };</ pre >
2611+
2612+ < p > The < dfn id =type title =media-type > < code > type</ code > </ dfn > attribute, on
2613+ getting, < em class =ct > must</ em > return the string that represents the
2614+ canvas' current rendering mode (< code > < a href ="#screen "> screen</ a > </ code > ,
2615+ < code > print</ code > , etc). This is a lowercase string, as defined by the
2616+ CSS specification. [CSS]
2617+
2618+ < p > The < dfn id =matchmedia title =media-matchmedia > < code > matchMedia(< var
2619+ title =""> mediaquery</ var > )</ code > </ dfn > method, when invoked, < em
2620+ class =ct > must</ em > return the result of the following algorithm:
2621+
2622+ < ol >
2623+ < li > If < var title =""> mediaquery</ var > can not be parsed according to the
2624+ rules given in the Media Query specification return < code > false</ code >
2625+ and terminate this algorithm.
2626+
2627+ < li > If < var title =""> mediaquery</ var > matches the state of the current
2628+ view return < code > true</ code > and terminate this algorithm.
2629+
2630+ < li > Return < code > false</ code > .
2631+ </ ol >
2632+
25932633 < h3 id =the-documentlayout > < span class =secno > 4.2. </ span > The < code
25942634 title =""> DocumentLayout</ code > Interface</ h3 >
25952635
@@ -3132,7 +3172,7 @@ <h2 id=canon><span class=secno>5. </span>Canonicalization</h2>
31323172 < p > The definitions from this section are used later to define attribute
31333173 values, et cetera.
31343174
3135- < h3 id =media > < span class =secno > 5.1. </ span > Media queries</ h3 >
3175+ < h3 id =media0 > < span class =secno > 5.1. </ span > Media queries</ h3 >
31363176
31373177 < p > The < dfn id =canon-media title =canon-media > canonicalization of a media
31383178 query</ dfn > can be determined as follows:
0 commit comments