aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/document.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2014-07-16 00:01:47 +0100
committerSimon Sapin <simon.sapin@exyr.org>2014-07-21 20:21:35 +0100
commitdc49f4fda603e56ba214a3f110bb2c12968431d0 (patch)
tree1dd83b848254477624c3fd1f3aa62ba20b5ae1c1 /src/components/script/dom/document.rs
parent71a869284e066c8e8afdf1731fdc1bc3a71d604b (diff)
downloadservo-dc49f4fda603e56ba214a3f110bb2c12968431d0.tar.gz
servo-dc49f4fda603e56ba214a3f110bb2c12968431d0.zip
Start dogfooding rust-url. Fix #1673.
Diffstat (limited to 'src/components/script/dom/document.rs')
-rw-r--r--src/components/script/dom/document.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs
index bee7494ed73..aac4e463df4 100644
--- a/src/components/script/dom/document.rs
+++ b/src/components/script/dom/document.rs
@@ -50,7 +50,7 @@ use servo_util::str::{DOMString, null_str_as_empty_ref};
use std::collections::hashmap::HashMap;
use std::ascii::StrAsciiExt;
use std::cell::{Cell, RefCell};
-use url::{Url, from_str};
+use url::Url;
#[deriving(PartialEq,Encodable)]
pub enum IsHTMLDocument {
@@ -196,7 +196,7 @@ impl Document {
url: Option<Url>,
is_html_document: IsHTMLDocument,
content_type: Option<DOMString>) -> Document {
- let url = url.unwrap_or_else(|| from_str("about:blank").unwrap());
+ let url = url.unwrap_or_else(|| Url::parse("about:blank").unwrap());
Document {
node: Node::new_without_doc(DocumentNodeTypeId),
@@ -337,7 +337,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
// http://dom.spec.whatwg.org/#dom-document-url
fn URL(&self) -> DOMString {
- self.url().to_str()
+ self.url().serialize()
}
// http://dom.spec.whatwg.org/#dom-document-documenturi