mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #7397 - Manishearth:doublepointer-meet-fire, r=nox
Remove doublepointer in VirtualMethods, and from_borrowed_ref <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7397) <!-- Reviewable:end -->
This commit is contained in:
commit
48945b0fc1
34 changed files with 177 additions and 190 deletions
|
@ -322,9 +322,9 @@ impl<'a> HTMLElementCustomAttributeHelpers for &'a HTMLElement {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> VirtualMethods for &'a HTMLElement {
|
||||
impl VirtualMethods for HTMLElement {
|
||||
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
|
||||
let element: &&Element = ElementCast::from_borrowed_ref(self);
|
||||
let element: &Element = ElementCast::from_ref(self);
|
||||
Some(element as &VirtualMethods)
|
||||
}
|
||||
|
||||
|
@ -348,11 +348,11 @@ impl<'a> VirtualMethods for &'a HTMLElement {
|
|||
|
||||
let name = attr.local_name();
|
||||
if name.starts_with("on") {
|
||||
let window = window_from_node(*self);
|
||||
let window = window_from_node(self);
|
||||
let (cx, url, reflector) = (window.r().get_cx(),
|
||||
window.r().get_url(),
|
||||
window.r().reflector().get_jsobject());
|
||||
let evtarget = EventTargetCast::from_ref(*self);
|
||||
let evtarget = EventTargetCast::from_ref(self);
|
||||
evtarget.set_event_handler_uncompiled(cx, url, reflector,
|
||||
&name[2..],
|
||||
(**attr.value()).to_owned());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue