mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
auto merge of #3774 : ebalint/servo/3707_DOM_getters, r=jdm
This commit is contained in:
commit
1bc9c049c6
3 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@ impl BrowserContext {
|
|||
|
||||
pub fn active_window(&self) -> Temporary<Window> {
|
||||
let doc = self.active_document().root();
|
||||
Temporary::new(doc.window().clone())
|
||||
doc.window()
|
||||
}
|
||||
|
||||
pub fn window_proxy(&self) -> *mut JSObject {
|
||||
|
|
|
@ -344,8 +344,8 @@ impl Document {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn window<'a>(&'a self) -> &'a JS<Window> {
|
||||
&self.window
|
||||
pub fn window(&self) -> Temporary<Window> {
|
||||
Temporary::new(self.window)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -2163,7 +2163,7 @@ pub fn document_from_node<T: NodeBase+Reflectable>(derived: JSRef<T>) -> Tempora
|
|||
|
||||
pub fn window_from_node<T: NodeBase+Reflectable>(derived: JSRef<T>) -> Temporary<Window> {
|
||||
let document = document_from_node(derived).root();
|
||||
Temporary::new(document.window().clone())
|
||||
document.window()
|
||||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, Node> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue