mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
feat: add can_gc argument to to_frozen_array (#36043)
* feat: add can_gc argument to to_frozen_array Signed-off-by: Arya Nair <aryaajitnair@gmail.com> * fix: linting issues Signed-off-by: Arya Nair <aryaajitnair@gmail.com> * feat: add can_gc in binding.conf Signed-off-by: Arya Nair <aryaajitnair@gmail.com> * fix: linting issues Signed-off-by: Arya Nair <aryaajitnair@gmail.com> --------- Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
This commit is contained in:
parent
0917e080df
commit
cb56ac8561
21 changed files with 97 additions and 43 deletions
|
@ -90,32 +90,37 @@ impl ResizeObserverEntryMethods<crate::DomTypeHolder> for ResizeObserverEntry {
|
|||
}
|
||||
|
||||
/// <https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-borderboxsize>
|
||||
fn BorderBoxSize(&self, cx: SafeJSContext, retval: MutableHandleValue) {
|
||||
fn BorderBoxSize(&self, cx: SafeJSContext, can_gc: CanGc, retval: MutableHandleValue) {
|
||||
let sizes: Vec<DomRoot<ResizeObserverSize>> = self
|
||||
.border_box_size
|
||||
.iter()
|
||||
.map(|size| DomRoot::from_ref(&**size))
|
||||
.collect();
|
||||
to_frozen_array(sizes.as_slice(), cx, retval)
|
||||
to_frozen_array(sizes.as_slice(), cx, retval, can_gc);
|
||||
}
|
||||
|
||||
/// <https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-contentboxsize>
|
||||
fn ContentBoxSize(&self, cx: SafeJSContext, retval: MutableHandleValue) {
|
||||
fn ContentBoxSize(&self, cx: SafeJSContext, can_gc: CanGc, retval: MutableHandleValue) {
|
||||
let sizes: Vec<DomRoot<ResizeObserverSize>> = self
|
||||
.content_box_size
|
||||
.iter()
|
||||
.map(|size| DomRoot::from_ref(&**size))
|
||||
.collect();
|
||||
to_frozen_array(sizes.as_slice(), cx, retval);
|
||||
to_frozen_array(sizes.as_slice(), cx, retval, can_gc);
|
||||
}
|
||||
|
||||
/// <https://drafts.csswg.org/resize-observer/#dom-resizeobserverentry-devicepixelcontentboxsize>
|
||||
fn DevicePixelContentBoxSize(&self, cx: SafeJSContext, retval: MutableHandleValue) {
|
||||
fn DevicePixelContentBoxSize(
|
||||
&self,
|
||||
cx: SafeJSContext,
|
||||
can_gc: CanGc,
|
||||
retval: MutableHandleValue,
|
||||
) {
|
||||
let sizes: Vec<DomRoot<ResizeObserverSize>> = self
|
||||
.device_pixel_content_box_size
|
||||
.iter()
|
||||
.map(|size| DomRoot::from_ref(&**size))
|
||||
.collect();
|
||||
to_frozen_array(sizes.as_slice(), cx, retval);
|
||||
to_frozen_array(sizes.as_slice(), cx, retval, can_gc);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue