[cssom] Make setProperty without priority argument not unset important. Also affects the camel-cased attributes. <http://www.w3.org/mid/DUB119-W4278E92C9DD13C3E85C782E6590@phx.gbl>

Sun, 18 Aug 2013 23:23:45 +0200

author
Simon Pieters <simonp@opera.com>
date
Sun, 18 Aug 2013 23:23:45 +0200
changeset 8870
1a4eaf3f7f1d
parent 8869
9253e2d9fa55
child 8871
d57923aca77a

[cssom] Make setProperty without priority argument not unset important. Also affects the camel-cased attributes. <http://www.w3.org/mid/DUB119-W4278E92C9DD13C3E85C782E6590@phx.gbl>

cssom/Overview.html file | annotate | diff | comparison | revisions
cssom/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/cssom/Overview.html	Fri Aug 16 17:05:57 2013 -0700
     1.2 +++ b/cssom/Overview.html	Sun Aug 18 23:23:45 2013 +0200
     1.3 @@ -16,7 +16,7 @@
     1.4   <h1>CSS Object Model (CSSOM)</h1>
     1.5  
     1.6  
     1.7 - <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 14 August 2013</h2>
     1.8 + <h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 18 August 2013</h2>
     1.9  
    1.10   <dl>
    1.11  
    1.12 @@ -90,7 +90,7 @@
    1.13  can be found in the
    1.14  <a href="http://www.w3.org/TR/">W3C technical reports index at http://www.w3.org/TR/.</a></em>
    1.15  
    1.16 -<p class="dontpublish">This is the 14 August 2013 Editor's Draft of CSSOM. Please send comments to
    1.17 +<p class="dontpublish">This is the 18 August 2013 Editor's Draft of CSSOM. Please send comments to
    1.18  <a href="mailto:www-style@w3.org?subject=%5Bcssom%5D%20">www-style@w3.org</a>
    1.19  (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
    1.20  with <samp>[cssom]</samp> at the start of the subject line.
    1.21 @@ -2219,7 +2219,7 @@
    1.22    DOMString <a href="#dom-cssstyledeclaration-getpropertyvalue" title="dom-CSSStyleDeclaration-getPropertyValue">getPropertyValue</a>(DOMString property);
    1.23    DOMString <a href="#dom-cssstyledeclaration-getpropertypriority" title="dom-CSSStyleDeclaration-getPropertyPriority">getPropertyPriority</a>(DOMString property);
    1.24    void <a href="#dom-cssstyledeclaration-setproperty" title="dom-CSSStyleDeclaration-setProperty">setProperty</a>(DOMString property, [TreatNullAs=EmptyString] DOMString value, <!--
    1.25 -  -->[TreatNullAs=EmptyString] optional DOMString priority = "");
    1.26 +  -->[TreatNullAs=EmptyString] optional DOMString priority);
    1.27    DOMString <a href="#dom-cssstyledeclaration-removeproperty" title="dom-CSSStyleDeclaration-removeProperty">removeProperty</a>(DOMString property);
    1.28    readonly attribute <a href="#cssrule">CSSRule</a>? <a href="#dom-cssstyledeclaration-length" title="dom-CSSStyleDeclaration-length">parentRule</a>;
    1.29             attribute DOMString <a href="#dom-cssstyledeclaration-cssfloat" title="dom-CSSStyleDeclaration-cssFloat">cssFloat</a>;<!-- setProperty's value arg has [TreatNullAs=EmptyString] -->
    1.30 @@ -2303,8 +2303,9 @@
    1.31   algorithm.</li>
    1.32   <li><p>If <var>value</var> is the empty string, invoke <code title="dom-CSSStyleDeclaration-removeProperty"><a href="#dom-cssstyledeclaration-removeproperty">removeProperty()</a></code>
    1.33   with <var>property</var> as argument and terminate this algorithm.</li>
    1.34 - <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>"
    1.35 - nor the empty string terminate this algorithm.</li>
    1.36 + <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
    1.37 + <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
    1.38 + string "<code title="">important</code>", set <var>priority action</var> to "set important". Otherwise, terminate this algorithm.
    1.39   <li>
    1.40    <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>.
    1.41    <p class="note"><var>value</var> can not include "<code title="">!important</code>".</p>
    1.42 @@ -2312,15 +2313,15 @@
    1.43   <li><p>If <var>component value list</var> is null terminate these steps.
    1.44   <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
    1.45   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
    1.46 - the <var>important</var> flag set if <var>priority</var> is not the empty string, and with the list of declarations being the
    1.47 + <i>priority action</i> being <var>priority action</var>, and with the list of declarations being the
    1.48   <a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a>.
    1.49   <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
    1.50 - the <var>important</var> flag set if <var>priority</var> is not the empty string, and with the list of declarations being the
    1.51 + <i>priority action</i> being <var>priority action</var>, and with the list of declarations being the
    1.52   <a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a>.
    1.53  </ol>
    1.54  
    1.55 -<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
    1.56 -list of declarations <var>declarations</var>, follow these steps:
    1.57 +<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
    1.58 +important", "unset important" or "leave as is", in a list of declarations <var>declarations</var>, follow these steps:
    1.59  
    1.60  <ol>
    1.61   <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
    1.62 @@ -2328,7 +2329,8 @@
    1.63   <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
    1.64   declaration.
    1.65   <li><p>Set <var>declaration</var>'s value to <var>component value list</var>.
    1.66 - <li><p>Set the declaration's <i>important</i> flag if <var>important</var> is set, or unset it otherwise.
    1.67 + <li><p>If <i>priority action</i> is "set important", set the declaration's <i>important</i> flag.
    1.68 + <li><p>Otherwise, if <i>priority action</i> is "unset important", unset the declaration's <i>important</i> flag.
    1.69  </ol>
    1.70  
    1.71  <p>The <dfn id="dom-cssstyledeclaration-removeproperty" title="dom-CSSStyleDeclaration-removeProperty"><code>removeProperty(<var>property</var>)</code></dfn> method must run these steps:</p>
    1.72 @@ -3070,6 +3072,7 @@
    1.73  Mike Sherov,
    1.74  Morten Stenshorne,
    1.75  Øyvind Stenhaug,
    1.76 +Peter Sloetjes,
    1.77  Philip Taylor,
    1.78  Robert O'Callahan,
    1.79  Simon Sapin,
     2.1 --- a/cssom/Overview.src.html	Fri Aug 16 17:05:57 2013 -0700
     2.2 +++ b/cssom/Overview.src.html	Sun Aug 18 23:23:45 2013 +0200
     2.3 @@ -2141,7 +2141,7 @@
     2.4    DOMString <span title=dom-CSSStyleDeclaration-getPropertyValue>getPropertyValue</span>(DOMString property);
     2.5    DOMString <span title=dom-CSSStyleDeclaration-getPropertyPriority>getPropertyPriority</span>(DOMString property);
     2.6    void <span title=dom-CSSStyleDeclaration-setProperty>setProperty</span>(DOMString property, [TreatNullAs=EmptyString] DOMString value, <!--
     2.7 -  -->[TreatNullAs=EmptyString] optional DOMString priority = "");
     2.8 +  -->[TreatNullAs=EmptyString] optional DOMString priority);
     2.9    DOMString <span title=dom-CSSStyleDeclaration-removeProperty>removeProperty</span>(DOMString property);
    2.10    readonly attribute <span>CSSRule</span>? <span title=dom-CSSStyleDeclaration-length>parentRule</span>;
    2.11             attribute DOMString <span title=dom-CSSStyleDeclaration-cssFloat>cssFloat</span>;<!-- setProperty's value arg has [TreatNullAs=EmptyString] -->
    2.12 @@ -2225,8 +2225,9 @@
    2.13   algorithm.</p></li>
    2.14   <li><p>If <var>value</var> is the empty string, invoke <code title='dom-CSSStyleDeclaration-removeProperty'>removeProperty()</code>
    2.15   with <var>property</var> as argument and terminate this algorithm.</p></li>
    2.16 - <li><p>If <var>priority</var> is neither an <span data-anolis-spec=dom>ASCII case-insensitive</span> match for the string "<code title>important</code>"
    2.17 - nor the empty string terminate this algorithm.</p></li>
    2.18 + <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
    2.19 + <var>priority action</var> be "unset important". Otherwise, if <var>priority</var> is an <span data-anolis-spec=dom>ASCII case-insensitive</span> match for the
    2.20 + string "<code title>important</code>", set <var>priority action</var> to "set important". Otherwise, terminate this algorithm.
    2.21   <li>
    2.22    <p>Let <var>component value list</var> be the result of <span title='parse a CSS value'>parsing</span> <var>value</var>.
    2.23    <p class='note'><var>value</var> can not include "<code title>!important</code>".</p>
    2.24 @@ -2234,15 +2235,15 @@
    2.25   <li><p>If <var>component value list</var> is null terminate these steps.
    2.26   <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
    2.27   order, <span title="set a CSS property">set the CSS property</span> <var>longhand</var> to the appropriate value(s) from <var>component value list</var>, with
    2.28 - the <var>important</var> flag set if <var>priority</var> is not the empty string, and with the list of declarations being the
    2.29 + <i>priority action</i> being <var>priority action</var>, and with the list of declarations being the
    2.30   <span title=concept-css-declaration-block-declarations>declarations</span>.
    2.31   <li><p>Otherwise, <span title="set a CSS property">set the CSS property</span> <var>property</var> to <var>component value list</var>, with
    2.32 - the <var>important</var> flag set if <var>priority</var> is not the empty string, and with the list of declarations being the
    2.33 + <i>priority action</i> being <var>priority action</var>, and with the list of declarations being the
    2.34   <span title=concept-css-declaration-block-declarations>declarations</span>.
    2.35  </ol>
    2.36  
    2.37 -<p>To <dfn>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
    2.38 -list of declarations <var>declarations</var>, follow these steps:
    2.39 +<p>To <dfn>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
    2.40 +important", "unset important" or "leave as is", in a list of declarations <var>declarations</var>, follow these steps:
    2.41  
    2.42  <ol>
    2.43   <li><p>If <var>property</var> is a <span data-anolis-spec=dom>case-sensitive</span> match for a property of a declaration in
    2.44 @@ -2250,7 +2251,8 @@
    2.45   <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
    2.46   declaration.
    2.47   <li><p>Set <var>declaration</var>'s value to <var>component value list</var>.
    2.48 - <li><p>Set the declaration's <i>important</i> flag if <var>important</var> is set, or unset it otherwise.
    2.49 + <li><p>If <i>priority action</i> is "set important", set the declaration's <i>important</i> flag.
    2.50 + <li><p>Otherwise, if <i>priority action</i> is "unset important", unset the declaration's <i>important</i> flag.
    2.51  </ol>
    2.52  
    2.53  <p>The <dfn title=dom-CSSStyleDeclaration-removeProperty><code>removeProperty(<var>property</var>)</code></dfn> method must run these steps:</p>
    2.54 @@ -2944,6 +2946,7 @@
    2.55  Mike Sherov,
    2.56  Morten Stenshorne,
    2.57  Øyvind Stenhaug,
    2.58 +Peter Sloetjes,
    2.59  Philip Taylor,
    2.60  Robert O'Callahan,
    2.61  Simon Sapin,

mercurial