mirror of
https://github.com/servo/servo.git
synced 2025-07-29 02:00:23 +01:00
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:
commit
ea690a2dff
30 changed files with 346 additions and 128 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue