Skip to content

Commit 02daf7f

Browse files
committed
[cssom] Remove CSSStyleDeclaration.setPropertyPriority and CSSStyleDeclaration.setPropertyValue due to lack of interest from implementations.
Fixes w3c#2680
1 parent 5cc9ddd commit 02daf7f

File tree

1 file changed

+2
-74
lines changed

1 file changed

+2
-74
lines changed

cssom-1/Overview.bs

Lines changed: 2 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,8 +2093,6 @@ interface CSSStyleDeclaration {
20932093
CSSOMString getPropertyValue(CSSOMString property);
20942094
CSSOMString getPropertyPriority(CSSOMString property);
20952095
[CEReactions] void setProperty(CSSOMString property, [TreatNullAs=EmptyString] CSSOMString value, [TreatNullAs=EmptyString] optional CSSOMString priority = "");
2096-
[CEReactions] void setPropertyValue(CSSOMString property, [TreatNullAs=EmptyString] CSSOMString value);
2097-
[CEReactions] void setPropertyPriority(CSSOMString property, [TreatNullAs=EmptyString] CSSOMString priority);
20982096
[CEReactions] CSSOMString removeProperty(CSSOMString property);
20992097
readonly attribute CSSRule? parentRule;
21002098
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString cssFloat;
@@ -2215,76 +2213,6 @@ a list of declarations <var>declarations</var>, follow these steps:
22152213
Otherwise, unset <var>declaration</var>'s <a for="CSS declaration">important flag</a>.
22162214
</ol>
22172215

2218-
The <dfn method for=CSSStyleDeclaration>setPropertyValue(<var>property</var>, <var>value</var>)</dfn> method must run these
2219-
steps:
2220-
<ol>
2221-
<li>If the <a for="CSSStyleDeclaration">readonly flag</a> is set,
2222-
then <a>throw</a> a {{NoModificationAllowedError}} exception.
2223-
<li>If <var>property</var> is not a <a>custom property</a>, follow these substeps:
2224-
<ol>
2225-
<li>Let <var>property</var> be <var>property</var> <a lt="ASCII lowercase">converted to ASCII lowercase</a>.
2226-
<li>If <var>property</var> is not a <a>case-sensitive</a> match for a <a>supported CSS property</a>, then return.
2227-
</ol>
2228-
<li>If <var>value</var> is the empty string, invoke {{CSSStyleDeclaration/removeProperty()}}
2229-
with <var>property</var> as argument and return.
2230-
<li>
2231-
Let <var>component value list</var> be the result of <a lt="parse a CSS value">parsing</a> <var>value</var> for property <var>property</var>.
2232-
2233-
Note: <var>value</var> can not include "<code>!important</code>".
2234-
2235-
<li>If <var>component value list</var> is null, then return.
2236-
<li>If <var>property</var> is a shorthand property, then for each longhand property <var>longhand</var> that <var>property</var> maps to, in canonical
2237-
order, <a lt="set a CSS declaration value">set the CSS declaration value</a> <var>longhand</var> to the appropriate value(s) from <var>component
2238-
value list</var>, and with the list of declarations being the <a for="CSSStyleDeclaration">declarations</a>.
2239-
<li>Otherwise, <a lt="set a CSS declaration value">set the CSS declaration value</a> <var>property</var> to the value <var>component value
2240-
list</var>, and with the list of declarations being the <a for="CSSStyleDeclaration">declarations</a>.
2241-
<li><a>Update style attribute for</a> the <a>CSS declaration block</a>.
2242-
</ol>
2243-
2244-
To <dfn>set a CSS declaration value</dfn> to a value <var>component value list</var> in a list of declarations <var>declarations</var>, follow these steps:
2245-
2246-
<ol>
2247-
<li>If <var>property</var> is a <a>case-sensitive</a> match for a <a for="CSS declaration">property
2248-
name</a> of a <a>CSS declaration</a> in <var>declarations</var>, let <var>declaration</var> be that <a>CSS declaration</a>.
2249-
<li>Otherwise, append a new <a>CSS declaration</a> with the <a for="CSS declaration">property name</a> <var>property</var>
2250-
to <var>declarations</var> and let <var>declaration</var> be that <a>CSS declaration</a>.
2251-
<li>Set <var>declaration</var>'s <a for="CSS declaration">value</a> to <var>component value list</var>.
2252-
</ol>
2253-
2254-
The <dfn method for=CSSStyleDeclaration>setPropertyPriority(<var>property</var>, <var>priority</var>)</dfn> method must run
2255-
these steps:
2256-
2257-
<ol>
2258-
<li>If the <a for="CSSStyleDeclaration">readonly flag</a> is set,
2259-
then <a>throw</a> a {{NoModificationAllowedError}} exception.
2260-
<li>If <var>property</var> is not a <a>custom property</a>, follow these substeps:
2261-
<ol>
2262-
<li>Let <var>property</var> be <var>property</var> <a lt="ASCII lowercase">converted to ASCII lowercase</a>.
2263-
<li>If <var>property</var> is not a <a>case-sensitive</a> match for a <a>supported CSS property</a>, then return.
2264-
</ol>
2265-
<li>If <var>priority</var> is not the empty string and is not an <a>ASCII case-insensitive</a> match for the string
2266-
"<code>important</code>", then return.
2267-
<li>If <var>property</var> is a shorthand property, then for each longhand property <var>longhand</var> that <var>property</var> maps to, in canonical
2268-
order, <a lt="set a CSS declaration priority">set the CSS declaration priority</a> <var>longhand</var> with the <i>important</i> flag set if
2269-
<var>priority</var> is not the empty string, and unset otherwise, and with the list of declarations being the
2270-
<a for="CSSStyleDeclaration">declarations</a>.
2271-
<li>Otherwise, <a lt="set a CSS declaration priority">set the CSS declaration priority</a> <var>property</var> with the <i>important</i> flag set
2272-
if <var>priority</var> is not the empty string, and unset otherwise, and with the list of declarations being the
2273-
<a for="CSSStyleDeclaration">declarations</a>.
2274-
<li><a>Update style attribute for</a> the <a>CSS declaration block</a>.
2275-
</ol>
2276-
2277-
To <dfn>set a CSS declaration priority</dfn> <var>property</var> optionally with an <i>important</i> flag set, in a list of declarations
2278-
<var>declarations</var>, follow these steps:
2279-
2280-
<ol>
2281-
<li>If <var>property</var> is a <a>case-sensitive</a> match for a <a for="CSS declaration">property
2282-
name</a> of a <a>CSS declaration</a> in <var>declarations</var>, let <var>declaration</var> be that <a>CSS declaration</a>.
2283-
<li>Otherwise, return.
2284-
<li>If the <i>important</i> flag is set, set <var>declaration</var>'s <a for="CSS declaration">important flag</a>. Otherwise,
2285-
unset <var>declaration</var>'s <a for="CSS declaration">important flag</a>.
2286-
</ol>
2287-
22882216
The <dfn method for=CSSStyleDeclaration>removeProperty(<var>property</var>)</dfn> method must run these steps:
22892217
<ol>
22902218
<li>If the <a for="CSSStyleDeclaration">readonly flag</a> is set,
@@ -2986,6 +2914,7 @@ Changes From 5 December 2013 {#changes-from-5-december-2013}
29862914
* Serialization of :lang() is changed.
29872915
* Serialization of <<color>> and <<number>> is changed.
29882916
* {{CSSStyleDeclaration/setProperty()}} on {{CSSStyleDeclaration}} is changed.
2917+
* <code>setPropertyValue</code> and <code>setPropertyPriority</code> are removed from {{CSSStyleDeclaration}} due to lack of interest from implementations.
29892918

29902919

29912920
Changes From 12 July 2011 To 5 December 2013 {#changes-from-12-july-2011-to-5-december-2013}
@@ -3006,8 +2935,7 @@ Changes From 12 July 2011 To 5 December 2013 {#changes-from-12-july-2011-to-5-de
30062935
<li>Shorthands are now supported in {{CSSStyleDeclaration/setProperty()}},
30072936
{{CSSStyleDeclaration/getPropertyValue()}}, et al.
30082937

3009-
<li>{{CSSStyleDeclaration/setPropertyValue()}} and
3010-
{{CSSStyleDeclaration/setPropertyPriority()}} are introduced.
2938+
<li><code>setPropertyValue</code> and <code>setPropertyPriority</code> are added to {{CSSStyleDeclaration}}.
30112939

30122940
<li>The <code>style</code> and <code>media</code> attributes of various interfaces are annotated with the <code>[PutForwards]</code> WebIDL
30132941
extended attribute.

0 commit comments

Comments
 (0)