|
16 | 16 | <h1>CSS Object Model (CSSOM)</h1> |
17 | 17 |
|
18 | 18 |
|
19 | | - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 14 August 2013</h2> |
| 19 | + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 18 August 2013</h2> |
20 | 20 |
|
21 | 21 | <dl> |
22 | 22 |
|
@@ -90,7 +90,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2> |
90 | 90 | can be found in the |
91 | 91 | <a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em> |
92 | 92 |
|
93 | | -<p class="dontpublish">This is the 14 August 2013 Editor's Draft of CSSOM. Please send comments to |
| 93 | +<p class="dontpublish">This is the 18 August 2013 Editor's Draft of CSSOM. Please send comments to |
94 | 94 | <a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a> |
95 | 95 | (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) |
96 | 96 | with <samp>[cssom]</samp> at the start of the subject line. |
@@ -2219,7 +2219,7 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The |
2219 | 2219 | DOMString <a href="#dom-cssstyledeclaration-getpropertyvalue" title="dom-CSSStyleDeclaration-getPropertyValue">getPropertyValue</a>(DOMString property); |
2220 | 2220 | DOMString <a href="#dom-cssstyledeclaration-getpropertypriority" title="dom-CSSStyleDeclaration-getPropertyPriority">getPropertyPriority</a>(DOMString property); |
2221 | 2221 | void <a href="#dom-cssstyledeclaration-setproperty" title="dom-CSSStyleDeclaration-setProperty">setProperty</a>(DOMString property, [TreatNullAs=EmptyString] DOMString value, <!-- |
2222 | | - -->[TreatNullAs=EmptyString] optional DOMString priority = ""); |
| 2222 | + -->[TreatNullAs=EmptyString] optional DOMString priority); |
2223 | 2223 | DOMString <a href="#dom-cssstyledeclaration-removeproperty" title="dom-CSSStyleDeclaration-removeProperty">removeProperty</a>(DOMString property); |
2224 | 2224 | readonly attribute <a href="#cssrule">CSSRule</a>? <a href="#dom-cssstyledeclaration-length" title="dom-CSSStyleDeclaration-length">parentRule</a>; |
2225 | 2225 | attribute DOMString <a href="#dom-cssstyledeclaration-cssfloat" title="dom-CSSStyleDeclaration-cssFloat">cssFloat</a>;<!-- setProperty's value arg has [TreatNullAs=EmptyString] --> |
@@ -2303,32 +2303,34 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The |
2303 | 2303 | algorithm.</li> |
2304 | 2304 | <li><p>If <var>value</var> is the empty string, invoke <code title="dom-CSSStyleDeclaration-removeProperty"><a href="#dom-cssstyledeclaration-removeproperty">removeProperty()</a></code> |
2305 | 2305 | with <var>property</var> as argument and terminate this algorithm.</li> |
2306 | | - <li><p>If <var>priority</var> is neither an <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for the string "<code title="">important</code>" |
2307 | | - nor the empty string terminate this algorithm.</li> |
| 2306 | + <li><p>If <var>priority</var> is not specified, let <var>priority action</var> be "leave as is". Otherwise, if <var>priority</var> is the empty string, let |
| 2307 | + <var>priority action</var> be "unset important". Otherwise, if <var>priority</var> is an <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for the |
| 2308 | + string "<code title="">important</code>", set <var>priority action</var> to "set important". Otherwise, terminate this algorithm. |
2308 | 2309 | <li> |
2309 | 2310 | <p>Let <var>component value list</var> be the result of <a href="#parse-a-css-value" title="parse a CSS value">parsing</a> <var>value</var>. |
2310 | 2311 | <p class="note"><var>value</var> can not include "<code title="">!important</code>".</p> |
2311 | 2312 | </li> |
2312 | 2313 | <li><p>If <var>component value list</var> is null terminate these steps. |
2313 | 2314 | <li><p>If <var>property</var> is a shorthand property, then for each longhand property <var>longhand</var> that <var>property</var> maps to, in canonical |
2314 | 2315 | order, <a href="#set-a-css-property" title="set a CSS property">set the CSS property</a> <var>longhand</var> to the appropriate value(s) from <var>component value list</var>, with |
2315 | | - the <var>important</var> flag set if <var>priority</var> is not the empty string, and with the list of declarations being the |
| 2316 | + <i>priority action</i> being <var>priority action</var>, and with the list of declarations being the |
2316 | 2317 | <a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a>. |
2317 | 2318 | <li><p>Otherwise, <a href="#set-a-css-property" title="set a CSS property">set the CSS property</a> <var>property</var> to <var>component value list</var>, with |
2318 | | - the <var>important</var> flag set if <var>priority</var> is not the empty string, and with the list of declarations being the |
| 2319 | + <i>priority action</i> being <var>priority action</var>, and with the list of declarations being the |
2319 | 2320 | <a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a>. |
2320 | 2321 | </ol> |
2321 | 2322 |
|
2322 | | -<p>To <dfn id="set-a-css-property">set a CSS property</dfn> <var>property</var> to a value <var>component value list</var> and optionally with an <var>important</var> flag set, in a |
2323 | | -list of declarations <var>declarations</var>, follow these steps: |
| 2323 | +<p>To <dfn id="set-a-css-property">set a CSS property</dfn> <var>property</var> to a value <var>component value list</var> and with <i>priority action</i> being either "set |
| 2324 | +important", "unset important" or "leave as is", in a list of declarations <var>declarations</var>, follow these steps: |
2324 | 2325 |
|
2325 | 2326 | <ol> |
2326 | 2327 | <li><p>If <var>property</var> is a <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#case-sensitive">case-sensitive</a> match for a property of a declaration in |
2327 | 2328 | <var>declarations</var>, let <var>declaration</var> be that declaration. |
2328 | 2329 | <li><p>Otherwise, append a new declaration with the property name <var>property</var> to <var>declarations</var> and let <var>declaration</var> be that |
2329 | 2330 | declaration. |
2330 | 2331 | <li><p>Set <var>declaration</var>'s value to <var>component value list</var>. |
2331 | | - <li><p>Set the declaration's <i>important</i> flag if <var>important</var> is set, or unset it otherwise. |
| 2332 | + <li><p>If <i>priority action</i> is "set important", set the declaration's <i>important</i> flag. |
| 2333 | + <li><p>Otherwise, if <i>priority action</i> is "unset important", unset the declaration's <i>important</i> flag. |
2332 | 2334 | </ol> |
2333 | 2335 |
|
2334 | 2336 | <p>The <dfn id="dom-cssstyledeclaration-removeproperty" title="dom-CSSStyleDeclaration-removeProperty"><code>removeProperty(<var>property</var>)</code></dfn> method must run these steps:</p> |
@@ -3070,6 +3072,7 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2> |
3070 | 3072 | Mike Sherov, |
3071 | 3073 | Morten Stenshorne, |
3072 | 3074 | Øyvind Stenhaug, |
| 3075 | +Peter Sloetjes, |
3073 | 3076 | Philip Taylor, |
3074 | 3077 | Robert O'Callahan, |
3075 | 3078 | Simon Sapin, |
|
0 commit comments