Skip to content

Commit 4584d09

Browse files
zcorpansvgeesus
authored andcommitted
Handle 'none' in DOMMatrix(transformList) constructor
Fixes #55.
1 parent 95f11fb commit 4584d09

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

geometry/Overview.bs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -692,15 +692,18 @@ the <dfn dfn-type=constructor dfn-for=DOMMatrix><code>DOMMatrix(<var>transformLi
692692
<ol>
693693
<li>If <var>transformList</var> is the empty string, set it to the string "<code lt>matrix(1, 0,
694694
0, 1, 0, 0)</code>".</li>
695-
<li>Parse <var>transformList</var> by following the syntax description in “<a
696-
href=https://drafts.csswg.org/css-transforms-1/#svg-syntax>Syntax of the SVG ‘transform’
697-
attribute</a>[[!CSS3-TRANSFORMS]] to a <<transform-list>>. If parsing is not successful, or any
698-
<<transform-function>> has <<length>> values without <a spec='css-values'>absolute length</a>
699-
units<!--For WD: <a spec='css-values-3'>absolute length units</a>-->, or any keyword other than
700-
''transform/none'' is used, throw a {{SyntaxError}} exception.</li>
701-
<li>Let <var>2dTransform</var> track the 2D/3D dimension status of the <<transform-list>>.
695+
<li>Parse <var>transformList</var> into <var>parsedValue</var> by following the syntax description in
696+
<a href=https://drafts.csswg.org/css-transforms-1/#svg-syntax>Syntax of the SVG ‘transform’
697+
attribute</a>[[!CSS3-TRANSFORMS]] to a <<transform-list>> or the keyword ''transform/none''. If
698+
parsing is not successful, or any <<transform-function>> has <<length>> values without <a
699+
spec='css-values'>absolute length</a> units<!--For WD: <a spec='css-values-3'>absolute length
700+
units</a>-->, or any keyword other than ''transform/none'' is used, throw a {{SyntaxError}}
701+
exception.</li>
702+
<li>If <var>parsedValue</var> is ''transform/none'', set <var>parsedValue</var> to a
703+
<<transform-list>> containing a single identity matrix</li>
704+
<li>Let <var>2dTransform</var> track the 2D/3D dimension status of <var>parsedValue</var>.
702705
<dl class=switch>
703-
<dt>If the <<transform-list>> consists of any <a href='https://drafts.csswg.org/css-transforms-1/#three-d-transform-functions'>3D Transform functions</a></dt>
706+
<dt>If <var>parsedValue</var> consists of any <a href='https://drafts.csswg.org/css-transforms-1/#three-d-transform-functions'>3D Transform functions</a></dt>
704707
<dd>Set <var>2dTransform</var> to <code>false</code>.</dd>
705708
<dt>Otherwise</dt>
706709
<dd>Set <var>2dTransform</var> to <code>true</code>.</dd>

0 commit comments

Comments
 (0)