mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Root nodes for the duration of their CSS transitions.
This ensures that we can pass a node address as part of the asynchronous transition end notification, making it safe to fire the corresponding DOM event on the node from the script thread. Without explicitly rooting this node when the transition starts, we risk the node being GCed before the transition is complete.
This commit is contained in:
parent
f3c8f7e0d0
commit
dabebdfbf5
11 changed files with 126 additions and 25 deletions
|
@ -69,7 +69,7 @@ use std::collections::HashMap;
|
|||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use std::sync::mpsc::{Receiver, Sender};
|
||||
use style_traits::{CSSPixel, UnsafeNode};
|
||||
use style_traits::CSSPixel;
|
||||
use webdriver_msg::{LoadStatus, WebDriverScriptCommand};
|
||||
use webrender_traits::ClipId;
|
||||
use webvr_traits::{WebVREvent, WebVRMsg};
|
||||
|
@ -274,7 +274,7 @@ pub enum ConstellationControlMsg {
|
|||
/// Notifies script thread that all animations are done
|
||||
TickAllAnimations(PipelineId),
|
||||
/// Notifies the script thread of a transition end
|
||||
TransitionEnd(UnsafeNode, String, f64),
|
||||
TransitionEnd(UntrustedNodeAddress, String, f64),
|
||||
/// Notifies the script thread that a new Web font has been loaded, and thus the page should be
|
||||
/// reflowed.
|
||||
WebFontLoaded(PipelineId),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue