mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Mark promise creation methods with CanGc (#33928)
* Add CanGc annotations to promise constructor. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc arguments for Promise::new_in_current_realm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix out-of-order entries. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from Promise::new. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Suppress clippy warning. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
edc304854f
commit
575e885529
50 changed files with 422 additions and 221 deletions
|
@ -2954,9 +2954,9 @@ impl ElementMethods for Element {
|
|||
}
|
||||
|
||||
// https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
|
||||
fn RequestFullscreen(&self) -> Rc<Promise> {
|
||||
fn RequestFullscreen(&self, can_gc: CanGc) -> Rc<Promise> {
|
||||
let doc = document_from_node(self);
|
||||
doc.enter_fullscreen(self)
|
||||
doc.enter_fullscreen(self, can_gc)
|
||||
}
|
||||
|
||||
// XXX Hidden under dom.shadowdom.enabled pref. Only exposed to be able
|
||||
|
@ -3557,7 +3557,7 @@ impl VirtualMethods for Element {
|
|||
|
||||
let fullscreen = doc.GetFullscreenElement();
|
||||
if fullscreen.as_deref() == Some(self) {
|
||||
doc.exit_fullscreen();
|
||||
doc.exit_fullscreen(CanGc::note());
|
||||
}
|
||||
if let Some(ref value) = *self.id_attribute.borrow() {
|
||||
doc.unregister_element_id(self, value.clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue