Skip to content

Commit e616f66

Browse files
committed
define CSSStyleDeclaration.cssText setting and fix some typos; also fix selectorText for page selectors
1 parent 708efbb commit e616f66

2 files changed

Lines changed: 72 additions & 38 deletions

File tree

cssom/Overview.html

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h2 class="no-num no-toc" id="">Editor's draft <!--W3C Working Draft--> 24
4242
<dt>This version:
4343

4444
<dd><a
45-
href="http://www.w3.org/TR/2007/WD-cssom-20070224">http://www.w3.org/TR/2007/WD-cssom-20070224/</a>
45+
href="http://www.w3.org/TR/2007/WD-cssom-20070224/">http://www.w3.org/TR/2007/WD-cssom-20070224/</a>
4646

4747
<dt>Latest version:
4848

@@ -1184,10 +1184,10 @@ <h3 id=processing><span class=secno>3.1. </span>Processing CSS Statements</h3>
11841184
<var>rule</var>. Let <var>object</var> be the newly created object.
11851185

11861186
<li>If the <code title=cssrule-type><a
1187-
href="#cssrule-type">type</a></code> of new <var>object</var> doesn't
1188-
match the <code title=cssrule-type><a
1189-
href="#cssrule-type">type</a></code> of the object it will replace raise
1190-
an <code>INVALID_MODIFICATION_ERR</code> exception.
1187+
href="#cssrule-type">type</a></code> of <var>object</var> does not match
1188+
the <code title=cssrule-type><a href="#cssrule-type">type</a></code> of
1189+
<var>old object</var> it will replace user agents <em class=ct>must</em>
1190+
raise an <code>INVALID_MODIFICATION_ERR</code> exception.
11911191

11921192
<li>Replace <var>old object</var> with <var>object</var>.
11931193
</ol>
@@ -1575,13 +1575,14 @@ <h4 id=the-csspagerule><span class=secno>3.4.7. </span>The <code><a
15751575
<code>DOMString</code>
15761576

15771577
<dd>
1578+
<p>On setting, user agents <em class=ct>must</em> parse the given string
1579+
as a page selector. If the given string is ignored user agents <em
1580+
class=ct>must</em> act as if setting didn't occur. Otherwise, set the
1581+
attribute to the parsed string.</p>
1582+
15781583
<p>On getting, this attribute <em class=ct>must</em> contain a live
15791584
textual representation of the page selector for the rule.</p>
15801585

1581-
<p>On setting, a <code>SYNTAX_ERR</code> exception <em class=ct>must</em>
1582-
be raised if the page selector was not parsable. Otherwise, it <em
1583-
class=ct>must</em> be set to the specified value.</p>
1584-
15851586
<p class=issue>We need to define normalization...</p>
15861587

15871588
<dt><dfn id=csspagerule-style
@@ -1747,29 +1748,45 @@ <h4 id=the-cssstyledeclaration><span class=secno>3.6.1. </span>The <code><a
17471748
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> Interface</h4>
17481749

17491750
<p>The <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code>
1750-
interface gives access to read and manipulate CSS property values within a
1751-
declaration block.
1751+
interface gives access to read and manipulate CSS properties and their
1752+
values within a declaration block.
1753+
1754+
<p class=issue><code><a
1755+
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> comes in
1756+
several forms. It can represent computed values and used values. It can
1757+
also be readonly depending on the accessor. (This also goes for interfaces
1758+
implemented on top of <code><a
1759+
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> objects
1760+
obviously.)
17521761

17531762
<pre
17541763
class=idl>interface <dfn id=cssstyledeclaration>CSSStyleDeclaration</dfn> {
17551764
attribute DOMString <a href="#csstext" title=cssstyledeclaration-csstext>cssText</a>;
1756-
DOMString <span title=cssstyledeclaration-getpropertyvalue>getPropertyValue</span>(in DOMString <var title="">propertyName</var>);
1757-
DOMString <span title=cssstyledeclaration-removeproperty>removeProperty</span>(in DOMString <var title="">propertyName</var>);
1758-
DOMString <span title=cssstyledeclaration-getpropertypriority>getPropertyPriority</span>(in DOMString <var title="">propertyName</var>);
1759-
void <span title=cssstyledeclaration-setproperty>setProperty</span>(in DOMString <var title="">propertyName</var>, in DOMString <var title="">value</var>);
1760-
void <span title=cssstyledeclaration-setproperty>setProperty</span>(in DOMString <var title="">propertyName</var>, in DOMString <var title="">value</var>, in DOMString <var title="">priority</var>);
1765+
DOMString <span title=cssstyledeclaration-getpropertyvalue>getPropertyValue</span>(in DOMString <var title="">property</var>);
1766+
DOMString <span title=cssstyledeclaration-removeproperty>removeProperty</span>(in DOMString <var title="">property</var>);
1767+
DOMString <span title=cssstyledeclaration-getpropertypriority>getPropertyPriority</span>(in DOMString <var title="">property</var>);
1768+
void <span title=cssstyledeclaration-setproperty>setProperty</span>(in DOMString <var title="">property</var>, in DOMString <var title="">value</var>);
1769+
void <span title=cssstyledeclaration-setproperty>setProperty</span>(in DOMString <var title="">property</var>, in DOMString <var title="">value</var>, in DOMString <var title="">priority</var>);
17611770
readonly attribute unsigned long <span title=cssstyledeclaration-length>length</span>;
17621771
DOMString <span title=cssstyledeclaration-item>item</span>(in unsigned long <var title="">index</var>);
17631772
readonly attribute <a href="#cssrule">CSSRule</a> <span title=cssstyledeclaration-parentrule>parentRule</span>;
17641773
};</pre>
17651774

1775+
<p class=issue>...
1776+
17661777
<dl class=members>
1767-
<dt><dfn id=csstext title=cssstyledeclaration-csstext>cssText</dfn>
1778+
<dt><dfn id=csstext
1779+
title=cssstyledeclaration-csstext><code>cssText</code></dfn>
17681780

1769-
<dd>...
1770-
</dl>
1781+
<dd>
1782+
<p>On setting, user agents <em class=ct>must</em> remove all properties
1783+
currently set on the object and then parse the given string as the
1784+
contents of a declaration block and set each property / value pair that
1785+
is not ignored on the <code><a
1786+
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> block.</p>
17711787

1772-
<p class=issue>...
1788+
<p>On getting, <span class=issue>...</span>.</p>
1789+
</dl>
17731790

17741791
<h4 id=css-properties><span class=secno>3.6.2. </span>CSS Properties</h4>
17751792

cssom/Overview.src.html

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h2 class="no-num no-toc" id="">Editor's draft <!--W3C Working Draft--> [DATE: 3
4242

4343
<dt>This version:</dt>
4444

45-
<dd><a href="[VERSION]">http://www.w3.org/TR/[YEAR]/WD-cssom-[CDATE]/</a></dd>
45+
<dd><a href="[VERSION]/">http://www.w3.org/TR/[YEAR]/WD-cssom-[CDATE]/</a></dd>
4646

4747
<dt>Latest version:</dt>
4848

@@ -866,9 +866,10 @@ <h3>Processing CSS Statements</h3>
866866
of <code>CSSStyle</code> appropriate for the parsed <var>rule</var>. Let
867867
<var>object</var> be the newly created object.</li>
868868

869-
<li>If the <code title="cssrule-type">type</code> of new <var>object</var>
870-
doesn't match the <code title="cssrule-type">type</code> of the object it
871-
will replace raise an <code>INVALID_MODIFICATION_ERR</code> exception.</li>
869+
<li>If the <code title="cssrule-type">type</code> of <var>object</var> does
870+
not match the <code title="cssrule-type">type</code> of <var>old
871+
object</var> it will replace user agents <em class="ct">must</em> raise an
872+
<code>INVALID_MODIFICATION_ERR</code> exception.</li>
872873

873874
<li>Replace <var>old object</var> with <var>object</var>.</li>
874875
</ol>
@@ -1216,11 +1217,14 @@ <h4>The <code>CSSPageRule</code> Interface</h4>
12161217
of type <code>DOMString</code></dt>
12171218

12181219
<dd>
1220+
<p>On setting, user agents <em class="ct">must</em> parse the given string
1221+
as a page selector. If the given string is ignored user agents
1222+
<em class="ct">must</em> act as if setting didn't occur. Otherwise, set
1223+
the attribute to the parsed string.</p>
1224+
12191225
<p>On getting, this attribute <em class="ct">must</em> contain a live
1220-
textual representation of the page selector for the rule.</p>
1221-
<p>On setting, a <code>SYNTAX_ERR</code> exception <em class="ct">must</em>
1222-
be raised if the page selector was not parsable. Otherwise, it
1223-
<em class="ct">must</em> be set to the specified value.</p>
1226+
textual representation of the page selector for the rule.</p>
1227+
12241228
<p class="issue">We need to define normalization...</p>
12251229
</dd>
12261230

@@ -1374,26 +1378,39 @@ <h3>Declaration blocks</h3>
13741378
<h4>The <code>CSSStyleDeclaration</code> Interface</h4>
13751379

13761380
<p>The <code>CSSStyleDeclaration</code> interface gives access to read and
1377-
manipulate CSS property values within a declaration block.</p>
1381+
manipulate CSS properties and their values within a declaration block.</p>
1382+
1383+
<p class="issue"><code>CSSStyleDeclaration</code> comes in several forms. It
1384+
can represent computed values and used values. It can also be readonly
1385+
depending on the accessor. (This also goes for interfaces implemented on top
1386+
of <code>CSSStyleDeclaration</code> objects obviously.)</p>
13781387

13791388
<pre class="idl">interface <dfn>CSSStyleDeclaration</dfn> {
13801389
attribute DOMString <span title="cssstyledeclaration-csstext">cssText</span>;
1381-
DOMString <span title="cssstyledeclaration-getpropertyvalue">getPropertyValue</span>(in DOMString <var title="">propertyName</var>);
1382-
DOMString <span title="cssstyledeclaration-removeproperty">removeProperty</span>(in DOMString <var title="">propertyName</var>);
1383-
DOMString <span title="cssstyledeclaration-getpropertypriority">getPropertyPriority</span>(in DOMString <var title="">propertyName</var>);
1384-
void <span title="cssstyledeclaration-setproperty">setProperty</span>(in DOMString <var title="">propertyName</var>, in DOMString <var title="">value</var>);
1385-
void <span title="cssstyledeclaration-setproperty">setProperty</span>(in DOMString <var title="">propertyName</var>, in DOMString <var title="">value</var>, in DOMString <var title="">priority</var>);
1390+
DOMString <span title="cssstyledeclaration-getpropertyvalue">getPropertyValue</span>(in DOMString <var title="">property</var>);
1391+
DOMString <span title="cssstyledeclaration-removeproperty">removeProperty</span>(in DOMString <var title="">property</var>);
1392+
DOMString <span title="cssstyledeclaration-getpropertypriority">getPropertyPriority</span>(in DOMString <var title="">property</var>);
1393+
void <span title="cssstyledeclaration-setproperty">setProperty</span>(in DOMString <var title="">property</var>, in DOMString <var title="">value</var>);
1394+
void <span title="cssstyledeclaration-setproperty">setProperty</span>(in DOMString <var title="">property</var>, in DOMString <var title="">value</var>, in DOMString <var title="">priority</var>);
13861395
readonly attribute unsigned long <span title="cssstyledeclaration-length">length</span>;
13871396
DOMString <span title="cssstyledeclaration-item">item</span>(in unsigned long <var title="">index</var>);
13881397
readonly attribute <span>CSSRule</span> <span title="cssstyledeclaration-parentrule">parentRule</span>;
13891398
};</pre>
13901399

1400+
<p class="issue">...</p>
1401+
13911402
<dl class="members">
1392-
<dt><dfn title="cssstyledeclaration-csstext">cssText</dfn></dt>
1393-
<dd>...</dd>
1394-
</dl>
1403+
<dt><dfn title="cssstyledeclaration-csstext"><code>cssText</code></dfn></dt>
13951404

1396-
<p class="issue">...</p>
1405+
<dd>
1406+
<p>On setting, user agents <em class="ct">must</em> remove all properties
1407+
currently set on the object and then parse the given string as the
1408+
contents of a declaration block and set each property / value pair that is
1409+
not ignored on the <code>CSSStyleDeclaration</code> block.</p>
1410+
1411+
<p>On getting, <span class="issue">...</span>.</p>
1412+
</dd>
1413+
</dl>
13971414

13981415
<h4>CSS Properties</h4>
13991416

0 commit comments

Comments
 (0)