mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement Window::get_cx() to reduce code repetition.
This commit is contained in:
parent
fc9fdf30a6
commit
da2cf6cbd7
8 changed files with 19 additions and 19 deletions
|
@ -22,7 +22,7 @@ impl Text {
|
|||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window, text: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
|
||||
let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr;
|
||||
let cx = owner.get_cx();
|
||||
let text = @Text::new(null_str_as_empty(text), owner.Document());
|
||||
Ok(unsafe { Node::as_abstract_node(cx, text) })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue