mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +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
|
@ -18,7 +18,7 @@ use dom::bindings::codegen::UnionTypes::EventOrString;
|
|||
use dom::bindings::error::{Error, Fallible, report_pending_exception};
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::reflector::{DomObject, Reflector};
|
||||
use dom::bindings::root::Root;
|
||||
use dom::bindings::root::DomRoot;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::element::Element;
|
||||
use dom::errorevent::ErrorEvent;
|
||||
|
@ -174,7 +174,7 @@ impl CompiledEventListener {
|
|||
return;
|
||||
}
|
||||
|
||||
let _ = handler.Call_(object, EventOrString::Event(Root::from_ref(event)),
|
||||
let _ = handler.Call_(object, EventOrString::Event(DomRoot::from_ref(event)),
|
||||
None, None, None, None, exception_handle);
|
||||
}
|
||||
|
||||
|
@ -506,28 +506,28 @@ impl EventTarget {
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-event-fire
|
||||
pub fn fire_event(&self, name: Atom) -> Root<Event> {
|
||||
pub fn fire_event(&self, name: Atom) -> DomRoot<Event> {
|
||||
self.fire_event_with_params(name,
|
||||
EventBubbles::DoesNotBubble,
|
||||
EventCancelable::NotCancelable)
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-event-fire
|
||||
pub fn fire_bubbling_event(&self, name: Atom) -> Root<Event> {
|
||||
pub fn fire_bubbling_event(&self, name: Atom) -> DomRoot<Event> {
|
||||
self.fire_event_with_params(name,
|
||||
EventBubbles::Bubbles,
|
||||
EventCancelable::NotCancelable)
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-event-fire
|
||||
pub fn fire_cancelable_event(&self, name: Atom) -> Root<Event> {
|
||||
pub fn fire_cancelable_event(&self, name: Atom) -> DomRoot<Event> {
|
||||
self.fire_event_with_params(name,
|
||||
EventBubbles::DoesNotBubble,
|
||||
EventCancelable::Cancelable)
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-event-fire
|
||||
pub fn fire_bubbling_cancelable_event(&self, name: Atom) -> Root<Event> {
|
||||
pub fn fire_bubbling_cancelable_event(&self, name: Atom) -> DomRoot<Event> {
|
||||
self.fire_event_with_params(name,
|
||||
EventBubbles::Bubbles,
|
||||
EventCancelable::Cancelable)
|
||||
|
@ -538,7 +538,7 @@ impl EventTarget {
|
|||
name: Atom,
|
||||
bubbles: EventBubbles,
|
||||
cancelable: EventCancelable)
|
||||
-> Root<Event> {
|
||||
-> DomRoot<Event> {
|
||||
let event = Event::new(&self.global(), name, bubbles, cancelable);
|
||||
event.fire(self);
|
||||
event
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue