diff options
author | Corey Farwell <coreyf@rwell.org> | 2015-11-20 08:58:01 -0500 |
---|---|---|
committer | Corey Farwell <coreyf@rwell.org> | 2015-11-21 08:15:56 -0500 |
commit | f34da4120d475f7fd78a647fc246e5731e7de941 (patch) | |
tree | 74a7ec75926296d7d0144563b736b8b6d97dfa29 /components/script/dom | |
parent | 0146751bb227e577f54c4c0574ae36236e2bcdce (diff) | |
download | servo-f34da4120d475f7fd78a647fc246e5731e7de941.tar.gz servo-f34da4120d475f7fd78a647fc246e5731e7de941.zip |
Implement 'url!(..)' macro
https://github.com/servo/rust-url/issues/136
https://github.com/servo/rust-url/pull/137
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/document.rs | 2 | ||||
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 585b93f1912..34a7846b543 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -1388,7 +1388,7 @@ impl Document { source: DocumentSource, doc_loader: DocumentLoader) -> Document { - let url = url.unwrap_or_else(|| Url::parse("about:blank").unwrap()); + let url = url.unwrap_or_else(|| url!("about:blank")); let (ready_state, domcontentloaded_dispatched) = if source == DocumentSource::FromParser { (DocumentReadyState::Loading, false) diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index b3e62ef434b..7d14dfe916d 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -124,7 +124,7 @@ impl HTMLIFrameElement { pub fn process_the_iframe_attributes(&self) { let url = match self.get_url() { Some(url) => url.clone(), - None => Url::parse("about:blank").unwrap(), + None => url!("about:blank"), }; self.navigate_child_browsing_context(url); |