mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update mozjs.
This commit is contained in:
parent
2f94e0d2a8
commit
c2f8b0468a
5 changed files with 125 additions and 81 deletions
|
@ -61,8 +61,8 @@ impl DOMMatrix {
|
|||
// https://drafts.fxtf.org/geometry-1/#dom-dommatrix-fromfloat32array
|
||||
pub fn FromFloat32Array(
|
||||
global: &GlobalScope,
|
||||
mut array: CustomAutoRooterGuard<Float32Array>)
|
||||
-> Fallible<DomRoot<DOMMatrix>> {
|
||||
array: CustomAutoRooterGuard<Float32Array>,
|
||||
) -> Fallible<DomRoot<DOMMatrix>> {
|
||||
let vec: Vec<f64> = array.to_vec().iter().map(|&x| x as f64).collect();
|
||||
DOMMatrix::Constructor_(global, vec)
|
||||
}
|
||||
|
@ -70,11 +70,11 @@ impl DOMMatrix {
|
|||
// https://drafts.fxtf.org/geometry-1/#dom-dommatrix-fromfloat64array
|
||||
pub fn FromFloat64Array(
|
||||
global: &GlobalScope,
|
||||
mut array: CustomAutoRooterGuard<Float64Array>)
|
||||
-> Fallible<DomRoot<DOMMatrix>> {
|
||||
let vec: Vec<f64> = array.to_vec();
|
||||
DOMMatrix::Constructor_(global, vec)
|
||||
}
|
||||
array: CustomAutoRooterGuard<Float64Array>,
|
||||
) -> Fallible<DomRoot<DOMMatrix>> {
|
||||
let vec: Vec<f64> = array.to_vec();
|
||||
DOMMatrix::Constructor_(global, vec)
|
||||
}
|
||||
}
|
||||
|
||||
impl DOMMatrixMethods for DOMMatrix {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue