mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #23685 - saschanaz:scalenonuniform, r=paulrouget
Add DOMMatrix.prototype.scaleNonUniform <!-- Please describe your changes on the following line: --> Implements `scaleNonUniform()` [per the spec](https://drafts.fxtf.org/geometry/#dom-dommatrixreadonly-scalenonuniform). --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23683 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23685) <!-- Reviewable:end -->
This commit is contained in:
commit
fee1418b43
6 changed files with 14 additions and 32 deletions
|
@ -571,6 +571,18 @@ impl DOMMatrixReadOnlyMethods for DOMMatrixReadOnly {
|
||||||
.ScaleSelf(scaleX, scaleY, scaleZ, originX, originY, originZ)
|
.ScaleSelf(scaleX, scaleY, scaleZ, originX, originY, originZ)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://drafts.fxtf.org/geometry/#dom-dommatrixreadonly-scalenonuniform
|
||||||
|
fn ScaleNonUniform(&self, scaleX: f64, scaleY: f64) -> DomRoot<DOMMatrix> {
|
||||||
|
DOMMatrix::from_readonly(&self.global(), self).ScaleSelf(
|
||||||
|
scaleX,
|
||||||
|
Some(scaleY),
|
||||||
|
1.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
0.0,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// https://drafts.fxtf.org/geometry-1/#dom-dommatrixreadonly-scale3d
|
// https://drafts.fxtf.org/geometry-1/#dom-dommatrixreadonly-scale3d
|
||||||
fn Scale3d(&self, scale: f64, originX: f64, originY: f64, originZ: f64) -> DomRoot<DOMMatrix> {
|
fn Scale3d(&self, scale: f64, originX: f64, originY: f64, originZ: f64) -> DomRoot<DOMMatrix> {
|
||||||
DOMMatrix::from_readonly(&self.global(), self).Scale3dSelf(scale, originX, originY, originZ)
|
DOMMatrix::from_readonly(&self.global(), self).Scale3dSelf(scale, originX, originY, originZ)
|
||||||
|
|
|
@ -56,6 +56,8 @@ interface 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);
|
||||||
|
[NewObject] DOMMatrix scaleNonUniform(optional unrestricted double scaleX = 1,
|
||||||
|
optional unrestricted double scaleY = 1);
|
||||||
DOMMatrix scale3d(optional unrestricted double scale = 1,
|
DOMMatrix scale3d(optional unrestricted double scale = 1,
|
||||||
optional unrestricted double originX = 0,
|
optional unrestricted double originX = 0,
|
||||||
optional unrestricted double originY = 0,
|
optional unrestricted double originY = 0,
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[DOMMatrix-002.html]
|
|
||||||
[test scaleNonUniform() doesn't mutate]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -5,13 +5,3 @@
|
||||||
|
|
||||||
[test rotateAxisAngle() ]
|
[test rotateAxisAngle() ]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[test scaleNonUniform() with sx]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[test scaleNonUniform() with sx, sy]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[test scaleNonUniform()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -375,15 +375,6 @@
|
||||||
[Geometry APIs interface IDL tests]
|
[Geometry APIs interface IDL tests]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[DOMMatrixReadOnly interface: calling scaleNonUniform(unrestricted double, unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "scaleNonUniform(unrestricted double, unrestricted double)" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DOMMatrixReadOnly interface: operation scaleNonUniform(unrestricted double, unrestricted double)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DOMPointReadOnly interface: default toJSON operation on new DOMPoint()]
|
[DOMPointReadOnly interface: default toJSON operation on new DOMPoint()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -98,15 +98,6 @@
|
||||||
[interfaces]
|
[interfaces]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[DOMMatrixReadOnly interface: calling scaleNonUniform(unrestricted double, unrestricted double) on new DOMMatrixReadOnly() with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DOMMatrixReadOnly interface: new DOMMatrixReadOnly() must inherit property "scaleNonUniform(unrestricted double, unrestricted double)" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DOMMatrixReadOnly interface: operation scaleNonUniform(unrestricted double, unrestricted double)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[DOMPointReadOnly interface: default toJSON operation on new DOMPoint()]
|
[DOMPointReadOnly interface: default toJSON operation on new DOMPoint()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue