Skip to content

Commit 5ac3d30

Browse files
author
Simon Pieters
committed
[cssom] Make MediaList constructor normative. Also editorial fixes.
--HG-- extra : rebase_source : 62ce8e1791434da389d286278e8358ab0579f567
1 parent 8a47839 commit 5ac3d30

2 files changed

Lines changed: 52 additions & 42 deletions

File tree

cssom/Overview.html

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -569,14 +569,14 @@ <h3 id="the-medialist-interface"><span class="secno">4.4 </span>The <code title=
569569
in the <a href="#collection-of-media-queries">collection of media queries</a> represented by the collection. If there are no such media queries, then there are no
570570
<a class="external" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-supported-property-indices">supported property indices</a>.
571571

572-
<p>When the <dfn id="dom-medialist" title="dom-MediaList"><code>MediaList(<var title="">text</var>)</code></dfn> constructor is invoked, run these steps:</p>
572+
<p>When the <dfn id="dom-medialist" title="dom-MediaList"><code>MediaList(<var title="">text</var>)</code></dfn> constructor is invoked, these steps must be run:</p>
573573
<ol>
574574
<li><p>Create a new <code><a href="#medialist">MediaList</a></code> object.</li>
575575
<li><p>Set its <code title="dom-MediaList-mediaText"><a href="#dom-medialist-mediatext">mediaText</a></code> attribute to <var title="">text</var>.</li>
576576
<li><p>Return the newly created <code><a href="#medialist">MediaList</a></code> object.</li>
577577
</ol>
578578

579-
<p>The <dfn id="dom-medialist-mediatext" title="dom-MediaList-mediaText"><code>mediaText</code></dfn> attribute must return a <a href="#serialize-a-media-query-list" title="serialize a media query list">serialization</a>
579+
<p>The <dfn id="dom-medialist-mediatext" title="dom-MediaList-mediaText"><code>mediaText</code></dfn> attribute, on getting, must return a <a href="#serialize-a-media-query-list" title="serialize a media query list">serialization</a>
580580
of the <a href="#collection-of-media-queries">collection of media queries</a>.</p>
581581
<p>Setting the <code title="dom-MediaList-mediaText"><a href="#dom-medialist-mediatext">mediaText</a></code> attribute must run these steps:
582582
<ol>
@@ -959,7 +959,7 @@ <h4 id="the-stylesheet-interface"><span class="secno">6.1.1 </span>The <code tit
959959
<p class="XXX">Need to define a setter that implements the semantics of setting this attribute to a string representing a MediaList.</p>
960960

961961
<p>The <dfn id="dom-stylesheet-disabled" title="dom-StyleSheet-disabled"><code>disabled</code></dfn> attribute, on getting, must return true if the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a>
962-
is set, or false otherwise. On setting, it must set the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a>
962+
is set, or false otherwise. On setting, the <code title="dom-StyleSheet-disabled"><a href="#dom-stylesheet-disabled">disabled</a></code> attribute must set the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a>
963963
if the new value is true, or unset the <a href="#style-sheet-disabled-flag">style sheet disabled flag</a> otherwise.</p>
964964

965965

@@ -1236,7 +1236,7 @@ <h4 id="extensions-to-the-document-interface"><span class="secno">6.2.3 </span>E
12361236
<p class="note">Because of historical IDL limitations the <code title="dom-Document-styleSheets"><a href="#dom-document-stylesheets">styleSheets</a></code> attribute
12371237
used to be on a separate interface, <code>DocumentStyle</code>.</p>
12381238

1239-
<p>The <dfn id="dom-document-selectedstylesheetset" title="dom-Document-selectedStyleSheetSet"><code>selectedStyleSheetSet</code></dfn> attribute must, on getting, must run these steps:</p>
1239+
<p>The <dfn id="dom-document-selectedstylesheetset" title="dom-Document-selectedStyleSheetSet"><code>selectedStyleSheetSet</code></dfn> attribute, on getting, must run these steps:</p>
12401240
<ol>
12411241
<li><p>If there is a single <a href="#enabled-style-sheet-set">enabled style sheet set</a> and no
12421242
other <a href="#document-style-sheets">document style sheets</a> with a non-empty
@@ -1886,26 +1886,27 @@ <h4 id="the-cssstylerule-interface"><span class="secno">6.4.3 </span>The <code t
18861886

18871887
<h4 id="the-csscharsetrule-interface"><span class="secno">6.4.4 </span>The <code title="">CSSCharsetRule</code> Interface</h4>
18881888

1889-
<p>The <code><a href="#csscharsetrule">CSSCharsetRule</a></code> interface represents an <code>@charset</code> rule.</p>
1889+
<p>The <code><a href="#csscharsetrule">CSSCharsetRule</a></code> interface represents an <code>@charset</code> at-rule.</p>
18901890

18911891
<pre class="idl">interface <dfn id="csscharsetrule">CSSCharsetRule</dfn> : <a href="#cssrule">CSSRule</a> {
18921892
attribute DOMString <a href="#dom-csscharsetrule-encoding" title="dom-CSSCharsetRule-encoding">encoding</a>;
18931893
};</pre>
18941894

1895-
<p>The <dfn id="dom-csscharsetrule-encoding" title="dom-CSSCharsetRule-encoding"><code>encoding</code></dfn> must return the encoding information specified by the <code>@charset</code> rule.</p>
1895+
<p>The <dfn id="dom-csscharsetrule-encoding" title="dom-CSSCharsetRule-encoding"><code>encoding</code></dfn> attribute must return the encoding information specified by the <code>@charset</code>
1896+
at-rule.</p>
18961897

18971898

18981899
<h4 id="the-cssimportrule-interface"><span class="secno">6.4.5 </span>The <code title="">CSSImportRule</code> Interface</h4>
18991900

1900-
<p>The <code><a href="#cssimportrule">CSSImportRule</a></code> interface represents an <code>@import</code> rule.</p>
1901+
<p>The <code><a href="#cssimportrule">CSSImportRule</a></code> interface represents an <code>@import</code> at-rule.</p>
19011902

19021903
<pre class="idl">interface <dfn id="cssimportrule">CSSImportRule</dfn> : <a href="#cssrule">CSSRule</a> {
19031904
readonly attribute DOMString <a href="#dom-cssimportrule-href" title="dom-CSSImportRule-href">href</a>;
19041905
[PutForwards=mediaText] readonly attribute <a href="#medialist">MediaList</a> <a href="#dom-cssimportrule-media" title="dom-CSSImportRule-media">media</a>;
19051906
readonly attribute <a href="#cssstylesheet">CSSStyleSheet</a> <a href="#dom-cssimportrule-stylesheet" title="dom-CSSImportRule-styleSheet">styleSheet</a>;
19061907
};</pre>
19071908

1908-
<p>The <dfn id="dom-cssimportrule-href" title="dom-CSSImportRule-href"><code>href</code></dfn> attribute must return the <a class="external" href="http://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a> specified by the <code>@import</code> rule.</p>
1909+
<p>The <dfn id="dom-cssimportrule-href" title="dom-CSSImportRule-href"><code>href</code></dfn> attribute must return the <a class="external" href="http://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a> specified by the <code>@import</code> at-rule.</p>
19091910
<p class="note">To get the resolved <a class="external" href="http://url.spec.whatwg.org/#concept-url" title="concept-url">URL</a> use the <code title="dom-StyleSheet-href"><a href="#dom-stylesheet-href">href</a></code>
19101911
attribute of the associated <span>style sheet</span>.</p>
19111912

@@ -1914,12 +1915,12 @@ <h4 id="the-cssimportrule-interface"><span class="secno">6.4.5 </span>The <code
19141915

19151916
<p>The <dfn id="dom-cssimportrule-stylesheet" title="dom-CSSImportRule-styleSheet"><code>styleSheet</code></dfn> attribute must return the associated <span>style sheet</span>.</p>
19161917
<p class="note">If loading of the style sheet fails its <code title="dom-CSSStyleSheet-cssRules"><a href="#dom-cssstylesheet-cssrules">cssRules</a></code>
1917-
list is simply empty, i.e., an <code>@import</code> rule always has an associated <span>style sheet</span>.</p>
1918+
list is simply empty, i.e., an <code>@import</code> at-rule always has an associated <span>style sheet</span>.</p>
19181919

19191920

19201921
<h4 id="the-cssmediarule-interface"><span class="secno">6.4.6 </span>The <code title="">CSSMediaRule</code> Interface</h4>
19211922

1922-
<p>The <code><a href="#cssmediarule">CSSMediaRule</a></code> interface represents a <code>@media</code> rule.</p>
1923+
<p>The <code><a href="#cssmediarule">CSSMediaRule</a></code> interface represents a <code>@media</code> at-rule.</p>
19231924

19241925
<pre class="idl">interface <dfn id="cssmediarule">CSSMediaRule</dfn> : <a href="#cssrule">CSSRule</a> {
19251926
[PutForwards=mediaText] readonly attribute <a href="#medialist">MediaList</a> <a href="#dom-cssmediarule-media" title="dom-CSSMediaRule-media">media</a>;
@@ -1929,10 +1930,10 @@ <h4 id="the-cssmediarule-interface"><span class="secno">6.4.6 </span>The <code t
19291930
};</pre>
19301931

19311932
<p>The <dfn id="dom-cssmediarule-media" title="dom-CSSMediaRule-media"><code>media</code></dfn> attribute must return a <code><a href="#medialist">MediaList</a></code> object for the list of media queries specified
1932-
with the <code>@media</code> rule.</p>
1933+
with the <code>@media</code> at-rule.</p>
19331934

19341935
<p>The <dfn id="dom-cssmediarule-cssrules" title="dom-CSSMediaRule-cssRules"><code>cssRules</code></dfn> attribute must return a <code><a href="#cssrulelist">CSSRuleList</a></code> object for the list of CSS rules specified
1935-
with the <code>@media</code> rule.</p>
1936+
with the <code>@media</code> at-rule.</p>
19361937

19371938
<p>The <dfn id="dom-cssmediarule-insertrule" title="dom-CSSMediaRule-insertRule"><code>insertRule(<var title="">rule</var>, <var title="">index</var>)</code></dfn> method must <a href="#insert-a-css-rule">insert a CSS rule</a> <var title="">rule</var> into the CSS rule list
19381939
returned by <code title="dom-CSSMediaRule-cssRules"><a href="#dom-cssmediarule-cssrules">cssRules</a></code> at <var title="">index</var>.</p>
@@ -1943,19 +1944,19 @@ <h4 id="the-cssmediarule-interface"><span class="secno">6.4.6 </span>The <code t
19431944

19441945
<h4 id="the-cssfontfacerule-interface"><span class="secno">6.4.7 </span>The <code title="">CSSFontFaceRule</code> Interface</h4>
19451946

1946-
<p>The <code><a href="#cssfontfacerule">CSSFontFaceRule</a></code> interface represents a <code>@font-face</code> rule.</p>
1947+
<p>The <code><a href="#cssfontfacerule">CSSFontFaceRule</a></code> interface represents a <code>@font-face</code> at-rule.</p>
19471948

19481949
<pre class="idl">interface <dfn id="cssfontfacerule">CSSFontFaceRule</dfn> : <a href="#cssrule">CSSRule</a> {
19491950
[PutForwards=cssText] readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-cssfontfacerule-style" title="dom-CSSFontFaceRule-style">style</a>;
19501951
};</pre>
19511952

19521953
<p>The <dfn id="dom-cssfontfacerule-style" title="dom-CSSFontFaceRule-style"><code>style</code></dfn> attribute must return a <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> block that contains the property
1953-
declarations specified within the <code>@font-face</code> rule.</p>
1954+
declarations specified within the <code>@font-face</code> at-rule.</p>
19541955

19551956

19561957
<h4 id="the-csspagerule-interface"><span class="secno">6.4.8 </span>The <code title="">CSSPageRule</code> Interface</h4>
19571958

1958-
<p>The <code><a href="#csspagerule">CSSPageRule</a></code> interface represents a <code>@page</code> rule.</p>
1959+
<p>The <code><a href="#csspagerule">CSSPageRule</a></code> interface represents a <code>@page</code> at-rule.</p>
19591960
<p class="note">Need to define the rules for
19601961
<dfn id="parse-a-css-page-selector">parse a CSS page selector</dfn> and
19611962
<dfn id="serialize-a-css-page-selector">serialize a CSS page selector</dfn>.</p>
@@ -1974,20 +1975,22 @@ <h4 id="the-csspagerule-interface"><span class="secno">6.4.8 </span>The <code ti
19741975
<li><p>Otherwise, if the algorithm returns a null value, do nothing.</li>
19751976
</ol>
19761977

1977-
<p>The <dfn id="dom-csspagerule-style" title="dom-CSSPageRule-style"><code>style</code></dfn> attribute must return a <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> for the <code>@page</code> rule.</p>
1978+
<p>The <dfn id="dom-csspagerule-style" title="dom-CSSPageRule-style"><code>style</code></dfn> attribute must return a <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> for the <code>@page</code> at-rule.</p>
19781979

19791980

19801981
<h4 id="the-cssnamespacerule-interface"><span class="secno">6.4.9 </span>The <code title="">CSSNamespaceRule</code> Interface</h4>
19811982

1982-
<p>The <code><a href="#cssnamespacerule">CSSNamespaceRule</a></code> interface represents a <code>@namespace</code> rule.</p>
1983+
<p>The <code><a href="#cssnamespacerule">CSSNamespaceRule</a></code> interface represents a <code>@namespace</code> at-rule.</p>
19831984

19841985
<pre class="idl">interface <dfn id="cssnamespacerule">CSSNamespaceRule</dfn> : <a href="#cssrule">CSSRule</a> {
19851986
[TreatNullAs=EmptyString] attribute DOMString namespaceURI;
19861987
[TreatNullAs=EmptyString] attribute DOMString prefix;
19871988
};</pre>
19881989

19891990
<p>The <dfn id="dom-cssnamespacerule-namespaceuri" title="dom-CSSNamespaceRule-namespaceURI"><code>namespaceURI</code></dfn> attribute, on getting, must return the namespace of the
1990-
<code>@namespace</code> rule. On setting, the <code title="dom-CSSNamespaceRule-namespaceURI"><a href="#dom-cssnamespacerule-namespaceuri">namespaceURI</a></code> attribute must run the following steps:</p>
1991+
<code>@namespace</code> at-rule.
1992+
1993+
<p>On setting, the <code title="dom-CSSNamespaceRule-namespaceURI"><a href="#dom-cssnamespacerule-namespaceuri">namespaceURI</a></code> attribute must run the following steps:</p>
19911994

19921995
<ol>
19931996
<li><p>Let <var title="">style sheet</var> be the value returned by <code title="dom-CSSRule-parentStyleSheet"><a href="#dom-cssrule-parentstylesheet">parentStyleSheet</a></code>.
@@ -1999,8 +2002,10 @@ <h4 id="the-cssnamespacerule-interface"><span class="secno">6.4.9 </span>The <co
19992002
<li><p>Set the namespace of the <code title="">@namespace</code> at-rule to the given value.
20002003
</ol>
20012004

2002-
<p>The <dfn id="dom-cssnamespacerule-prefix" title="dom-CSSNamespaceRule-prefix"><code>prefix</code></dfn> attribute must return the prefix of the <code>@namespace</code> rule or the
2003-
empty string if there is no prefix. On setting, the <code title="dom-CSSNamespaceRule-prefix"><a href="#dom-cssnamespacerule-prefix">prefix</a></code> attribute must run the following steps:</p>
2005+
<p>The <dfn id="dom-cssnamespacerule-prefix" title="dom-CSSNamespaceRule-prefix"><code>prefix</code></dfn> attribute must return the prefix of the <code>@namespace</code> at-rule or the
2006+
empty string if there is no prefix.
2007+
2008+
<p>On setting, the <code title="dom-CSSNamespaceRule-prefix"><a href="#dom-cssnamespacerule-prefix">prefix</a></code> attribute must run the following steps:</p>
20042009

20052010
<ol>
20062011
<li><p>Let <var title="">style sheet</var> be the value returned by <code title="dom-CSSRule-parentStyleSheet"><a href="#dom-cssrule-parentstylesheet">parentStyleSheet</a></code>.
@@ -2679,7 +2684,7 @@ <h3 id="extensions-to-the-element-interface"><span class="secno">7.4 </span>Exte
26792684
<a class="external" href="http://dom.spec.whatwg.org/#element">Element</a> implements <a href="#getstyleutils">GetStyleUtils</a>;</pre>
26802685

26812686
<!--ATRISK-->
2682-
<p>The <dfn id="dom-element-pseudo" title="dom-Element-pseudo"><code>pseudo</code></dfn> attribute must run the following steps:
2687+
<p>The <dfn id="dom-element-pseudo" title="dom-Element-pseudo"><code>pseudo(<var title="">pseudoElt</var>)</code></dfn> method, when invoked, must run the following steps:
26832688
<ol>
26842689
<li><p>If <var title="">pseudoElt</var> is as an <a class="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for either '<code>:before</code>' or
26852690
'<code>::before</code>' return the <code><a href="#pseudoelement">PseudoElement</a></code> representing the '::before' pseudo-element of the <a class="external" href="http://dom.spec.whatwg.org/#context-object">context

0 commit comments

Comments
 (0)