mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
CanGc fixes in focusevent.rs oscillartornode.rs response.rs resizeobserversize.rs animationevent.rs (#33827)
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
92f12ff7cd
commit
fc0835bae3
12 changed files with 65 additions and 28 deletions
|
@ -33,6 +33,7 @@ use crate::dom::event::Event;
|
|||
use crate::dom::node::{from_untrusted_node_address, window_from_node, Node, NodeDamage};
|
||||
use crate::dom::transitionevent::TransitionEvent;
|
||||
use crate::dom::window::Window;
|
||||
use crate::script_runtime::CanGc;
|
||||
|
||||
/// The set of animations for a document.
|
||||
#[derive(Default, JSTraceable, MallocSizeOf)]
|
||||
|
@ -456,7 +457,7 @@ impl Animations {
|
|||
});
|
||||
}
|
||||
|
||||
pub(crate) fn send_pending_events(&self, window: &Window) {
|
||||
pub(crate) fn send_pending_events(&self, window: &Window, can_gc: CanGc) {
|
||||
// Take all of the events here, in case sending one of these events
|
||||
// triggers adding new events by forcing a layout.
|
||||
let events = std::mem::take(&mut *self.pending_events.borrow_mut());
|
||||
|
@ -517,7 +518,7 @@ impl Animations {
|
|||
elapsedTime: elapsed_time,
|
||||
pseudoElement: pseudo_element,
|
||||
};
|
||||
AnimationEvent::new(&window, event_atom, &event_init)
|
||||
AnimationEvent::new(&window, event_atom, &event_init, can_gc)
|
||||
.upcast::<Event>()
|
||||
.fire(node.upcast());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue