Auto merge of #8622 - frewsxcv:url-plugin, r=SimonSapin

Implement 'url!(..)' macro

https://github.com/servo/rust-url/issues/136

https://github.com/servo/rust-url/pull/137

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8622)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-21 21:10:52 +05:30
commit ea690a2dff
30 changed files with 346 additions and 128 deletions

View file

@ -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)

View file

@ -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);

View file

@ -1969,7 +1969,7 @@ impl ScriptTask {
};
if load_data.url.scheme == "javascript" {
load_data.url = Url::parse("about:blank").unwrap();
load_data.url = url!("about:blank");
}
resource_task.send(ControlMsg::Load(NetLoadData {