mirror of
https://github.com/servo/servo.git
synced 2025-06-21 23:59:00 +01:00
auto merge of #1126 : Ms2ger/servo/get_scope_and_cx, r=jdm
This commit is contained in:
commit
a9e2329939
2 changed files with 1 additions and 12 deletions
|
@ -209,11 +209,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)))
|
||||
}
|
||||
|
@ -304,7 +299,6 @@ impl Document {
|
|||
fail!("no SVG document yet")
|
||||
},
|
||||
_ => {
|
||||
let (_scope, cx) = self.get_scope_and_cx();
|
||||
match self.GetDocumentElement() {
|
||||
None => {},
|
||||
Some(root) => {
|
||||
|
@ -329,7 +323,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);
|
||||
|
|
|
@ -673,11 +673,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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue