mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
This commit is contained in:
parent
577370746e
commit
f87c2a8d76
291 changed files with 1774 additions and 1770 deletions
|
@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::TouchEventBinding::TouchEventMethods;
|
|||
use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
use dom::bindings::root::{MutDom, Root};
|
||||
use dom::bindings::root::{DomRoot, MutDom};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::event::{EventBubbles, EventCancelable};
|
||||
use dom::touchlist::TouchList;
|
||||
|
@ -47,7 +47,7 @@ impl TouchEvent {
|
|||
pub fn new_uninitialized(window: &Window,
|
||||
touches: &TouchList,
|
||||
changed_touches: &TouchList,
|
||||
target_touches: &TouchList) -> Root<TouchEvent> {
|
||||
target_touches: &TouchList) -> DomRoot<TouchEvent> {
|
||||
reflect_dom_object(box TouchEvent::new_inherited(touches, changed_touches, target_touches),
|
||||
window,
|
||||
TouchEventBinding::Wrap)
|
||||
|
@ -65,7 +65,7 @@ impl TouchEvent {
|
|||
ctrl_key: bool,
|
||||
alt_key: bool,
|
||||
shift_key: bool,
|
||||
meta_key: bool) -> Root<TouchEvent> {
|
||||
meta_key: bool) -> DomRoot<TouchEvent> {
|
||||
let ev = TouchEvent::new_uninitialized(window, touches, changed_touches, target_touches);
|
||||
ev.upcast::<UIEvent>().InitUIEvent(type_,
|
||||
bool::from(can_bubble),
|
||||
|
@ -101,17 +101,17 @@ impl<'a> TouchEventMethods for &'a TouchEvent {
|
|||
}
|
||||
|
||||
/// https://w3c.github.io/touch-events/#widl-TouchEventInit-touches
|
||||
fn Touches(&self) -> Root<TouchList> {
|
||||
fn Touches(&self) -> DomRoot<TouchList> {
|
||||
self.touches.get()
|
||||
}
|
||||
|
||||
/// https://w3c.github.io/touch-events/#widl-TouchEvent-targetTouches
|
||||
fn TargetTouches(&self) -> Root<TouchList> {
|
||||
fn TargetTouches(&self) -> DomRoot<TouchList> {
|
||||
self.target_touches.get()
|
||||
}
|
||||
|
||||
/// https://w3c.github.io/touch-events/#widl-TouchEvent-changedTouches
|
||||
fn ChangedTouches(&self) -> Root<TouchList> {
|
||||
fn ChangedTouches(&self) -> DomRoot<TouchList> {
|
||||
self.changed_touches.get()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue