mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Emit TransitionEnd events in the layout thread and process it in the script thread
This commit is contained in:
parent
752c6e6019
commit
668163ec5c
21 changed files with 103 additions and 62 deletions
|
@ -444,6 +444,14 @@ impl<T: Reflectable> LayoutJS<T> {
|
|||
debug_assert!(thread_state::get().is_layout());
|
||||
*self.ptr
|
||||
}
|
||||
|
||||
/// Returns a reference to the interior of this JS object. This method is
|
||||
/// safe to call because it originates from the layout thread, and it cannot
|
||||
/// mutate DOM nodes.
|
||||
pub fn get_for_script(&self) -> &T {
|
||||
debug_assert!(thread_state::get().is_script());
|
||||
unsafe { &**self.ptr }
|
||||
}
|
||||
}
|
||||
|
||||
/// Get an `&T` out of a `Rc<T>`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue