Skip to content

Commit f024f06

Browse files
author
Simon Pieters
committed
[cssom] Use methods instead of attributes for GetStyleUtils since they always return new objects. https://www.w3.org/Bugs/Public/show_bug.cgi?id=22939
1 parent 895567d commit f024f06

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

cssom/Overview.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,35 +2810,35 @@ <h3 id="the-getstyleutils-interface"><span class="secno">7.3 </span>The <code ti
28102810

28112811
<pre class="idl">[NoInterfaceObject]
28122812
interface <dfn id="getstyleutils">GetStyleUtils</dfn> {
2813-
readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-getstyleutils-cascadedstyle" title="dom-GetStyleUtils-cascadedStyle">cascadedStyle</a>;
2814-
<!--readonly attribute <span>CSSStyleDeclaration</span> <span title=dom-GetStyleUtils-defaultStyle>defaultStyle</span>;
2815-
-->readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-getstyleutils-rawcomputedstyle" title="dom-GetStyleUtils-rawComputedStyle">rawComputedStyle</a>;
2816-
readonly attribute <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-getstyleutils-usedstyle" title="dom-GetStyleUtils-usedStyle">usedStyle</a>;
2813+
[NewObject] <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-getstyleutils-cascadedstyle" title="dom-GetStyleUtils-cascadedStyle">cascadedStyle</a>();
2814+
<!--[NewObject] <span>CSSStyleDeclaration</span> <span title=dom-GetStyleUtils-defaultStyle>defaultStyle</span>();
2815+
-->[NewObject] <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-getstyleutils-rawcomputedstyle" title="dom-GetStyleUtils-rawComputedStyle">rawComputedStyle</a>();
2816+
[NewObject] <a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#dom-getstyleutils-usedstyle" title="dom-GetStyleUtils-usedStyle">usedStyle</a>();
28172817
};</pre>
28182818

2819-
<p class="atrisk">The <dfn id="dom-getstyleutils-cascadedstyle" title="dom-GetStyleUtils-cascadedStyle"><code>cascadedStyle</code></dfn> attribute must return a new <a href="#css-declaration-block">CSS declaration block</a>
2819+
<p class="atrisk">The <dfn id="dom-getstyleutils-cascadedstyle" title="dom-GetStyleUtils-cascadedStyle"><code>cascadedStyle</code></dfn> attribute must return a <a href="#css-declaration-block">CSS declaration block</a>
28202820
with the <a href="#concept-css-declaration-block-readonly-flag" title="concept-css-declaration-block-readonly-flag">readonly flag</a> set and the
28212821
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> set to all longhand properties
28222822
that are <a href="#supported-css-property" title="supported CSS property">supported CSS properties</a> that have a <a href="#cascaded-value">cascaded value</a> for the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context
28232823
object</a>, with the value being the <a href="#cascaded-value">cascaded value</a> computed for the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context object</a> using the style rules
28242824
associated with the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context object</a>'s <a href="#associated-document">associated document</a>.</p>
28252825

2826-
<!--<p class=atrisk>The <dfn title=dom-GetStyleUtils-defaultStyle><code>defaultStyle</code></dfn> attribute must return a new <span>CSS declaration block</span> with
2827-
the <span title=concept-css-declaration-block-readonly-flag>readonly flag</span> set and the
2826+
<!--<p class=atrisk>The <dfn title=dom-GetStyleUtils-defaultStyle><code>defaultStyle</code></dfn> attribute must return a <span>CSS declaration block</span>
2827+
with the <span title=concept-css-declaration-block-readonly-flag>readonly flag</span> set and the
28282828
<span title=concept-css-declaration-block-declarations>declarations</span> set to all longhand properties that are
28292829
<span title="supported CSS property">supported CSS properties</span> with the value being the
28302830
<span>computed value</span> computed for the <span data-anolis-spec=dom>context object</span> using the user-agent-level style rules and user-level style rules
28312831
associated with the <span data-anolis-spec=dom>context object</span>'s <span>associated document</span>, ignoring transitions, animations, author-level style
28322832
rules, author-level presentational hints and override-level style rules.</p>-->
28332833

2834-
<p class="atrisk">The <dfn id="dom-getstyleutils-rawcomputedstyle" title="dom-GetStyleUtils-rawComputedStyle"><code>rawComputedStyle</code></dfn> attribute must return a new <a href="#css-declaration-block">CSS declaration
2834+
<p class="atrisk">The <dfn id="dom-getstyleutils-rawcomputedstyle" title="dom-GetStyleUtils-rawComputedStyle"><code>rawComputedStyle</code></dfn> attribute must return a <a href="#css-declaration-block">CSS declaration
28352835
block</a> with the <a href="#concept-css-declaration-block-readonly-flag" title="concept-css-declaration-block-readonly-flag">readonly flag</a> set and the
28362836
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> set to all longhand properties
28372837
that are <a href="#supported-css-property" title="supported CSS property">supported CSS properties</a> with the value being the <a href="#computed-value">computed value</a>
28382838
computed for the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context object</a> using the style rules associated
28392839
with the <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#context-object">context object</a>'s <a href="#associated-document">associated document</a>.</p>
28402840

2841-
<p class="atrisk">The <dfn id="dom-getstyleutils-usedstyle" title="dom-GetStyleUtils-usedStyle"><code>usedStyle</code></dfn> attribute must return a new <a href="#css-declaration-block">CSS declaration block</a> with the
2841+
<p class="atrisk">The <dfn id="dom-getstyleutils-usedstyle" title="dom-GetStyleUtils-usedStyle"><code>usedStyle</code></dfn> attribute must return a <a href="#css-declaration-block">CSS declaration block</a> with the
28422842
<a href="#concept-css-declaration-block-readonly-flag" title="concept-css-declaration-block-readonly-flag">readonly flag</a> set and the
28432843
<a href="#concept-css-declaration-block-declarations" title="concept-css-declaration-block-declarations">declarations</a> set to all longhand properties
28442844
that are <a href="#supported-css-property" title="supported CSS property">supported CSS properties</a> with the value being the <a href="#used-value">used value</a>

cssom/Overview.src.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2732,35 +2732,35 @@ <h3>The <code title>GetStyleUtils</code> Interface</h3>
27322732

27332733
<pre class=idl>[NoInterfaceObject]
27342734
interface <dfn>GetStyleUtils</dfn> {
2735-
readonly attribute <span>CSSStyleDeclaration</span> <span title=dom-GetStyleUtils-cascadedStyle>cascadedStyle</span>;
2736-
<!--readonly attribute <span>CSSStyleDeclaration</span> <span title=dom-GetStyleUtils-defaultStyle>defaultStyle</span>;
2737-
-->readonly attribute <span>CSSStyleDeclaration</span> <span title=dom-GetStyleUtils-rawComputedStyle>rawComputedStyle</span>;
2738-
readonly attribute <span>CSSStyleDeclaration</span> <span title=dom-GetStyleUtils-usedStyle>usedStyle</span>;
2735+
[NewObject] <span>CSSStyleDeclaration</span> <span title=dom-GetStyleUtils-cascadedStyle>cascadedStyle</span>();
2736+
<!--[NewObject] <span>CSSStyleDeclaration</span> <span title=dom-GetStyleUtils-defaultStyle>defaultStyle</span>();
2737+
-->[NewObject] <span>CSSStyleDeclaration</span> <span title=dom-GetStyleUtils-rawComputedStyle>rawComputedStyle</span>();
2738+
[NewObject] <span>CSSStyleDeclaration</span> <span title=dom-GetStyleUtils-usedStyle>usedStyle</span>();
27392739
};</pre>
27402740

2741-
<p class=atrisk>The <dfn title=dom-GetStyleUtils-cascadedStyle><code>cascadedStyle</code></dfn> attribute must return a new <span>CSS declaration block</span>
2741+
<p class=atrisk>The <dfn title=dom-GetStyleUtils-cascadedStyle><code>cascadedStyle</code></dfn> attribute must return a <span>CSS declaration block</span>
27422742
with the <span title=concept-css-declaration-block-readonly-flag>readonly flag</span> set and the
27432743
<span title=concept-css-declaration-block-declarations>declarations</span> set to all longhand properties
27442744
that are <span title="supported CSS property">supported CSS properties</span> that have a <span>cascaded value</span> for the <span data-anolis-spec=dom>context
27452745
object</span>, with the value being the <span>cascaded value</span> computed for the <span data-anolis-spec=dom>context object</span> using the style rules
27462746
associated with the <span data-anolis-spec=dom>context object</span>'s <span>associated document</span>.</p>
27472747

2748-
<!--<p class=atrisk>The <dfn title=dom-GetStyleUtils-defaultStyle><code>defaultStyle</code></dfn> attribute must return a new <span>CSS declaration block</span> with
2749-
the <span title=concept-css-declaration-block-readonly-flag>readonly flag</span> set and the
2748+
<!--<p class=atrisk>The <dfn title=dom-GetStyleUtils-defaultStyle><code>defaultStyle</code></dfn> attribute must return a <span>CSS declaration block</span>
2749+
with the <span title=concept-css-declaration-block-readonly-flag>readonly flag</span> set and the
27502750
<span title=concept-css-declaration-block-declarations>declarations</span> set to all longhand properties that are
27512751
<span title="supported CSS property">supported CSS properties</span> with the value being the
27522752
<span>computed value</span> computed for the <span data-anolis-spec=dom>context object</span> using the user-agent-level style rules and user-level style rules
27532753
associated with the <span data-anolis-spec=dom>context object</span>'s <span>associated document</span>, ignoring transitions, animations, author-level style
27542754
rules, author-level presentational hints and override-level style rules.</p>-->
27552755

2756-
<p class=atrisk>The <dfn title=dom-GetStyleUtils-rawComputedStyle><code>rawComputedStyle</code></dfn> attribute must return a new <span>CSS declaration
2756+
<p class=atrisk>The <dfn title=dom-GetStyleUtils-rawComputedStyle><code>rawComputedStyle</code></dfn> attribute must return a <span>CSS declaration
27572757
block</span> with the <span title=concept-css-declaration-block-readonly-flag>readonly flag</span> set and the
27582758
<span title=concept-css-declaration-block-declarations>declarations</span> set to all longhand properties
27592759
that are <span title="supported CSS property">supported CSS properties</span> with the value being the <span>computed value</span>
27602760
computed for the <span data-anolis-spec=dom>context object</span> using the style rules associated
27612761
with the <span data-anolis-spec=dom>context object</span>'s <span>associated document</span>.</p>
27622762

2763-
<p class=atrisk>The <dfn title=dom-GetStyleUtils-usedStyle><code>usedStyle</code></dfn> attribute must return a new <span>CSS declaration block</span> with the
2763+
<p class=atrisk>The <dfn title=dom-GetStyleUtils-usedStyle><code>usedStyle</code></dfn> attribute must return a <span>CSS declaration block</span> with the
27642764
<span title=concept-css-declaration-block-readonly-flag>readonly flag</span> set and the
27652765
<span title=concept-css-declaration-block-declarations>declarations</span> set to all longhand properties
27662766
that are <span title="supported CSS property">supported CSS properties</span> with the value being the <span>used value</span>

0 commit comments

Comments
 (0)