Remove the url! plugin.

In rust-url 1.0 the `Url` struct is going to have private fields, and there
is no way to to create an aribitrary one without going through the parser.

The plugin never had a clear demonstrated performance benefit,
it was made mostly because it was possible and relatively easy at the time.
This commit is contained in:
Simon Sapin 2016-02-26 17:01:51 +01:00
parent 87d5424d4d
commit 6889f37d9e
27 changed files with 84 additions and 296 deletions

View file

@ -1603,7 +1603,7 @@ impl Document {
source: DocumentSource,
doc_loader: DocumentLoader)
-> Document {
let url = url.unwrap_or_else(|| url!("about:blank"));
let url = url.unwrap_or_else(|| Url::parse("about:blank").unwrap());
let (ready_state, domcontentloaded_dispatched) = if source == DocumentSource::FromParser {
(DocumentReadyState::Loading, false)

View file

@ -146,7 +146,7 @@ impl HTMLIFrameElement {
pub fn process_the_iframe_attributes(&self) {
let url = match self.get_url() {
Some(url) => url.clone(),
None => url!("about:blank"),
None => Url::parse("about:blank").unwrap(),
};
self.navigate_or_reload_child_browsing_context(Some(url));

View file

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