Skip to content

Commit 94de0b2

Browse files
committed
(1) mark nullable attributes as such;
(2) update style sheet;
1 parent 70b8f3d commit 94de0b2

6 files changed

Lines changed: 33 additions & 33 deletions

File tree

cssom-view/cssom.css

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ code {
5252

5353

5454
/* --- EXAMPLES --- */
55-
pre.example {
55+
.example {
5656
border-top: 1px solid #ff4500;
5757
border-bottom: 1px solid #ff4500;
5858
padding: 1em;
59-
margin-top: 1em;
59+
margin: 2em 0;
6060
}
6161

62-
pre.example::before {
62+
.example::before {
6363
content: "Example";
6464
display: block;
6565
width: 150px;
@@ -74,7 +74,6 @@ pre.example::before {
7474
/* --- EDITORIAL NOTES --- */
7575
.issue {
7676
padding: 1em;
77-
margin: 1em 0em 0em;
7877
border: 1px solid #f00;
7978
background: #ffc;
8079
}
@@ -91,7 +90,6 @@ pre.example::before {
9190
}
9291

9392
.note {
94-
margin: 1em 0em 0em;
9593
padding: 1em;
9694
border: 2px solid #cff6d9;
9795
background: #e2fff0;

cssom/Overview.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h1 id="cssom">CSS Object Model (CSSOM)</h1>
1818

1919
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
2020

21-
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 3 August 2012</h2>
21+
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 11 August 2012</h2>
2222

2323
<dl>
2424

@@ -83,7 +83,7 @@ <h2 class="no-num no-toc" id="sotd">Status of this Document</h2>
8383
can be found in the
8484
<a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em>
8585

86-
<p class="dontpublish">This is the 3 August 2012 Editor's Draft of CSSOM. Please send comments to
86+
<p class="dontpublish">This is the 11 August 2012 Editor's Draft of CSSOM. Please send comments to
8787
<a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a>
8888
(<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
8989
with <samp>[cssom]</samp> at the start of the subject line.
@@ -885,10 +885,10 @@ <h4 id="the-stylesheet-interface"><span class="secno">6.1.1 </span>The <code>Sty
885885
<p>The <code>StyleSheet</code> interface represents an abstract, base style sheet.</p>
886886
<pre class="idl"><span class="idlInterface" id="widl-def-StyleSheet">interface <span class="idlInterfaceID">StyleSheet</span> {
887887
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-type">type</a></span>;</span>
888-
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-href">href</a></span>;</span>
888+
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-StyleSheet-href">href</a></span>;</span>
889889
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>Node</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-ownerNode">ownerNode</a></span>;</span>
890-
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>StyleSheet</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-parentStyleSheet">parentStyleSheet</a></span>;</span>
891-
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-title">title</a></span>;</span>
890+
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>StyleSheet</a>?</span> <span class="idlAttrName"><a href="#widl-StyleSheet-parentStyleSheet">parentStyleSheet</a></span>;</span>
891+
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a>?</span> <span class="idlAttrName"><a href="#widl-StyleSheet-title">title</a></span>;</span>
892892
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>MediaList</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-media">media</a></span>;</span>
893893
<span class="idlAttribute"> attribute <span class="idlAttrType"><a>boolean</a></span> <span class="idlAttrName"><a href="#widl-StyleSheet-disabled">disabled</a></span>;</span>
894894
};</span></pre>
@@ -900,23 +900,23 @@ <h4 id="the-stylesheet-interface"><span class="secno">6.1.1 </span>The <code>Sty
900900
<dt class="attribute" id="widl-StyleSheet-href">
901901
<code>href</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt>
902902
<dd>
903-
<p>The <code>href</code> attribute must return the <a href="#style-sheet-location">style sheet location</a>.</dd>
903+
<p>The <code>href</code> attribute must return the <a href="#style-sheet-location">style sheet location</a> or null if none.</p> <p class="issue">What should the default value be if not known or specified upon creation? an empty string or null?</dd>
904904
<dt class="attribute" id="widl-StyleSheet-ownerNode">
905905
<code>ownerNode</code> of type <span class="idlAttrType"><a>Node</a></span>, readonly</dt>
906906
<dd>
907-
<p>The <code>ownerNode</code> attribute must return the <a href="#style-sheet-owner-node">style sheet owner node</a>.</dd>
907+
<p>The <code>ownerNode</code> attribute must return the <a href="#style-sheet-owner-node">style sheet owner node</a>.</p> <p class="issue">Should <code>ownerNode</code> be nullable?</dd>
908908
<dt class="attribute" id="widl-StyleSheet-parentStyleSheet">
909909
<code>parentStyleSheet</code> of type <span class="idlAttrType"><a>StyleSheet</a></span>, readonly</dt>
910910
<dd>
911-
<p>The <code>parentStyleSheet</code> attribute must return the <a href="#style-sheet-parent">style sheet parent</a>.</dd>
911+
<p>The <code>parentStyleSheet</code> attribute must return the <a href="#style-sheet-parent">style sheet parent</a> or null if there is none.</dd>
912912
<dt class="attribute" id="widl-StyleSheet-title">
913913
<code>title</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt>
914914
<dd>
915-
<p>The <code>title</code> attribute must return the <a href="#style-sheet-title">style sheet title</a>.</dd>
915+
<p>The <code>title</code> attribute must return the <a href="#style-sheet-title">style sheet title</a> or null if none.</p> <p class="issue">What should the default value be if not known or specified upon creation? an empty string or null?</dd>
916916
<dt class="attribute" id="widl-StyleSheet-media">
917917
<code>media</code> of type <span class="idlAttrType"><a>MediaList</a></span>, readonly</dt>
918918
<dd>
919-
<p>The <code>media</code> attribute must return the <a href="#style-sheet-media">style sheet media</a>.</dd>
919+
<p>The <code>media</code> attribute must return the <a href="#style-sheet-media">style sheet media</a>.</p> <p class="issue">Should <code>media</code> be nullable?</p> <p class="issue">Need to define a setter that implements the semantics of setting this attribute to a string representing a MediaList.</dd>
920920
<dt class="attribute" id="widl-StyleSheet-disabled">
921921
<code>disabled</code> of type <span class="idlAttrType"><a>boolean</a></span></dt>
922922
<dd>
@@ -930,7 +930,7 @@ <h4 id="the-cssstylesheet-interface"><span class="secno">6.1.2 </span>The <code>
930930

931931
<p>The <code>CSSStyleSheet</code> interface represents a CSS <a href="#style-sheet">style sheet</a> rule.</p>
932932
<pre class="idl"><span class="idlInterface" id="widl-def-CSSStyleSheet">interface <span class="idlInterfaceID">CSSStyleSheet</span> {
933-
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRule</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleSheet-ownerRule">ownerRule</a></span>;</span>
933+
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRule</a>?</span> <span class="idlAttrName"><a href="#widl-CSSStyleSheet-ownerRule">ownerRule</a></span>;</span>
934934
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRuleList</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleSheet-cssRules">cssRules</a></span>;</span>
935935
<span class="idlMethod"> <span class="idlMethType"><a>unsigned long</a></span> <span class="idlMethName"><a href="#widl-CSSStyleSheet-insertRule-unsigned-long-DOMString-rule-unsigned-long-index">insertRule</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">rule</span></span>, <span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span>
936936
<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-CSSStyleSheet-deleteRule-void-unsigned-long-index">deleteRule</a></span> (<span class="idlParam"><span class="idlParamType"><a>unsigned long</a></span> <span class="idlParamName">index</span></span>);</span>
@@ -939,7 +939,7 @@ <h4 id="the-cssstylesheet-interface"><span class="secno">6.1.2 </span>The <code>
939939
<dt class="attribute" id="widl-CSSStyleSheet-ownerRule">
940940
<code>ownerRule</code> of type <span class="idlAttrType"><a>CSSRule</a></span>, readonly</dt>
941941
<dd>
942-
<p>The <code>ownerRule</code> attribute must return the <a href="#style-sheet-owner-css-rule">style sheet owner CSS rule</a>.</dd>
942+
<p>The <code>ownerRule</code> attribute must return the <a href="#style-sheet-owner-css-rule">style sheet owner CSS rule</a> or null if none.</dd>
943943
<dt class="attribute" id="widl-CSSStyleSheet-cssRules">
944944
<code>cssRules</code> of type <span class="idlAttrType"><a>CSSRuleList</a></span>, readonly</dt>
945945
<dd>
@@ -1856,7 +1856,7 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
18561856
<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-getPropertyPriority-DOMString-DOMString-property">getPropertyPriority</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>);</span>
18571857
<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-setProperty-void-DOMString-property-DOMString-value-DOMString-priority">setProperty</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">value</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">priority</span></span>);</span>
18581858
<span class="idlMethod"> <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-CSSStyleDeclaration-removeProperty-DOMString-DOMString-property">removeProperty</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>);</span>
1859-
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRule</a></span> <span class="idlAttrName"><a href="#widl-CSSStyleDeclaration-parentRule">parentRule</a></span>;</span>
1859+
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSRule</a>?</span> <span class="idlAttrName"><a href="#widl-CSSStyleDeclaration-parentRule">parentRule</a></span>;</span>
18601860
};</span></pre>
18611861
<dl class="attributes">
18621862
<dt class="attribute" id="widl-CSSStyleDeclaration-cssText">

cssom/cssom.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ code {
7474
/* --- EDITORIAL NOTES --- */
7575
.issue {
7676
padding: 1em;
77-
margin: 1em 0em 0em;
7877
border: 1px solid #f00;
7978
background: #ffc;
8079
}
@@ -91,7 +90,6 @@ code {
9190
}
9291

9392
.note {
94-
margin: 1em 0em 0em;
9593
padding: 1em;
9694
border: 2px solid #cff6d9;
9795
background: #e2fff0;

cssom/idl/CSSStyleDeclaration.idl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ interface CSSStyleDeclaration {
8585
"<p>The {@name} {@type} must return the <code>CSSrule</code> object the <code>CSSStyleDeclaration</code> is object is associated with\
8686
or null if it is not associated with a <code>CSSrule</code> object.</p>"
8787
]
88-
readonly attribute CSSRule parentRule;
88+
readonly attribute CSSRule? parentRule;
8989

9090
};

cssom/idl/CSSStyleSheet.idl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
interface CSSStyleSheet : StyleSheet {
1111

1212
[Documentation=
13-
"<p>The {@name} {@type} must return the <span>style sheet owner CSS rule</span>.</p>"
13+
"<p>The {@name} {@type} must return the <span>style sheet owner CSS rule</span> or null if none.</p>"
1414
]
15-
readonly attribute CSSRule ownerRule;
15+
readonly attribute CSSRule? ownerRule;
1616

1717
[Documentation=
1818
"<p>The {@name} {@type} must return a <code>CSSRuleList</code> object representing the <span>style\

cssom/idl/StyleSheet.idl

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,32 @@ interface StyleSheet {
1515
readonly attribute DOMString type;
1616

1717
[Documentation=
18-
"<p>The {@name} {@type} must return the <span>style sheet location</span>.</p>"
18+
"<p>The {@name} {@type} must return the <span>style sheet location</span> or null if none.</p>\
19+
<p class='issue'>What should the default value be if not known or specified upon creation? an empty string or null?</p>"
1920
]
20-
readonly attribute DOMString href;
21+
readonly attribute DOMString? href;
2122

2223
[Documentation=
23-
"<p>The {@name} {@type} must return the <span>style sheet owner node</span>.</p>"
24+
"<p>The {@name} {@type} must return the <span>style sheet owner node</span>.</p>\
25+
<p class='issue'>Should {@name} be nullable?</p>"
2426
]
2527
readonly attribute Node ownerNode;
2628

2729
[Documentation=
28-
"<p>The {@name} {@type} must return the <span>style sheet parent</span>.</p>"
30+
"<p>The {@name} {@type} must return the <span>style sheet parent</span> or null if there is none.</p>"
2931
]
30-
readonly attribute StyleSheet parentStyleSheet;
32+
readonly attribute StyleSheet? parentStyleSheet;
3133

3234
[Documentation=
33-
"<p>The {@name} {@type} must return the <span>style sheet title</span>.</p>"
35+
"<p>The {@name} {@type} must return the <span>style sheet title</span> or null if none.</p>\
36+
<p class='issue'>What should the default value be if not known or specified upon creation? an empty string or null?</p>"
3437
]
35-
readonly attribute DOMString title;
38+
readonly attribute DOMString? title;
3639

37-
[PutForwards=mediaText, // [GA] there is no mediaText attribute!
38-
Documentation=
39-
"<p>The {@name} {@type} must return the <span>style sheet media</span>.</p>"
40+
[Documentation=
41+
"<p>The {@name} {@type} must return the <span>style sheet media</span>.</p>\
42+
<p class='issue'>Should {@name} be nullable?</p>\
43+
<p class='issue'>Need to define a setter that implements the semantics of setting this attribute to a string representing a MediaList.</p>"
4044
]
4145
readonly attribute MediaList media;
4246

0 commit comments

Comments
 (0)