aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/script/dom/document.rs8
-rw-r--r--src/components/script/dom/node.rs5
2 files changed, 1 insertions, 12 deletions
diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs
index bbed257503a..ebaffd5fe78 100644
--- a/src/components/script/dom/document.rs
+++ b/src/components/script/dom/document.rs
@@ -215,11 +215,6 @@ impl Document {
self.window.get_cx()
}
- fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) {
- let win = self.window;
- (win.reflector().get_jsobject(), win.get_cx())
- }
-
pub fn GetElementsByTagName(&self, tag: &DOMString) -> @mut HTMLCollection {
self.createHTMLCollection(|elem| eq_slice(elem.tag_name, null_str_as_empty(tag)))
}
@@ -310,7 +305,6 @@ impl Document {
fail!("no SVG document yet")
},
_ => {
- let (_scope, cx) = self.get_scope_and_cx();
match self.GetDocumentElement() {
None => {},
Some(root) => {
@@ -335,7 +329,7 @@ impl Document {
htmlelement: HTMLElement::new(HTMLTitleElementTypeId, ~"title", abstract_self)
};
let new_title = unsafe {
- Node::as_abstract_node(cx, new_title)
+ Node::as_abstract_node(self.get_cx(), new_title)
};
new_title.add_child(self.CreateTextNode(abstract_self, title));
node.add_child(new_title);
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs
index 249cfdd1ac1..857fc94fd48 100644
--- a/src/components/script/dom/node.rs
+++ b/src/components/script/dom/node.rs
@@ -680,11 +680,6 @@ impl Node<ScriptView> {
}
}
- pub fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) {
- let win = self.owner_doc().document().window;
- (win.reflector().get_jsobject(), win.get_cx())
- }
-
// http://dom.spec.whatwg.org/#concept-node-replace-all
pub fn replace_all(&mut self,
abstract_self: AbstractNode<ScriptView>,