mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Propagate CanGc
arguments through callers in constructors (#35541)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
parent
5465bfc2af
commit
863d2ce871
260 changed files with 986 additions and 603 deletions
|
@ -49,7 +49,7 @@ use crate::dom::paintsize::PaintSize;
|
|||
use crate::dom::stylepropertymapreadonly::StylePropertyMapReadOnly;
|
||||
use crate::dom::worklet::WorkletExecutor;
|
||||
use crate::dom::workletglobalscope::{WorkletGlobalScope, WorkletGlobalScopeInit, WorkletTask};
|
||||
use crate::script_runtime::JSContext;
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
|
||||
/// <https://drafts.css-houdini.org/css-paint-api/#paintworkletglobalscope>
|
||||
#[dom_struct]
|
||||
|
@ -155,6 +155,7 @@ impl PaintWorkletGlobalScope {
|
|||
let map = StylePropertyMapReadOnly::from_iter(
|
||||
self.upcast(),
|
||||
properties.iter().cloned(),
|
||||
CanGc::note(),
|
||||
);
|
||||
let result =
|
||||
self.draw_a_paint_image(&name, size, device_pixel_ratio, &map, &arguments);
|
||||
|
@ -180,6 +181,7 @@ impl PaintWorkletGlobalScope {
|
|||
let map = StylePropertyMapReadOnly::from_iter(
|
||||
self.upcast(),
|
||||
properties.iter().cloned(),
|
||||
CanGc::note(),
|
||||
);
|
||||
let result =
|
||||
self.draw_a_paint_image(&name, size, device_pixel_ratio, &map, &arguments);
|
||||
|
@ -306,14 +308,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);
|
||||
let paint_size = PaintSize::new(self, size_in_px, CanGc::note());
|
||||
|
||||
// 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());
|
||||
let style_value = CSSStyleValue::new(self.upcast(), argument.clone(), CanGc::note());
|
||||
arguments_values.push(ObjectValue(style_value.reflector().get_jsobject().get()));
|
||||
}
|
||||
let arguments_value_array = HandleValueArray::from(&arguments_values);
|
||||
|
@ -565,7 +567,7 @@ impl PaintWorkletGlobalScopeMethods<crate::DomTypeHolder> for PaintWorkletGlobal
|
|||
}
|
||||
|
||||
// Step 19.
|
||||
let context = PaintRenderingContext2D::new(self);
|
||||
let context = PaintRenderingContext2D::new(self, CanGc::note());
|
||||
let definition = PaintDefinition::new(
|
||||
paint_val.handle(),
|
||||
paint_function.handle(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue