aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domparser.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-01-02 09:22:51 -0700
committerbors-servo <metajack+bors@gmail.com>2015-01-02 09:22:51 -0700
commit141b5d038fad3c0c44a6f1b309b8ca9edea54580 (patch)
treed8f7fbbcba47b42eb2e0cc162605620bbc6f7a23 /components/script/dom/domparser.rs
parenta61417e2a87004e30e2a02f2e6ae58629062e3d5 (diff)
parent203d1669c8ce98468c7935ead8f0ef4c803dd5a0 (diff)
downloadservo-141b5d038fad3c0c44a6f1b309b8ca9edea54580.tar.gz
servo-141b5d038fad3c0c44a6f1b309b8ca9edea54580.zip
auto merge of #4526 : servo/servo/deref-1, r=Manishearth
This is a start towards fixing #3868. Not all callers have been fixed yet, so the `Deref` implementation remains for now.
Diffstat (limited to 'components/script/dom/domparser.rs')
-rw-r--r--components/script/dom/domparser.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/components/script/dom/domparser.rs b/components/script/dom/domparser.rs
index 09cabce1700..2b8487a35ab 100644
--- a/components/script/dom/domparser.rs
+++ b/components/script/dom/domparser.rs
@@ -47,22 +47,22 @@ impl<'a> DOMParserMethods for JSRef<'a, DOMParser> {
s: DOMString,
ty: DOMParserBinding::SupportedType)
-> Fallible<Temporary<Document>> {
- let window = self.window.root().clone();
- let url = window.get_url();
+ let window = self.window.root();
+ let url = window.r().get_url();
let content_type = DOMParserBinding::SupportedTypeValues::strings[ty as uint].into_string();
match ty {
Text_html => {
- let document = Document::new(window, Some(url.clone()),
+ let document = Document::new(window.r(), Some(url.clone()),
IsHTMLDocument::HTMLDocument,
Some(content_type),
- DocumentSource::FromParser).root().clone();
- parse_html(document, HTMLInput::InputString(s), &url);
- document.set_ready_state(DocumentReadyState::Complete);
- Ok(Temporary::from_rooted(document))
+ DocumentSource::FromParser).root();
+ parse_html(document.r(), HTMLInput::InputString(s), &url);
+ document.r().set_ready_state(DocumentReadyState::Complete);
+ Ok(Temporary::from_rooted(document.r()))
}
Text_xml => {
//FIXME: this should probably be FromParser when we actually parse the string (#3756).
- Ok(Document::new(window, Some(url.clone()),
+ Ok(Document::new(window.r(), Some(url.clone()),
IsHTMLDocument::NonHTMLDocument,
Some(content_type),
DocumentSource::NotFromParser))