Rename buffer_source_type to buffer_source (#31426)

* Rename buffer_source_type to buffer_source

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

* Code format

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>

---------

Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
Taym Haddadi 2024-02-26 15:21:46 +01:00 committed by GitHub
parent ef8a0b7f7b
commit a9a7e8a5cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 22 additions and 23 deletions

View file

@ -15,7 +15,7 @@ use js::typedarray::{Float32Array, Float64Array};
use style::parser::ParserContext;
use url::Url;
use crate::dom::bindings::buffer_source::create_buffer_source_types;
use crate::dom::bindings::buffer_source::create_buffer_source;
use crate::dom::bindings::cell::{DomRefCell, Ref};
use crate::dom::bindings::codegen::Bindings::DOMMatrixBinding::{DOMMatrixInit, DOMMatrixMethods};
use crate::dom::bindings::codegen::Bindings::DOMMatrixReadOnlyBinding::DOMMatrixReadOnlyMethods;
@ -686,14 +686,14 @@ impl DOMMatrixReadOnlyMethods for DOMMatrixReadOnly {
.map(|&x| x as f32)
.collect();
rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>());
create_buffer_source_types(cx, &vec, array.handle_mut())
create_buffer_source(cx, &vec, array.handle_mut())
.expect("Converting matrix to float32 array should never fail")
}
// https://drafts.fxtf.org/geometry-1/#dom-dommatrixreadonly-tofloat64array
fn ToFloat64Array(&self, cx: JSContext) -> Float64Array {
rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>());
create_buffer_source_types(cx, &self.matrix.borrow().to_array(), array.handle_mut())
create_buffer_source(cx, &self.matrix.borrow().to_array(), array.handle_mut())
.expect("Converting matrix to float64 array should never fail")
}
}