mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Ensure that Reflectors are the first field
This commit is contained in:
parent
d761877ef6
commit
21a888341d
14 changed files with 146 additions and 21 deletions
|
@ -64,3 +64,17 @@ impl<'a> HTMLTitleElementMethods for JSRef<'a, HTMLTitleElement> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLTitleElement> {
|
||||
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
|
||||
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
||||
fn bind_to_tree(&self, is_in_doc: bool) {
|
||||
let node: JSRef<Node> = NodeCast::from_ref(*self);
|
||||
if is_in_doc {
|
||||
let document = node.owner_doc().root();
|
||||
document.send_title_to_compositor()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue