You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-typed-om/Overview.bs
+34-16
Original file line number
Diff line number
Diff line change
@@ -2010,27 +2010,18 @@ is a [=list=] of {{CSSTransformComponent}}s.
2010
2010
when called,
2011
2011
perform the following steps:
2012
2012
2013
-
1. Let |matrix| be a 4x4 matrix,
2014
-
initially set to the identity matrix.
2015
-
Let |is2D| be a boolean initially set to `true`.
2013
+
1. Let |matrix| be a new {{DOMMatrix}},
2014
+
initialized to the identity matrix,
2015
+
with its {{DOMMatrix/is2D}} internal slot set to `true`.
2016
2016
2017
2017
2. [=list/For each=] |func| in |this|’s [=values to iterate over=]:
2018
2018
2019
-
1. Let |funcMatrix| be |func|’s equivalent 4x4 transform matrix,
2020
-
as defined in [[css-transforms-1#mathematical-description]].
2021
-
2022
-
As the entries of such a matrix are defined relative to the ''px'' unit,
2023
-
if any <<length>>s in |func| involved in generating the matrix
2024
-
are not [=compatible units=] with ''px'',
2025
-
[=throw=] a {{TypeError}}.
2019
+
1. Let |funcMatrix| be the {{DOMMatrix}} returned by
2020
+
calling {{CSSTransformComponent/toMatrix()}} on |func|.
2026
2021
2. Set |matrix| to the result of multiplying |matrix|
2027
-
and |funcMatrix|.
2028
-
3. If |func|’s {{CSSTransformComponent/is2D}} internal slot is `false`,
2029
-
set |is2D| to `false`.
2022
+
and the matrix represented by |funcMatrix|.
2030
2023
2031
-
3. Return a new {{DOMMatrix}}
2032
-
representing |matrix|,
2033
-
and with its internal [=matrix/is 2D=] flag set to |is2D|.
2024
+
3. Return |matrix|.
2034
2025
</div>
2035
2026
2036
2027
The <dfn attribute for=CSSTransformValue>length</dfn> attribute indicates how many transform components are contained within the {{CSSTransformValue}}.
@@ -2041,6 +2032,7 @@ The <dfn for=CSSTransformValue>indexed getter</dfn> retrieves the transform comp
2041
2032
interface CSSTransformComponent {
2042
2033
stringifier;
2043
2034
attribute boolean is2D;
2035
+
DOMMatrix toMatrix();
2044
2036
};
2045
2037
2046
2038
[Constructor(CSSNumericValue x, CSSNumericValue y, optional CSSNumericValue z)]
@@ -2121,6 +2113,32 @@ The <dfn for=CSSTransformValue>indexed getter</dfn> retrieves the transform comp
2121
2113
but also prevents "accidentally" flipping a 2D transform into becoming 3D.
0 commit comments