Skip to content

Commit 97d264b

Browse files
committed
DOMMatrix and DOMMatrixReadOnly stubs replaced by a real impl (incomplete)
1 parent dd0082a commit 97d264b

File tree

5 files changed

+45
-2
lines changed

5 files changed

+45
-2
lines changed

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
<body>
1010
<release version="4.17.0" date="September xx, 2025" description="Chrome/Edge 140, Firefox 142, Bugfixes">
11+
<action type="add" dev="rbri" issue="#371">
12+
DOMMatrix and DOMMatrixReadOnly stubs replaced by a real impl (incomplete).
13+
</action>
1114
<action type="fix" dev="René Schwietzke" issue="#1014">
1215
Properly synchronize access to httpClientBuilder_ in class HttpWebConnection.
1316
</action>

src/main/java/org/htmlunit/javascript/host/dom/DOMMatrix.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ public double getF() {
441441
public void setF(final double f) {
442442
super.setM42(f);
443443
}
444+
444445
/**
445446
* @return inverts the original matrix. If the matrix cannot be inverted,
446447
* the new matrix's components are all set to NaN and its is2D property is set to false.

src/main/java/org/htmlunit/javascript/host/dom/DOMMatrixReadOnly.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,6 @@ public DOMMatrixReadOnly rotateAxisAngle(
853853
*/
854854
@JsxFunction
855855
public DOMMatrixReadOnly skewX(final Object alphaObj) {
856-
857856
// Default values
858857
double alpha = 0;
859858
if (alphaObj != null && !JavaScriptEngine.isUndefined(alphaObj)) {
@@ -880,7 +879,6 @@ public DOMMatrixReadOnly skewX(final Object alphaObj) {
880879
*/
881880
@JsxFunction
882881
public DOMMatrixReadOnly skewY(final Object alphaObj) {
883-
884882
// Default values
885883
double alpha = 0;
886884
if (alphaObj != null && !JavaScriptEngine.isUndefined(alphaObj)) {

src/test/java/org/htmlunit/general/ElementOwnPropertiesTest.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18383,6 +18383,30 @@ public void styleMedia() throws Exception {
1838318383
+ "m41[GCE],m42[GCE],m43[GCE],m44[GCE],multiply(),rotate(),rotateAxisAngle(),"
1838418384
+ "rotateFromVector(),scale(),scale3d(),scaleNonUniform(),skewX(),skewY(),"
1838518385
+ "toFloat32Array(),toFloat64Array(),toJSON(),toString(),transformPoint(),translate()")
18386+
@HtmlUnitNYI(CHROME = "a[GCE],b[GCE],c[GCE],constructor(),d[GCE],e[GCE],f[GCE],flipX(),flipY(),"
18387+
+ "inverse(),is2D[GCE],m11[GCE],m12[GCE],m13[GCE],m14[GCE],"
18388+
+ "m21[GCE],m22[GCE],m23[GCE],m24[GCE],m31[GCE],m32[GCE],m33[GCE],m34[GCE],"
18389+
+ "m41[GCE],m42[GCE],m43[GCE],m44[GCE],multiply(),rotate(),rotateAxisAngle(),"
18390+
+ "skewX(),skewY(),"
18391+
+ "toFloat32Array(),toFloat64Array(),translate()",
18392+
EDGE = "a[GCE],b[GCE],c[GCE],constructor(),d[GCE],e[GCE],f[GCE],flipX(),flipY(),"
18393+
+ "inverse(),is2D[GCE],m11[GCE],m12[GCE],m13[GCE],m14[GCE],"
18394+
+ "m21[GCE],m22[GCE],m23[GCE],m24[GCE],m31[GCE],m32[GCE],m33[GCE],m34[GCE],"
18395+
+ "m41[GCE],m42[GCE],m43[GCE],m44[GCE],multiply(),rotate(),rotateAxisAngle(),"
18396+
+ "skewX(),skewY(),"
18397+
+ "toFloat32Array(),toFloat64Array(),translate()",
18398+
FF = "a[GCE],b[GCE],c[GCE],constructor(),d[GCE],e[GCE],f[GCE],flipX(),flipY(),"
18399+
+ "inverse(),is2D[GCE],m11[GCE],m12[GCE],m13[GCE],m14[GCE],"
18400+
+ "m21[GCE],m22[GCE],m23[GCE],m24[GCE],m31[GCE],m32[GCE],m33[GCE],m34[GCE],"
18401+
+ "m41[GCE],m42[GCE],m43[GCE],m44[GCE],multiply(),rotate(),rotateAxisAngle(),"
18402+
+ "skewX(),skewY(),"
18403+
+ "toFloat32Array(),toFloat64Array(),translate()",
18404+
FF_ESR = "a[GCE],b[GCE],c[GCE],constructor(),d[GCE],e[GCE],f[GCE],flipX(),flipY(),"
18405+
+ "inverse(),is2D[GCE],m11[GCE],m12[GCE],m13[GCE],m14[GCE],"
18406+
+ "m21[GCE],m22[GCE],m23[GCE],m24[GCE],m31[GCE],m32[GCE],m33[GCE],m34[GCE],"
18407+
+ "m41[GCE],m42[GCE],m43[GCE],m44[GCE],multiply(),rotate(),rotateAxisAngle(),"
18408+
+ "skewX(),skewY(),"
18409+
+ "toFloat32Array(),toFloat64Array(),translate()")
1838618410
public void domMatrixReadOnly() throws Exception {
1838718411
testString("", "new DOMMatrixReadOnly()");
1838818412
}
@@ -18417,6 +18441,22 @@ public void domMatrixReadOnly() throws Exception {
1841718441
+ "m43[GSCE],m44[GSCE],multiplySelf(),preMultiplySelf(),rotateAxisAngleSelf(),"
1841818442
+ "rotateFromVectorSelf(),rotateSelf(),scale3dSelf(),scaleSelf(),"
1841918443
+ "setMatrixValue(),skewXSelf(),skewYSelf(),translateSelf()")
18444+
@HtmlUnitNYI(CHROME = "a[GSCE],b[GSCE],c[GSCE],constructor(),d[GSCE],e[GSCE],f[GSCE],invertSelf(),"
18445+
+ "m11[GSCE],m12[GSCE],m13[GSCE],m14[GSCE],m21[GSCE],m22[GSCE],m23[GSCE],"
18446+
+ "m24[GSCE],m31[GSCE],m32[GSCE],m33[GSCE],m34[GSCE],m41[GSCE],m42[GSCE],"
18447+
+ "m43[GSCE],m44[GSCE]",
18448+
EDGE = "a[GSCE],b[GSCE],c[GSCE],constructor(),d[GSCE],e[GSCE],f[GSCE],invertSelf(),"
18449+
+ "m11[GSCE],m12[GSCE],m13[GSCE],m14[GSCE],m21[GSCE],m22[GSCE],m23[GSCE],"
18450+
+ "m24[GSCE],m31[GSCE],m32[GSCE],m33[GSCE],m34[GSCE],m41[GSCE],m42[GSCE],"
18451+
+ "m43[GSCE],m44[GSCE]",
18452+
FF = "a[GSCE],b[GSCE],c[GSCE],constructor(),d[GSCE],e[GSCE],f[GSCE],invertSelf(),"
18453+
+ "m11[GSCE],m12[GSCE],m13[GSCE],m14[GSCE],m21[GSCE],m22[GSCE],m23[GSCE],"
18454+
+ "m24[GSCE],m31[GSCE],m32[GSCE],m33[GSCE],m34[GSCE],m41[GSCE],m42[GSCE],"
18455+
+ "m43[GSCE],m44[GSCE]",
18456+
FF_ESR = "a[GSCE],b[GSCE],c[GSCE],constructor(),d[GSCE],e[GSCE],f[GSCE],invertSelf(),"
18457+
+ "m11[GSCE],m12[GSCE],m13[GSCE],m14[GSCE],m21[GSCE],m22[GSCE],m23[GSCE],"
18458+
+ "m24[GSCE],m31[GSCE],m32[GSCE],m33[GSCE],m34[GSCE],m41[GSCE],m42[GSCE],"
18459+
+ "m43[GSCE],m44[GSCE]")
1842018460
public void domMatrix() throws Exception {
1842118461
testString("", "new DOMMatrix()");
1842218462
}

src/test/java/org/htmlunit/javascript/host/dom/DOMMatrixReadOnlyTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,7 @@ public void multiplyAssociativity() throws Exception {
11831183

11841184
loadPageVerifyTitle2(html);
11851185
}
1186+
11861187
/**
11871188
* @throws Exception on test failure
11881189
*/

0 commit comments

Comments
 (0)