From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../tests/css/geometry/DOMMatrix-001.html | 204 +++++++++++++ .../tests/css/geometry/DOMMatrix-002.html | 113 ++++++++ .../tests/css/geometry/DOMMatrix-003.html | 318 +++++++++++++++++++++ .../tests/css/geometry/DOMMatrix-a-f-alias.html | 57 ++++ .../tests/css/geometry/DOMMatrix-attributes.html | 66 +++++ .../css/geometry/DOMMatrix-css-string.worker.js | 38 +++ .../css/geometry/DOMMatrix-invert-invertible.html | 76 +++++ .../geometry/DOMMatrix-invert-non-invertible.html | 50 ++++ .../geometry/DOMMatrix-invert-preserves-2d.html | 41 +++ .../tests/css/geometry/DOMMatrix-newobject.html | 44 +++ .../tests/css/geometry/DOMMatrix-stringifier.html | 79 +++++ .../geometry/DOMMatrix2DInit-validate-fixup.html | 147 ++++++++++ .../css/geometry/DOMMatrixInit-validate-fixup.html | 132 +++++++++ .../tests/css/geometry/DOMPoint-001.html | 83 ++++++ .../tests/css/geometry/DOMPoint-002.html | 177 ++++++++++++ .../tests/css/geometry/DOMQuad-001.html | 156 ++++++++++ .../tests/css/geometry/DOMQuad-002.html | 173 +++++++++++ .../tests/css/geometry/DOMQuad-nan.html | 34 +++ .../tests/css/geometry/DOMRect-001.html | 161 +++++++++++ .../tests/css/geometry/DOMRect-002.html | 171 +++++++++++ .../tests/css/geometry/DOMRect-nan.html | 79 +++++ .../tests/css/geometry/DOMRectList.html | 36 +++ testing/web-platform/tests/css/geometry/META.yml | 4 + .../tests/css/geometry/WebKitCSSMatrix.html | 25 ++ .../tests/css/geometry/WebKitCSSMatrix.worker.js | 9 + .../tests/css/geometry/historical.html | 91 ++++++ .../tests/css/geometry/idlharness.any.js | 32 +++ .../tests/css/geometry/spec-examples.html | 92 ++++++ .../css/geometry/structured-serialization.html | 165 +++++++++++ .../css/geometry/support/dommatrix-test-util.js | 85 ++++++ 30 files changed, 2938 insertions(+) create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-001.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-002.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-003.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-a-f-alias.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-attributes.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-css-string.worker.js create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-invert-invertible.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-invert-non-invertible.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-invert-preserves-2d.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-newobject.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix-stringifier.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrix2DInit-validate-fixup.html create mode 100644 testing/web-platform/tests/css/geometry/DOMMatrixInit-validate-fixup.html create mode 100644 testing/web-platform/tests/css/geometry/DOMPoint-001.html create mode 100644 testing/web-platform/tests/css/geometry/DOMPoint-002.html create mode 100644 testing/web-platform/tests/css/geometry/DOMQuad-001.html create mode 100644 testing/web-platform/tests/css/geometry/DOMQuad-002.html create mode 100644 testing/web-platform/tests/css/geometry/DOMQuad-nan.html create mode 100644 testing/web-platform/tests/css/geometry/DOMRect-001.html create mode 100644 testing/web-platform/tests/css/geometry/DOMRect-002.html create mode 100644 testing/web-platform/tests/css/geometry/DOMRect-nan.html create mode 100644 testing/web-platform/tests/css/geometry/DOMRectList.html create mode 100644 testing/web-platform/tests/css/geometry/META.yml create mode 100644 testing/web-platform/tests/css/geometry/WebKitCSSMatrix.html create mode 100644 testing/web-platform/tests/css/geometry/WebKitCSSMatrix.worker.js create mode 100644 testing/web-platform/tests/css/geometry/historical.html create mode 100644 testing/web-platform/tests/css/geometry/idlharness.any.js create mode 100644 testing/web-platform/tests/css/geometry/spec-examples.html create mode 100644 testing/web-platform/tests/css/geometry/structured-serialization.html create mode 100644 testing/web-platform/tests/css/geometry/support/dommatrix-test-util.js (limited to 'testing/web-platform/tests/css/geometry') diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-001.html b/testing/web-platform/tests/css/geometry/DOMMatrix-001.html new file mode 100644 index 0000000000..1752c2c5ca --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-001.html @@ -0,0 +1,204 @@ + + + + Geometry Interfaces: DOMMatrix and DOMMatrixReadOnly constructors + + + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-002.html b/testing/web-platform/tests/css/geometry/DOMMatrix-002.html new file mode 100644 index 0000000000..c262f7822f --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-002.html @@ -0,0 +1,113 @@ + + + + Geometry Interfaces: DOMMatrixReadOnly methods do not mutate the object + + + + + + + +

