mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
refactor: propagate CanGc arguments through callers (#35591)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
parent
02199520f2
commit
b0b0289014
74 changed files with 403 additions and 275 deletions
|
@ -221,10 +221,12 @@ impl PaintWorkletGlobalScope {
|
|||
device_pixel_ratio,
|
||||
properties,
|
||||
arguments,
|
||||
CanGc::note(),
|
||||
)
|
||||
}
|
||||
|
||||
/// <https://drafts.css-houdini.org/css-paint-api/#invoke-a-paint-callback>
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[allow(unsafe_code)]
|
||||
fn invoke_a_paint_callback(
|
||||
&self,
|
||||
|
@ -234,6 +236,7 @@ impl PaintWorkletGlobalScope {
|
|||
device_pixel_ratio: Scale<f32, CSSPixel, DevicePixel>,
|
||||
properties: &StylePropertyMapReadOnly,
|
||||
arguments: &[String],
|
||||
can_gc: CanGc,
|
||||
) -> DrawAPaintImageResult {
|
||||
debug!(
|
||||
"Invoking a paint callback {}({},{}) at {:?}.",
|
||||
|
@ -308,14 +311,14 @@ impl PaintWorkletGlobalScope {
|
|||
rendering_context.set_bitmap_dimensions(size_in_px, device_pixel_ratio);
|
||||
|
||||
// Step 9
|
||||
let paint_size = PaintSize::new(self, size_in_px, CanGc::note());
|
||||
let paint_size = PaintSize::new(self, size_in_px, can_gc);
|
||||
|
||||
// TODO: Step 10
|
||||
// Steps 11-12
|
||||
debug!("Invoking paint function {}.", name);
|
||||
rooted_vec!(let mut arguments_values);
|
||||
for argument in arguments {
|
||||
let style_value = CSSStyleValue::new(self.upcast(), argument.clone(), CanGc::note());
|
||||
let style_value = CSSStyleValue::new(self.upcast(), argument.clone(), can_gc);
|
||||
arguments_values.push(ObjectValue(style_value.reflector().get_jsobject().get()));
|
||||
}
|
||||
let arguments_value_array = HandleValueArray::from(&arguments_values);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue