|
25 | 25 | <div class=head> |
26 | 26 | <h1 id=cssom>CSSOM</h1> |
27 | 27 |
|
28 | | - <h2 class="no-num no-toc" id="">Editor's Draft 11 March 2010</h2> |
| 28 | + <h2 class="no-num no-toc" id="">Editor's Draft 12 March 2010</h2> |
29 | 29 |
|
30 | 30 | <dl> |
31 | 31 | <dt>This Version: |
32 | 32 |
|
33 | 33 | <dd><a |
34 | | - href="http://www.w3.org/TR/2010/ED-cssom-20100311/">http://www.w3.org/TR/2010/ED-cssom-20100311/</a> |
| 34 | + href="http://www.w3.org/TR/2010/ED-cssom-20100312/">http://www.w3.org/TR/2010/ED-cssom-20100312/</a> |
35 | 35 |
|
36 | 36 | <dt>Latest Version: |
37 | 37 |
|
@@ -936,47 +936,47 @@ <h4 id=the-stylesheet-interface><span class=secno>6.1.1. </span>The <code |
936 | 936 | href="#stylesheet">StyleSheet</a></code> interface. |
937 | 937 |
|
938 | 938 | <pre class=idl>interface <dfn id=stylesheet>StyleSheet</dfn> { |
939 | | - readonly attribute DOMString <a href="#stylesheet-type" title=stylesheet-type>type</a>; |
940 | | - readonly attribute DOMString <a href="#stylesheet-href" title=stylesheet-href>href</a>; |
941 | | - readonly attribute Node <a href="#stylesheet-ownernode" title=stylesheet-ownernode>ownerNode</a>; |
942 | | - readonly attribute <a href="#stylesheet">StyleSheet</a> <a href="#stylesheet-parentstylesheet" title=stylesheet-parentstylesheet>parentStyleSheet</a>; |
943 | | - readonly attribute DOMString <a href="#stylesheet-title" title=stylesheet-title>title</a>; |
944 | | - [PutForwards=<a href="#dom-medialist-mediatext" title=dom-MediaList-mediaText>mediaText</a>] readonly attribute <a href="#medialist">MediaList</a> <a href="#stylesheet-media" title=stylesheet-media>media</a>; |
945 | | - attribute boolean <a href="#stylesheet-disabled" title=stylesheet-disabled>disabled</a>; |
| 939 | + readonly attribute DOMString <a href="#dom-stylesheet-type" title=dom-StyleSheet-type>type</a>; |
| 940 | + readonly attribute DOMString <a href="#dom-stylesheet-href" title=dom-StyleSheet-href>href</a>; |
| 941 | + readonly attribute Node <a href="#dom-stylesheet-ownernode" title=dom-StyleSheet-ownerNode>ownerNode</a>; |
| 942 | + readonly attribute <a href="#stylesheet">StyleSheet</a> <a href="#dom-stylesheet-parentstylesheet" title=dom-StyleSheet-parentStyleSheet>parentStyleSheet</a>; |
| 943 | + readonly attribute DOMString <a href="#dom-stylesheet-title" title=dom-StyleSheet-title>title</a>; |
| 944 | + [PutForwards=<a href="#dom-medialist-mediatext" title=dom-MediaList-mediaText>mediaText</a>] readonly attribute <a href="#medialist">MediaList</a> <a href="#dom-stylesheet-media" title=dom-StyleSheet-media>media</a>; |
| 945 | + attribute boolean <a href="#dom-stylesheet-disabled" title=dom-StyleSheet-disabled>disabled</a>; |
946 | 946 | };</pre> |
947 | 947 |
|
948 | | - <p>The <dfn id=stylesheet-type |
949 | | - title=stylesheet-type><code>type</code></dfn> attribute <em |
| 948 | + <p>The <dfn id=dom-stylesheet-type |
| 949 | + title=dom-StyleSheet-type><code>type</code></dfn> attribute <em |
950 | 950 | class=ct>must</em> return the <a href="#style-sheet-type">style sheet |
951 | 951 | type</a>. |
952 | 952 |
|
953 | | - <p>The <dfn id=stylesheet-href |
954 | | - title=stylesheet-href><code>href</code></dfn> attribute <em |
| 953 | + <p>The <dfn id=dom-stylesheet-href |
| 954 | + title=dom-StyleSheet-href><code>href</code></dfn> attribute <em |
955 | 955 | class=ct>must</em> return the <a href="#style-sheet-location">style sheet |
956 | 956 | location</a>. |
957 | 957 |
|
958 | | - <p>The <dfn id=stylesheet-ownernode |
959 | | - title=stylesheet-ownernode><code>ownerNode</code></dfn> attribute <em |
| 958 | + <p>The <dfn id=dom-stylesheet-ownernode |
| 959 | + title=dom-StyleSheet-ownerNode><code>ownerNode</code></dfn> attribute <em |
960 | 960 | class=ct>must</em> return the <a href="#style-sheet-node">style sheet |
961 | 961 | node</a>. |
962 | 962 |
|
963 | | - <p>The <dfn id=stylesheet-parentstylesheet |
964 | | - title=stylesheet-parentstylesheet><code>parentStyleSheet</code></dfn> |
| 963 | + <p>The <dfn id=dom-stylesheet-parentstylesheet |
| 964 | + title=dom-StyleSheet-parentStyleSheet><code>parentStyleSheet</code></dfn> |
965 | 965 | attribute <em class=ct>must</em> return the <a |
966 | 966 | href="#style-sheet-parent">style sheet parent</a>. |
967 | 967 |
|
968 | | - <p>The <dfn id=stylesheet-title |
969 | | - title=stylesheet-title><code>title</code></dfn> attribute <em |
| 968 | + <p>The <dfn id=dom-stylesheet-title |
| 969 | + title=dom-StyleSheet-title><code>title</code></dfn> attribute <em |
970 | 970 | class=ct>must</em> return the <a href="#style-sheet-title">style sheet |
971 | 971 | title</a>. |
972 | 972 |
|
973 | | - <p>The <dfn id=stylesheet-media |
974 | | - title=stylesheet-media><code>media</code></dfn> attribute <em |
| 973 | + <p>The <dfn id=dom-stylesheet-media |
| 974 | + title=dom-StyleSheet-media><code>media</code></dfn> attribute <em |
975 | 975 | class=ct>must</em> return the <a href="#style-sheet-media">style sheet |
976 | 976 | media</a>. |
977 | 977 |
|
978 | | - <p>The <dfn id=stylesheet-disabled |
979 | | - title=stylesheet-disabled><code>disabled</code></dfn> attribute <em |
| 978 | + <p>The <dfn id=dom-stylesheet-disabled |
| 979 | + title=dom-StyleSheet-disabled><code>disabled</code></dfn> attribute <em |
980 | 980 | class=ct>must</em>, on getting, return the <a |
981 | 981 | href="#style-sheet-disabled-flag">style sheet disabled flag</a>. On |
982 | 982 | setting, it <em class=ct>must</em> set the <a |
@@ -1918,15 +1918,72 @@ <h4 id=the-cssrule-interface><span class=secno>7.2.2. </span>The <code |
1918 | 1918 | object</var> is the object of which this attribute is set. |
1919 | 1919 |
|
1920 | 1920 | <p>On getting the <code title=dom-CSSRule-cssText><a |
1921 | | - href="#dom-cssrule-csstext">cssText</a></code> attribute, <span |
1922 | | - class=issue>...</span>.</p> |
1923 | | - <!-- XXX the serialization depends on the type --> |
| 1921 | + href="#dom-cssrule-csstext">cssText</a></code> attribute, a serialization |
| 1922 | + of the object <em class=ct>must</em> be returned. The serialization |
| 1923 | + depends on the object, as follows: |
| 1924 | + |
| 1925 | + <dl> |
| 1926 | + <dt><code><a href="#cssstylerule">CSSStyleRule</a></code> |
| 1927 | + |
| 1928 | + <dd class=XXX>... |
| 1929 | + |
| 1930 | + <dt><code><a href="#cssimportrule">CSSImportRule</a></code> |
| 1931 | + |
| 1932 | + <dd> |
| 1933 | + <p>The result of concatenating these strings:</p> |
| 1934 | + |
| 1935 | + <ol> |
| 1936 | + <li>The literal string "<code>@import</code>", followed by a space |
| 1937 | + (U+0020), followed by the literal string '<code><a |
| 1938 | + href="#url">url("</a></code>', followed by the <a |
| 1939 | + href="#escape-a-string" title="escape a string">escaped</a> value of |
| 1940 | + the <code title=dom-CSSImportRule-href><a |
| 1941 | + href="#dom-cssimportrule-href">href</a></code> attribute, followed by |
| 1942 | + '<code>")</code>'. |
| 1943 | + |
| 1944 | + <li>If the associated <code><a href="#medialist">MediaList</a></code> |
| 1945 | + object is not empty, a space (U+0020), followed by the value of the |
| 1946 | + <code title=dom-MediaList-mediaText><a |
| 1947 | + href="#dom-medialist-mediatext">mediaText</a></code> attribute of the |
| 1948 | + associated <code><a href="#medialist">MediaList</a></code> object. |
| 1949 | + |
| 1950 | + <li>A "<code>;</code>" (U+003B). |
| 1951 | + </ol> |
| 1952 | + |
| 1953 | + <dt><code><a href="#cssmediarule">CSSMediaRule</a></code> |
| 1954 | + |
| 1955 | + <dd class=XXX>... |
| 1956 | + |
| 1957 | + <dt><code><a href="#cssfontfacerule">CSSFontFaceRule</a></code> |
| 1958 | + |
| 1959 | + <dd class=XXX>... |
| 1960 | + |
| 1961 | + <dt><code><a href="#csspagerule">CSSPageRule</a></code> |
| 1962 | + |
| 1963 | + <dd class=XXX>... |
| 1964 | + |
| 1965 | + <dt><code><a href="#cssnamespacerule">CSSNamespaceRule</a></code> |
| 1966 | + |
| 1967 | + <dd> |
| 1968 | + <p>The literal string "<code>@namespace</code>", followed by a space |
| 1969 | + (U+0020), followed by the <a href="#escape-an-identifier" title="escape |
| 1970 | + an identifier">identifier escaped</a> value of the <code |
| 1971 | + title=dom-CSSNamespaceRule-prefix><a |
| 1972 | + href="#dom-cssnamespacerule-prefix">prefix</a></code> attribute (if |
| 1973 | + any), followed by a space (U+0020) if there is a prefix, followed by the |
| 1974 | + literal string '<code><a href="#url">url("</a></code>' followed by the |
| 1975 | + <a href="#escape-a-string" title="escape a string">string escaped</a> |
| 1976 | + value of the <code title=dom-CSSNamespaceRule-namespaceURI><a |
| 1977 | + href="#dom-cssnamespacerule-namespaceuri">namespaceURI</a></code> |
| 1978 | + attribute, followed by the literal string '<code>");</code>'. |
| 1979 | + </dl> |
1924 | 1980 |
|
1925 | 1981 | <p>The <dfn id=dom-cssrule-parentrule |
1926 | 1982 | title=dom-CSSRule-parentRule><code>parentRule</code></dfn> attribute <em |
1927 | 1983 | class=ct>must</em> return the nearest enclosing rule of the current rule |
1928 | | - or <code>null</code>, if there is no enclosing rule. For example, an <code |
1929 | | - title="">@media</code> block enclosing the current rule. |
| 1984 | + or null, if there is no enclosing rule. |
| 1985 | + |
| 1986 | + <p class=note>E.g. <code title="">@media</code> can enclose a rule. |
1930 | 1987 |
|
1931 | 1988 | <p>The <dfn id=dom-cssrule-parentstylesheet |
1932 | 1989 | title=dom-CSSRule-parentStyleSheet><code>parentStyleSheet</code></dfn> |
@@ -2009,28 +2066,30 @@ <h4 id=css-import-rule><span class=secno>7.2.4. </span>CSS <code |
2009 | 2066 |
|
2010 | 2067 | <p>The <dfn id=dom-cssimportrule-href |
2011 | 2068 | title=dom-CSSImportRule-href><code>href</code></dfn> attribute, on |
2012 | | - getting, <em class=ct>must</em> return the <i>specified</i> <a |
2013 | | - href="#url">URL</a> of the <span>CSS style sheet</span> referenced by the |
2014 | | - <code>@import</code> rule. |
| 2069 | + getting, <em class=ct>must</em> return the <a href="#url">URL</a> |
| 2070 | + specified by the <code>@import</code> rule. |
2015 | 2071 |
|
2016 | | - <p class=XXX>Returning the <span>absolute URL</span> would be much better, |
2017 | | - but only Opera does this at the moment. Convince Gecko/WebKit? |
| 2072 | + <p class=note>To get the resolved <a href="#url">URL</a> use the <code |
| 2073 | + title=dom-StyleSheet-href><a href="#dom-stylesheet-href">href</a></code> |
| 2074 | + attribute of the associated <code><a |
| 2075 | + href="#cssstylesheet">CSSStyleSheet</a></code> object. |
2018 | 2076 |
|
2019 | 2077 | <p>The <dfn id=dom-cssimportrule-media |
2020 | 2078 | title=dom-CSSImportRule-media><code>media</code></dfn> attribute, on |
2021 | | - getting, <em class=ct>must</em> return a <code><a |
2022 | | - href="#medialist">MediaList</a></code> object for the list of media |
2023 | | - queries specified with the <code>@import</code> rule. |
| 2079 | + getting, <em class=ct>must</em> return the value of the <code |
| 2080 | + title=dom-StyleSheet-media><a |
| 2081 | + href="#dom-stylesheet-media">media</a></code> attribute of the associated |
| 2082 | + <code><a href="#cssstylesheet">CSSStyleSheet</a></code> object. |
2024 | 2083 |
|
2025 | 2084 | <p>The <dfn id=dom-cssimportrule-stylesheet |
2026 | 2085 | title=dom-CSSImportRule-stylesheet><code>styleSheet</code></dfn> |
2027 | | - attribute, on getting, <em class=ct>must</em> return the <code><a |
2028 | | - href="#cssstylesheet">CSSStyleSheet</a></code> object that represents the |
2029 | | - referenced (parsed) <span>CSS style sheet</span> from the |
2030 | | - <code>@import</code> rule. |
| 2086 | + attribute, on getting, <em class=ct>must</em> return the associated |
| 2087 | + <code><a href="#cssstylesheet">CSSStyleSheet</a></code> object. |
2031 | 2088 |
|
2032 | 2089 | <p class=note>If loading of the style sheet fails its <code |
2033 | 2090 | title=dom-CSSStyleSheet-cssRules>cssRules</code> list is simply empty. |
| 2091 | + I.e. an <code>@import</code> rule always has an associated <code><a |
| 2092 | + href="#cssstylesheet">CSSStyleSheet</a></code> object. |
2034 | 2093 |
|
2035 | 2094 | <h4 id=css-media-rule><span class=secno>7.2.5. </span>CSS <code |
2036 | 2095 | title="">@media</code> Rule</h4> |
|
0 commit comments