Bug 1560119: Remove DOMMatrix scaleNonUniformSelf() r=bzbarsky
We probably just can remove it given that no other implementations are there. Differential Revision: https://phabricator.services.mozilla.com/D36491
This commit is contained in:
@@ -807,15 +807,6 @@ DOMMatrix* DOMMatrix::Scale3dSelf(double aScale, double aOriginX,
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
DOMMatrix* DOMMatrix::ScaleNonUniformSelf(double aScaleX, double aScaleY,
|
|
||||||
double aScaleZ, double aOriginX,
|
|
||||||
double aOriginY, double aOriginZ) {
|
|
||||||
ScaleSelf(aScaleX, Optional<double>(aScaleY), aScaleZ, aOriginX, aOriginY,
|
|
||||||
aOriginZ);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
DOMMatrix* DOMMatrix::RotateFromVectorSelf(double aX, double aY) {
|
DOMMatrix* DOMMatrix::RotateFromVectorSelf(double aX, double aY) {
|
||||||
if (aX == 0.0 || aY == 0.0) {
|
if (aX == 0.0 || aY == 0.0) {
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -281,9 +281,6 @@ class DOMMatrix : public DOMMatrixReadOnly {
|
|||||||
double aOriginZ);
|
double aOriginZ);
|
||||||
DOMMatrix* Scale3dSelf(double aScale, double aOriginX = 0,
|
DOMMatrix* Scale3dSelf(double aScale, double aOriginX = 0,
|
||||||
double aOriginY = 0, double aOriginZ = 0);
|
double aOriginY = 0, double aOriginZ = 0);
|
||||||
DOMMatrix* ScaleNonUniformSelf(double aScaleX, double aScaleY = 1,
|
|
||||||
double aScaleZ = 1, double aOriginX = 0,
|
|
||||||
double aOriginY = 0, double aOriginZ = 0);
|
|
||||||
DOMMatrix* RotateSelf(double aAngle, double aOriginX = 0,
|
DOMMatrix* RotateSelf(double aAngle, double aOriginX = 0,
|
||||||
double aOriginY = 0);
|
double aOriginY = 0);
|
||||||
DOMMatrix* RotateFromVectorSelf(double aX, double aY);
|
DOMMatrix* RotateFromVectorSelf(double aX, double aY);
|
||||||
|
|||||||
@@ -133,7 +133,6 @@ function main()
|
|||||||
testInverseInPlace,
|
testInverseInPlace,
|
||||||
testTranslateInPlace,
|
testTranslateInPlace,
|
||||||
testScaleInPlace,
|
testScaleInPlace,
|
||||||
testScaleNonUniformInPlace,
|
|
||||||
testRotateInPlace,
|
testRotateInPlace,
|
||||||
testRotateFromVectorInPlace,
|
testRotateFromVectorInPlace,
|
||||||
testSkewXInPlace,
|
testSkewXInPlace,
|
||||||
@@ -388,15 +387,6 @@ function testScaleInPlace()
|
|||||||
"Unexpected result after scale");
|
"Unexpected result after scale");
|
||||||
}
|
}
|
||||||
|
|
||||||
// DOMMatrix scaleNonUniform(in float scaleFactorX, in float scaleFactorY);
|
|
||||||
function testScaleNonUniformInPlace()
|
|
||||||
{
|
|
||||||
var m = createMatrix(2, 0, 0, 1, 120, 100);
|
|
||||||
m.scaleNonUniformSelf(0.5, -3);
|
|
||||||
roughCmpMatrix(m, [1, 0, 0, -3, 120, 100],
|
|
||||||
"Unexpected result after scaleNonUniform");
|
|
||||||
}
|
|
||||||
|
|
||||||
// DOMMatrix rotate(in float angle);
|
// DOMMatrix rotate(in float angle);
|
||||||
function testRotateInPlace()
|
function testRotateInPlace()
|
||||||
{
|
{
|
||||||
@@ -682,7 +672,7 @@ function test3D()
|
|||||||
var m = new DOMMatrix()
|
var m = new DOMMatrix()
|
||||||
var m2 = new Matrix3D();
|
var m2 = new Matrix3D();
|
||||||
|
|
||||||
m.translateSelf(2,3,4).scaleNonUniformSelf(1.2, 2.3, 3.4, 0, 0, 0);
|
m.translateSelf(2,3,4).scaleSelf(1.2, 2.3, 3.4, 0, 0, 0);
|
||||||
m2 = m2.multiply(m2.translate(2,3,4)).multiply(m2.scale(1.2, 2.3, 3.4)).swap();
|
m2 = m2.multiply(m2.translate(2,3,4)).multiply(m2.scale(1.2, 2.3, 3.4)).swap();
|
||||||
|
|
||||||
ok(CompareMatrix(m2, m), "translate + scale in 3d didn't match, expected: " + formatMatrix(m2.m) + ", got: " + formatMatrix(m));
|
ok(CompareMatrix(m2, m), "translate + scale in 3d didn't match, expected: " + formatMatrix(m2.m) + ", got: " + formatMatrix(m));
|
||||||
@@ -698,7 +688,7 @@ function testParsing()
|
|||||||
{
|
{
|
||||||
var m = new DOMMatrix("translate(10px, 20px) scale(.5, 2) rotate(45deg)");
|
var m = new DOMMatrix("translate(10px, 20px) scale(.5, 2) rotate(45deg)");
|
||||||
var m2 = new DOMMatrix();
|
var m2 = new DOMMatrix();
|
||||||
m2.translateSelf(10, 20).scaleNonUniformSelf(.5,2).rotateSelf(45);
|
m2.translateSelf(10, 20).scaleSelf(.5,2).rotateSelf(45);
|
||||||
ok(CompareDOMMatrix(m2, m), "string parsing didn't match");
|
ok(CompareDOMMatrix(m2, m), "string parsing didn't match");
|
||||||
|
|
||||||
m = new DOMMatrix();
|
m = new DOMMatrix();
|
||||||
|
|||||||
@@ -137,12 +137,6 @@ interface DOMMatrix : DOMMatrixReadOnly {
|
|||||||
optional unrestricted double originX = 0,
|
optional unrestricted double originX = 0,
|
||||||
optional unrestricted double originY = 0,
|
optional unrestricted double originY = 0,
|
||||||
optional unrestricted double originZ = 0);
|
optional unrestricted double originZ = 0);
|
||||||
DOMMatrix scaleNonUniformSelf(unrestricted double scaleX,
|
|
||||||
optional unrestricted double scaleY = 1,
|
|
||||||
optional unrestricted double scaleZ = 1,
|
|
||||||
optional unrestricted double originX = 0,
|
|
||||||
optional unrestricted double originY = 0,
|
|
||||||
optional unrestricted double originZ = 0);
|
|
||||||
DOMMatrix rotateSelf(unrestricted double angle,
|
DOMMatrix rotateSelf(unrestricted double angle,
|
||||||
optional unrestricted double originX = 0,
|
optional unrestricted double originX = 0,
|
||||||
optional unrestricted double originY = 0);
|
optional unrestricted double originY = 0);
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
[historical.html]
|
[historical.html]
|
||||||
[DOMMatrix scaleNonUniformSelf must be nuked]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DOMMatrixReadOnly rotateFromVector number of required arguments]
|
[DOMMatrixReadOnly rotateFromVector number of required arguments]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user