Test DOMMatrixReadOnly methods do not mutate the object

+
+ + + diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-003.html b/testing/web-platform/tests/css/geometry/DOMMatrix-003.html new file mode 100644 index 0000000000..56f463e2ac --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-003.html @@ -0,0 +1,318 @@ + + + + Geometry Interfaces: Test DOMMatrix non-mutating methods + + + + + + +

Test DOMMatrix non-mutating methods

+
+ + + diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-a-f-alias.html b/testing/web-platform/tests/css/geometry/DOMMatrix-a-f-alias.html new file mode 100644 index 0000000000..ab14ec9d5c --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-a-f-alias.html @@ -0,0 +1,57 @@ + +Geometry Interfaces: DOMMatrix and DOMMatrixReadOnly a-f alias attributes + + + + diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-attributes.html b/testing/web-platform/tests/css/geometry/DOMMatrix-attributes.html new file mode 100644 index 0000000000..4b3db9d550 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-attributes.html @@ -0,0 +1,66 @@ + +Geometry Interfaces: DOMMatrix attributes + + + + diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-css-string.worker.js b/testing/web-platform/tests/css/geometry/DOMMatrix-css-string.worker.js new file mode 100644 index 0000000000..d11638b26a --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-css-string.worker.js @@ -0,0 +1,38 @@ +// https://drafts.fxtf.org/geometry/#DOMMatrix + +importScripts("/resources/testharness.js"); + +['DOMMatrix', 'DOMMatrixReadOnly'].forEach(constr => { + test(() => { + assert_true(constr in self, `${constr} should exist`); + assert_throws_js(TypeError, () => new self[constr]('matrix(1,0,0,1,0,0)') ); + }, `${constr} constructor with string argument in worker`); + + test(() => { + assert_true(constr in self, `${constr} should exist`); + assert_throws_js(TypeError, () => new self[constr]('') ); + }, `${constr} constructor with empty string argument in worker`); + + test(() => { + const matrix = new self[constr](); + assert_equals(String(matrix), `[object ${constr}]`); + }, `${constr} stringifier in worker (2d identity)`); + + test(() => { + const matrix = self[constr].fromMatrix({is2D: false}); + assert_equals(String(matrix), `[object ${constr}]`); + }, `${constr} stringifier in worker (3d identity)`); + + test(() => { + const matrix = new self[constr]([1, 0, 0, NaN, Infinity, -Infinity]); + assert_equals(String(matrix), `[object ${constr}]`); + }, `${constr} stringifier in worker (non-finite values)`); +}); + +test(() => { + assert_false('setMatrixValue' in DOMMatrix.prototype, 'on prototype'); + const matrix = new DOMMatrix(); + assert_false('setMatrixValue' in matrix, 'on instance'); +}, 'DOMMatrix setMatrixValue in worker'); + +done(); diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-invert-invertible.html b/testing/web-platform/tests/css/geometry/DOMMatrix-invert-invertible.html new file mode 100644 index 0000000000..d5bef624d2 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-invert-invertible.html @@ -0,0 +1,76 @@ + + + + + +

Test DOMMatrix.inverse()/invertSelf() for invertible matrices

+ diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-invert-non-invertible.html b/testing/web-platform/tests/css/geometry/DOMMatrix-invert-non-invertible.html new file mode 100644 index 0000000000..b3295321e0 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-invert-non-invertible.html @@ -0,0 +1,50 @@ + + + + +

Test DOMMatrix.inverse()/invertSelf() for non-invertible matrix

+ diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-invert-preserves-2d.html b/testing/web-platform/tests/css/geometry/DOMMatrix-invert-preserves-2d.html new file mode 100644 index 0000000000..a4f0b58496 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-invert-preserves-2d.html @@ -0,0 +1,41 @@ + +Test DOMMatrix.inverse()/invertSelf() keep is2D status + + + + diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-newobject.html b/testing/web-platform/tests/css/geometry/DOMMatrix-newobject.html new file mode 100644 index 0000000000..33604e3c67 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-newobject.html @@ -0,0 +1,44 @@ + +Geometry Interfaces: DOMMatrix and DOMMatrixReadOnly [NewObject] methods + + + + diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix-stringifier.html b/testing/web-platform/tests/css/geometry/DOMMatrix-stringifier.html new file mode 100644 index 0000000000..5a39238bef --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix-stringifier.html @@ -0,0 +1,79 @@ + +Geometry Interfaces: DOMMatrix and DOMMatrixReadOnly stringifier + + + + diff --git a/testing/web-platform/tests/css/geometry/DOMMatrix2DInit-validate-fixup.html b/testing/web-platform/tests/css/geometry/DOMMatrix2DInit-validate-fixup.html new file mode 100644 index 0000000000..a7257aa288 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrix2DInit-validate-fixup.html @@ -0,0 +1,147 @@ + +Geometry Interfaces: DOMMatrix2DInit validate and fixup + + + + + + + diff --git a/testing/web-platform/tests/css/geometry/DOMMatrixInit-validate-fixup.html b/testing/web-platform/tests/css/geometry/DOMMatrixInit-validate-fixup.html new file mode 100644 index 0000000000..78eaa78e21 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMMatrixInit-validate-fixup.html @@ -0,0 +1,132 @@ + +Geometry Interfaces: DOMMatrixInit validate and fixup + + + + + diff --git a/testing/web-platform/tests/css/geometry/DOMPoint-001.html b/testing/web-platform/tests/css/geometry/DOMPoint-001.html new file mode 100644 index 0000000000..945f4674de --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMPoint-001.html @@ -0,0 +1,83 @@ + + + + Geometry Interfaces: DOMPoint and DOMPointReadOnly interface tests + + + + + + + + +

Test DOMPoint and DOMPointReadOnly interfaces

+
+ + + diff --git a/testing/web-platform/tests/css/geometry/DOMPoint-002.html b/testing/web-platform/tests/css/geometry/DOMPoint-002.html new file mode 100644 index 0000000000..96276d86f5 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMPoint-002.html @@ -0,0 +1,177 @@ + + + Geometry Interfaces: DOMPoint and DOMPointReadOnly interface tests + + + + + + +

Test DOMPoint and DOMPointReadOnly interfaces

+
+ + + + diff --git a/testing/web-platform/tests/css/geometry/DOMQuad-001.html b/testing/web-platform/tests/css/geometry/DOMQuad-001.html new file mode 100644 index 0000000000..6fa765bbab --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMQuad-001.html @@ -0,0 +1,156 @@ + + + + Geometry Interfaces: DOMQuad interface tests + + + + + + + + + + + +

Test DOMQuad interface

+
+ + + diff --git a/testing/web-platform/tests/css/geometry/DOMQuad-002.html b/testing/web-platform/tests/css/geometry/DOMQuad-002.html new file mode 100644 index 0000000000..5734be1f29 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMQuad-002.html @@ -0,0 +1,173 @@ + + + + Geometry Interfaces: DOMQuad interface tests + + + + + + +

Test DOMQuad interface

+
+ + + diff --git a/testing/web-platform/tests/css/geometry/DOMQuad-nan.html b/testing/web-platform/tests/css/geometry/DOMQuad-nan.html new file mode 100644 index 0000000000..8d93d5ecfa --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMQuad-nan.html @@ -0,0 +1,34 @@ + + +DOMRect's handling of NaN in top/bottom/left/right + + + + + + + diff --git a/testing/web-platform/tests/css/geometry/DOMRect-001.html b/testing/web-platform/tests/css/geometry/DOMRect-001.html new file mode 100644 index 0000000000..3055d8d26b --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMRect-001.html @@ -0,0 +1,161 @@ + + + + Geometry Interfaces: DOMRect and DOMRectReadOnly interface tests + + + + + + + + + + + + + + +

Test DOMRect and DOMRectReadOnly interfaces

