Skip to content

Commit 30edeb3

Browse files
author
Simon Pieters
committed
[cssom] Hook into css-syntax for 'parse a CSS declaration block'
1 parent d51fd97 commit 30edeb3

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

cssom/Overview.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,7 +2145,8 @@ <h3 id="css-declaration-blocks"><span class="secno">6.5 </span>CSS Declaration B
21452145
ordered. This matters for the
21462146
<code title="dom-CSSStyleDeclaration-item"><a href="#dom-cssstyledeclaration-item">item()</a></code> method.</p>
21472147

2148-
<p>To <dfn id="parse-a-css-declaration-block">parse a CSS declaration block</dfn> ...</p>
2148+
<p>To <dfn id="parse-a-css-declaration-block">parse a CSS declaration block</dfn> from a string <var>string</var>, invoke <a class="external" data-anolis-spec="csssyntax" href="http://dev.w3.org/csswg/css-syntax/#parse-a-list-of-declarations0">parse a list of declarations</a> with
2149+
<var>string</var> and return the value returned.</p>
21492150

21502151
<p>To <dfn id="serialize-a-css-declaration-block">serialize a CSS declaration block</dfn>
21512152
represented by a <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> instance named <var>d</var>,
@@ -2226,7 +2227,7 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
22262227
<li><p>If the <a href="#concept-css-declaration-block-readonly-flag" title="concept-css-declaration-block-readonly-flag">readonly flag</a> is set, <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a>
22272228
a <code class="external" data-anolis-spec="dom"><a href="http://dom.spec.whatwg.org/#nomodificationallowederror">NoModificationAllowedError</a></code> exception and terminate these steps.</li>
22282229
<li><p>Empty the <a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a>.</li>
2229-
<li><p><a href="#parse-a-css-declaration-block" title="Parse a CSS declaration block">Parse</a> the given value and, if the return value is not null, insert it into the
2230+
<li><p><a href="#parse-a-css-declaration-block" title="Parse a CSS declaration block">Parse</a> the given value and, if the return value is not the empty list, insert it into the
22302231
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a>.</li>
22312232
</ol>
22322233

@@ -2708,10 +2709,10 @@ <h3 id="the-elementcssinlinestyle-interface"><span class="secno">7.1 </span>The
27082709
};</pre>
27092710

27102711
<p>The <dfn id="dom-elementcssinlinestyle-style" title="dom-ElementCSSInlineStyle-style"><code>style</code></dfn> attribute must return a <a href="#css-declaration-block">CSS declaration block</a> with the
2711-
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> being set to the declarations
2712-
specified in the element's <code title="">style</code> content attribute. If the
2713-
<code title="">style</code> content attribute is absent, the object represents an empty
2714-
declaration. Mutating the <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> object must set the
2712+
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> being set to the result of <a href="#parse-a-css-declaration-block" title="Parse a CSS declaration block">parsing</a>
2713+
the <code title="">style</code> content attribute. If the
2714+
<code title="">style</code> content attribute is absent, the object represents an empty list of
2715+
declarations. Mutating the <code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code> object must set the
27152716
<code title="">style</code> content attribute on the element to the
27162717
<a href="#serialize-a-css-declaration-block" title="serialize a CSS declaration block">serialization</a> of the
27172718
<code><a href="#cssstyledeclaration">CSSStyleDeclaration</a></code>'s <a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a>.

cssom/Overview.src.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,7 +2068,8 @@ <h3>CSS Declaration Blocks</h3>
20682068
ordered. This matters for the
20692069
<code title="dom-CSSStyleDeclaration-item">item()</code> method.</p>
20702070

2071-
<p>To <dfn>parse a CSS declaration block</dfn> ...</p>
2071+
<p>To <dfn>parse a CSS declaration block</dfn> from a string <var>string</var>, invoke <span data-anolis-spec=csssyntax>parse a list of declarations</span> with
2072+
<var>string</var> and return the value returned.</p>
20722073

20732074
<p>To <dfn>serialize a CSS declaration block</dfn>
20742075
represented by a <code>CSSStyleDeclaration</code> instance named <var>d</var>,
@@ -2149,7 +2150,7 @@ <h4>The <code title>CSSStyleDeclaration</code> Interface</h4>
21492150
<li><p>If the <span title=concept-css-declaration-block-readonly-flag>readonly flag</span> is set, <span data-anolis-spec=dom title=concept-throw>throw</span>
21502151
a <code data-anolis-spec=dom>NoModificationAllowedError</code> exception and terminate these steps.</li>
21512152
<li><p>Empty the <span title=concept-css-declaration-block-declarations>declarations</span>.</li>
2152-
<li><p><span title='Parse a CSS declaration block'>Parse</span> the given value and, if the return value is not null, insert it into the
2153+
<li><p><span title='Parse a CSS declaration block'>Parse</span> the given value and, if the return value is not the empty list, insert it into the
21532154
<span title=concept-css-declaration-block-declarations>declarations</span>.</p></li>
21542155
</ol>
21552156

@@ -2631,10 +2632,10 @@ <h3>The <code>ElementCSSInlineStyle</code> Interface</h3>
26312632
};</pre>
26322633

26332634
<p>The <dfn title=dom-ElementCSSInlineStyle-style><code>style</code></dfn> attribute must return a <span>CSS declaration block</span> with the
2634-
<span title=concept-css-declaration-block-declarations>declarations</span> being set to the declarations
2635-
specified in the element's <code title>style</code> content attribute. If the
2636-
<code title>style</code> content attribute is absent, the object represents an empty
2637-
declaration. Mutating the <code>CSSStyleDeclaration</code> object must set the
2635+
<span title=concept-css-declaration-block-declarations>declarations</span> being set to the result of <span title='Parse a CSS declaration block'>parsing</span>
2636+
the <code title>style</code> content attribute. If the
2637+
<code title>style</code> content attribute is absent, the object represents an empty list of
2638+
declarations. Mutating the <code>CSSStyleDeclaration</code> object must set the
26382639
<code title>style</code> content attribute on the element to the
26392640
<span title='serialize a CSS declaration block'>serialization</span> of the
26402641
<code>CSSStyleDeclaration</code>'s <span title=concept-css-declaration-block-declarations>declarations</span>.

0 commit comments

Comments
 (0)