Skip to content

Commit d312dfa

Browse files
zcorpansvgeesus
authored andcommitted
Do not expose CSS parser in workers for DOMMatrix
Annotate setMatrixValue with [Exposed=Window] and throw TypeError when DOMMatrix/DOMMatrixReadOnly is constructed with a string if the current global is not a Window. Fixes #122. Tests: web-platform-tests/wpt#5769
1 parent 7e7b320 commit d312dfa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

geometry/Overview.bs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ interface DOMMatrix : DOMMatrixReadOnly {
569569
DOMMatrix skewYSelf(optional unrestricted double sy = 0);
570570
DOMMatrix invertSelf();
571571

572-
DOMMatrix setMatrixValue(DOMString transformList);
572+
[Exposed=Window] DOMMatrix setMatrixValue(DOMString transformList);
573573
};
574574

575575
dictionary DOMMatrixInit {
@@ -683,6 +683,8 @@ the <dfn dfn-type=constructor dfn-for=DOMMatrix><code>DOMMatrix(<var>init</var>)
683683
<dt>If <var>init</var> is a {{DOMString}}</dt>
684684
<dd>
685685
<ol>
686+
<li>If <a>current global object</a> is not a {{Window}} object, then throw a {{TypeError}}
687+
exception.</li>
686688
<li>If <var>init</var> is the empty string, set it to the string
687689
"<code>matrix(1, 0, 0, 1, 0, 0)</code>".</li>
688690
<li>Parse <var>init</var> into <var>parsedValue</var> by following the syntax description in

0 commit comments

Comments
 (0)