+
+ + + diff --git a/testing/web-platform/tests/css/geometry/DOMRect-002.html b/testing/web-platform/tests/css/geometry/DOMRect-002.html new file mode 100644 index 0000000000..a5f0f88428 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMRect-002.html @@ -0,0 +1,171 @@ + + + + Geometry Interfaces: DOMRect and DOMRectReadOnly interface tests + + + + + + +
+ + + diff --git a/testing/web-platform/tests/css/geometry/DOMRect-nan.html b/testing/web-platform/tests/css/geometry/DOMRect-nan.html new file mode 100644 index 0000000000..4a7cde5d33 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMRect-nan.html @@ -0,0 +1,79 @@ + + +DOMQuad's handling of NaN in getBounds() + + + + diff --git a/testing/web-platform/tests/css/geometry/DOMRectList.html b/testing/web-platform/tests/css/geometry/DOMRectList.html new file mode 100644 index 0000000000..e389c33fa6 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/DOMRectList.html @@ -0,0 +1,36 @@ + +Geometry interfaces: DOMRectList + + + +
x
+ diff --git a/testing/web-platform/tests/css/geometry/META.yml b/testing/web-platform/tests/css/geometry/META.yml new file mode 100644 index 0000000000..98a2ae9860 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/META.yml @@ -0,0 +1,4 @@ +spec: https://drafts.fxtf.org/geometry/ +suggested_reviewers: + - peterjoel + - dirkschulze diff --git a/testing/web-platform/tests/css/geometry/WebKitCSSMatrix.html b/testing/web-platform/tests/css/geometry/WebKitCSSMatrix.html new file mode 100644 index 0000000000..7c28a5c7fb --- /dev/null +++ b/testing/web-platform/tests/css/geometry/WebKitCSSMatrix.html @@ -0,0 +1,25 @@ + +Geometry Interfaces: WebKitCSSMatrix + + + + diff --git a/testing/web-platform/tests/css/geometry/WebKitCSSMatrix.worker.js b/testing/web-platform/tests/css/geometry/WebKitCSSMatrix.worker.js new file mode 100644 index 0000000000..71e2ecd395 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/WebKitCSSMatrix.worker.js @@ -0,0 +1,9 @@ +// https://drafts.fxtf.org/geometry/#DOMMatrix + +importScripts('/resources/testharness.js'); + +test(() => { + assert_false('WebKitCSSMatrix' in self); +}, 'WebKitCSSMatrix in worker'); + +done(); diff --git a/testing/web-platform/tests/css/geometry/historical.html b/testing/web-platform/tests/css/geometry/historical.html new file mode 100644 index 0000000000..ddc3c777a0 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/historical.html @@ -0,0 +1,91 @@ + +Historical Geometry APIs + + + + diff --git a/testing/web-platform/tests/css/geometry/idlharness.any.js b/testing/web-platform/tests/css/geometry/idlharness.any.js new file mode 100644 index 0000000000..5c9170b8a6 --- /dev/null +++ b/testing/web-platform/tests/css/geometry/idlharness.any.js @@ -0,0 +1,32 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +// https://drafts.fxtf.org/geometry/#DOMPoint +// https://drafts.fxtf.org/geometry/#DOMRect +// https://drafts.fxtf.org/geometry/#DOMQuad +// https://drafts.fxtf.org/geometry/#DOMMatrix + +"use strict"; + +idl_test( + ["geometry"], + [], + idlArray => { + const domRectListList = []; + if ("document" in self) { + domRectListList.push(document.getElementById('log').getClientRects()); + } + idlArray.add_objects({ + DOMPointReadOnly: ["new DOMPointReadOnly()"], + DOMPoint: ["new DOMPoint()"], + DOMRectReadOnly: ["new DOMRectReadOnly()"], + DOMRect: ["new DOMRect()"], + DOMRectList: domRectListList, + DOMQuad: ["new DOMQuad()"], + DOMMatrixReadOnly: ["new DOMMatrixReadOnly()", "DOMMatrixReadOnly.fromMatrix({is2D: false})"], + DOMMatrix: ["new DOMMatrix()", "DOMMatrix.fromMatrix({is2D: false})"] + }); + idlArray.prevent_multiple_testing("DOMMatrixReadOnly"); + idlArray.prevent_multiple_testing("DOMMatrix"); + } +); diff --git a/testing/web-platform/tests/css/geometry/spec-examples.html b/testing/web-platform/tests/css/geometry/spec-examples.html new file mode 100644 index 0000000000..61efa2a89b --- /dev/null +++ b/testing/web-platform/tests/css/geometry/spec-examples.html @@ -0,0 +1,92 @@ + +Geometry APIs spec examples + + + + diff --git a/testing/web-platform/tests/css/geometry/structured-serialization.html b/testing/web-platform/tests/css/geometry/structured-serialization.html new file mode 100644 index 0000000000..5c3e5dd93b --- /dev/null +++ b/testing/web-platform/tests/css/geometry/structured-serialization.html @@ -0,0 +1,165 @@ + +Geometry Interfaces: Serialize and deserialize + + + +
+ diff --git a/testing/web-platform/tests/css/geometry/support/dommatrix-test-util.js b/testing/web-platform/tests/css/geometry/support/dommatrix-test-util.js new file mode 100644 index 0000000000..40c336ea8c --- /dev/null +++ b/testing/web-platform/tests/css/geometry/support/dommatrix-test-util.js @@ -0,0 +1,85 @@ +// This formats dict as a string suitable as test name. +// format_value() is provided by testharness.js, +// which also preserves sign for -0. +function format_dict(dict) { + const props = []; + for (let prop in dict) { + props.push(`${prop}: ${format_value(dict[prop])}`); + } + return `{${props.join(', ')}}`; +} + +// Create a normal JS object with the expected properties +// from a dict with only m11..m44 specified (not a..f). +function matrix3D(dict) { + const matrix = {m11: 1, m12: 0, m13: 0, m14: 0, + m21: 0, m22: 1, m23: 0, m24: 0, + m31: 0, m32: 0, m33: 1, m34: 0, + m41: 0, m42: 0, m43: 0, m44: 1} + matrix.is2D = false; + for (let member in dict) { + matrix[member] = dict[member]; + } + matrix.a = matrix.m11; + matrix.b = matrix.m12; + matrix.c = matrix.m21; + matrix.d = matrix.m22; + matrix.e = matrix.m41; + matrix.f = matrix.m42; + return matrix; +} + +function matrix2D(dict) { + const matrix = matrix3D(dict); + matrix.is2D = true; + return matrix; +} + +function checkMatrix(actual, expected, { epsilon = Number.MIN_VALUE } = {}) { + for (let member in expected) { + if (epsilon && typeof expected[member] === "number") { + assert_approx_equals(actual[member], expected[member], epsilon, member); + } else { + assert_equals(actual[member], expected[member], member); + } + } +} + +// checkMatrix and checkDOMMatrix should probably be merged... +function checkDOMMatrix(m, exp, is2D) { + if (is2D === undefined) { + is2D = exp.is2D; + } + assert_equals(m.m11, exp.m11, "Expected value for m11 is " + exp.m11); + assert_equals(m.m12, exp.m12, "Expected value for m12 is " + exp.m12); + assert_equals(m.m13, exp.m13, "Expected value for m13 is " + exp.m13); + assert_equals(m.m14, exp.m14, "Expected value for m14 is " + exp.m14); + assert_equals(m.m21, exp.m21, "Expected value for m21 is " + exp.m21); + assert_equals(m.m22, exp.m22, "Expected value for m22 is " + exp.m22); + assert_equals(m.m23, exp.m23, "Expected value for m23 is " + exp.m23); + assert_equals(m.m24, exp.m24, "Expected value for m24 is " + exp.m24); + assert_equals(m.m31, exp.m31, "Expected value for m31 is " + exp.m31); + assert_equals(m.m32, exp.m32, "Expected value for m32 is " + exp.m32); + assert_equals(m.m33, exp.m33, "Expected value for m33 is " + exp.m33); + assert_equals(m.m34, exp.m34, "Expected value for m34 is " + exp.m34); + assert_equals(m.m41, exp.m41, "Expected value for m41 is " + exp.m41); + assert_equals(m.m42, exp.m42, "Expected value for m42 is " + exp.m42); + assert_equals(m.m43, exp.m43, "Expected value for m43 is " + exp.m43); + assert_equals(m.m44, exp.m44, "Expected value for m44 is " + exp.m44); + assert_equals(m.is2D, is2D, "Expected value for is2D is " + is2D); + assert_equals(m.isIdentity, exp.isIdentity, "Expected value for isIdentity is " + exp.isIdentity); +} + + +function identity() { + return new DOMMatrix( + [1, 0, 0, 0, + 0, 1, 0 ,0, + 0, 0, 1, 0, + 0, 0, 0, 1]); +} + +function update(matrix, f) { + f(matrix); + return matrix; +} -- cgit v1.2.3