mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
s/Unrooted/Temporary/g
This commit is contained in:
parent
bbfed38168
commit
522d3f167b
104 changed files with 565 additions and 565 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
use dom::bindings::codegen::BindingDeclarations::TextBinding;
|
||||
use dom::bindings::codegen::InheritTypes::TextDerived;
|
||||
use dom::bindings::js::{JS, JSRef, RootCollection, Unrooted};
|
||||
use dom::bindings::js::{JS, JSRef, RootCollection, Temporary};
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::characterdata::CharacterData;
|
||||
use dom::document::Document;
|
||||
|
@ -35,12 +35,12 @@ impl Text {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(text: DOMString, document: &JSRef<Document>) -> Unrooted<Text> {
|
||||
pub fn new(text: DOMString, document: &JSRef<Document>) -> Temporary<Text> {
|
||||
let node = Text::new_inherited(text, document.unrooted());
|
||||
Node::reflect_node(~node, document, TextBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(owner: &JSRef<Window>, text: DOMString) -> Fallible<Unrooted<Text>> {
|
||||
pub fn Constructor(owner: &JSRef<Window>, text: DOMString) -> Fallible<Temporary<Text>> {
|
||||
let roots = RootCollection::new();
|
||||
let document = owner.Document().root(&roots);
|
||||
Ok(Text::new(text.clone(), &*document))
|
||||
|
@ -48,12 +48,12 @@ impl Text {
|
|||
}
|
||||
|
||||
pub trait TextMethods {
|
||||
fn SplitText(&self, _offset: u32) -> Fallible<Unrooted<Text>>;
|
||||
fn SplitText(&self, _offset: u32) -> Fallible<Temporary<Text>>;
|
||||
fn GetWholeText(&self) -> Fallible<DOMString>;
|
||||
}
|
||||
|
||||
impl<'a> TextMethods for JSRef<'a, Text> {
|
||||
fn SplitText(&self, _offset: u32) -> Fallible<Unrooted<Text>> {
|
||||
fn SplitText(&self, _offset: u32) -> Fallible<Temporary<Text>> {
|
||||
fail!("unimplemented")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue