Skip to content

Commit 3a99254

Browse files
zcorpansvgeesus
authored andcommitted
Editorial: simplify 'validate and fixup' algorithm
Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=29820
1 parent da7e6e3 commit 3a99254

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

geometry/Overview.bs

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Abstract: This specification provides basic geometric interfaces to represent po
2121
!Issues list: <a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=FXTF&amp;component=Geometry&amp;resolution=---">Bugzilla</a> (<a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=FXTF&amp;component=Geometry">file a bug</a>)
2222
Test Suite: http://test.csswg.org/suites/geometry-1_dev/nightly-unstable/
2323
Use <i> Autolinks: yes
24-
Ignored Vars: f, Point object, m44, e, m42, quad1, m41, stringifier, point object, m12, c, transformPoint, m21, d, m22, quad2, sz
24+
Ignored Vars: a, b, f, Point object, m44, e, m42, quad1, m41, stringifier, point object, m12, c, transformPoint, m21, d, m22, quad2, sz
2525
</pre>
2626

2727
<pre class=anchors>
@@ -636,12 +636,12 @@ To <dfn>validate and fixup</dfn> a {{DOMMatrixInit}} dictionary <var>dict</var>,
636636
or at least one of {{DOMMatrixInit/m33}}, {{DOMMatrixInit/m44}}
637637
are present with a value other than ''1''.
638638
</ul>
639-
<li><a>Set the dictionary members</a> {{DOMMatrixInit/a}} and {{DOMMatrixInit/m11}} with fallback value ''1''.
640-
<li><a>Set the dictionary members</a> {{DOMMatrixInit/b}} and {{DOMMatrixInit/m12}} with fallback value ''0''.
641-
<li><a>Set the dictionary members</a> {{DOMMatrixInit/c}} and {{DOMMatrixInit/m21}} with fallback value ''0''.
642-
<li><a>Set the dictionary members</a> {{DOMMatrixInit/d}} and {{DOMMatrixInit/m22}} with fallback value ''1''.
643-
<li><a>Set the dictionary members</a> {{DOMMatrixInit/e}} and {{DOMMatrixInit/m41}} with fallback value ''0''.
644-
<li><a>Set the dictionary members</a> {{DOMMatrixInit/f}} and {{DOMMatrixInit/m42}} with fallback value ''0''.
639+
<li>If {{DOMMatrixInit/m11}} is not present then set it to the value of member {{DOMMatrixInit/a}}, or value ''1'' if {{DOMMatrixInit/a}} is also not present.
640+
<li>If {{DOMMatrixInit/m12}} is not present then set it to the value of member {{DOMMatrixInit/b}}, or value ''0'' if {{DOMMatrixInit/b}} is also not present.
641+
<li>If {{DOMMatrixInit/m21}} is not present then set it to the value of member {{DOMMatrixInit/c}}, or value ''0'' if {{DOMMatrixInit/c}} is also not present.
642+
<li>If {{DOMMatrixInit/m22}} is not present then set it to the value of member {{DOMMatrixInit/d}}, or value ''1'' if {{DOMMatrixInit/d}} is also not present.
643+
<li>If {{DOMMatrixInit/m41}} is not present then set it to the value of member {{DOMMatrixInit/e}}, or value ''0'' if {{DOMMatrixInit/e}} is also not present.
644+
<li>If {{DOMMatrixInit/m42}} is not present then set it to the value of member {{DOMMatrixInit/f}}, or value ''0'' if {{DOMMatrixInit/f}} is also not present.
645645
<li>If {{DOMMatrixInit/is2D}} is not present and at least one of
646646
{{DOMMatrixInit/m31}}, {{DOMMatrixInit/m32}}, {{DOMMatrixInit/m13}}, {{DOMMatrixInit/m23}},
647647
{{DOMMatrixInit/m43}}, {{DOMMatrixInit/m14}}, {{DOMMatrixInit/m24}}, {{DOMMatrixInit/m34}}
@@ -657,14 +657,6 @@ are the same if they have identical IEEE 754 double-precision bit patterns.
657657

658658
Note: This means that two ''NaN'' values are the same.
659659

660-
To <dfn>set the dictionary members</dfn> <var>a</var> and <var>b</var> of a {{DOMMatrixInit}} dictionary, with a fallback value <var>fallback</var>, run the following steps:
661-
662-
<ol>
663-
<li>If <var>a</var> is present and <var>b</var> is not present, set the <var>b</var> dictionary member to the value of <var>a</var>.
664-
<li>Otherwise, if <var>b</var> is present and <var>a</var> is not present, set the <var>a</var> dictionary member to the value of <var>b</var>.
665-
<li>Otherwise, if neither <var>a</var> or <var>b</var> are present, set <var>a</var> and <var>b</var> dictionary members to <var>fallback</var>.
666-
</ol>
667-
668660
<h3 id='dommatrix-create'>Creating DOMMatrixReadOnly and DOMMatrix objects</h3>
669661

670662
To <dfn>create a 2d matrix</dfn> of type <var>type</var> being either {{DOMMatrixReadOnly}} or {{DOMMatrix}},

0 commit comments

Comments
 (0)