mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Introduce GlobalScope::get_url
This commit is contained in:
parent
092504b4e3
commit
f38159b7d3
10 changed files with 39 additions and 39 deletions
|
@ -595,7 +595,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
|||
use_cors_preflight: has_handlers,
|
||||
credentials_mode: credentials_mode,
|
||||
use_url_credentials: use_url_credentials,
|
||||
origin: self.global().r().get_url(),
|
||||
origin: self.global_scope().get_url(),
|
||||
referrer_url: self.referrer_url.clone(),
|
||||
referrer_policy: self.referrer_policy.clone(),
|
||||
pipeline_id: self.pipeline_id(),
|
||||
|
@ -1204,7 +1204,7 @@ impl XMLHttpRequest {
|
|||
// TODO: Disable scripting while parsing
|
||||
parse_html(document.r(),
|
||||
DOMString::from(decoded),
|
||||
wr.get_url(),
|
||||
wr.as_global_scope().get_url(),
|
||||
ParseContext::Owner(Some(wr.as_global_scope().pipeline_id())));
|
||||
document
|
||||
}
|
||||
|
@ -1218,7 +1218,7 @@ impl XMLHttpRequest {
|
|||
// TODO: Disable scripting while parsing
|
||||
parse_xml(document.r(),
|
||||
DOMString::from(decoded),
|
||||
wr.get_url(),
|
||||
wr.as_global_scope().get_url(),
|
||||
xml::ParseContext::Owner(Some(wr.as_global_scope().pipeline_id())));
|
||||
document
|
||||
}
|
||||
|
@ -1230,7 +1230,7 @@ impl XMLHttpRequest {
|
|||
let doc = win.Document();
|
||||
let doc = doc.r();
|
||||
let docloader = DocumentLoader::new(&*doc.loader());
|
||||
let base = self.global().r().get_url();
|
||||
let base = self.global_scope().get_url();
|
||||
let parsed_url = match base.join(&self.ResponseURL().0) {
|
||||
Ok(parsed) => Some(parsed),
|
||||
Err(_) => None // Step 7
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue