mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Rename base_url to final_url in ScriptTask::load.
This seems like a clearer name, as it's used for more than just as a base url.
This commit is contained in:
parent
25e5d31289
commit
8838f2460e
1 changed files with 5 additions and 5 deletions
|
@ -744,7 +744,7 @@ impl ScriptTask {
|
|||
});
|
||||
}
|
||||
|
||||
let (parser_input, base_url) = if !is_javascript {
|
||||
let (parser_input, final_url) = if !is_javascript {
|
||||
// Wait for the LoadResponse so that the parser knows the final URL.
|
||||
let (input_chan, input_port) = channel();
|
||||
self.resource_task.send(Load(NetLoadData {
|
||||
|
@ -764,16 +764,16 @@ impl ScriptTask {
|
|||
});
|
||||
});
|
||||
|
||||
let base_url = load_response.metadata.final_url.clone();
|
||||
let final_url = load_response.metadata.final_url.clone();
|
||||
|
||||
{
|
||||
// Store the final URL before we start parsing, so that DOM routines
|
||||
// (e.g. HTMLImageElement::update_image) can resolve relative URLs
|
||||
// correctly.
|
||||
*page.mut_url() = Some((base_url.clone(), true));
|
||||
*page.mut_url() = Some((final_url.clone(), true));
|
||||
}
|
||||
|
||||
(InputUrl(load_response), base_url)
|
||||
(InputUrl(load_response), final_url)
|
||||
} else {
|
||||
let evalstr = load_data.url.non_relative_scheme_data().unwrap();
|
||||
let jsval = window.evaluate_js_with_result(evalstr);
|
||||
|
@ -781,7 +781,7 @@ impl ScriptTask {
|
|||
(InputString(strval.unwrap_or("".to_string())), doc_url)
|
||||
};
|
||||
|
||||
parse_html(*document, parser_input, base_url);
|
||||
parse_html(*document, parser_input, final_url);
|
||||
url = page.get_url().clone();
|
||||
|
||||
document.set_ready_state(DocumentReadyStateValues::Interactive);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue