mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Auto merge of #10591 - Liamsi:base_url_script_element, r=KiChjang
Use the document base url when resolving script URLs Does this resolve #10578? <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10591) <!-- Reviewable:end -->
This commit is contained in:
commit
9896e53094
2 changed files with 2 additions and 10 deletions
|
@ -272,10 +272,7 @@ impl HTMLScriptElement {
|
||||||
|
|
||||||
// TODO: Step 15: environment settings object.
|
// TODO: Step 15: environment settings object.
|
||||||
|
|
||||||
let window = window_from_node(self);
|
let base_url = doc.base_url();
|
||||||
let window = window.r();
|
|
||||||
let base_url = window.get_url();
|
|
||||||
|
|
||||||
let is_external = match element.get_attribute(&ns!(), &atom!("src")) {
|
let is_external = match element.get_attribute(&ns!(), &atom!("src")) {
|
||||||
// Step 16.
|
// Step 16.
|
||||||
Some(ref src) => {
|
Some(ref src) => {
|
||||||
|
@ -300,7 +297,7 @@ impl HTMLScriptElement {
|
||||||
|
|
||||||
// Step 16.6.
|
// Step 16.6.
|
||||||
// TODO(#9186): use the fetch infrastructure.
|
// TODO(#9186): use the fetch infrastructure.
|
||||||
let script_chan = window.networking_task_source();
|
let script_chan = doc.window().networking_task_source();
|
||||||
let elem = Trusted::new(self, script_chan.clone());
|
let elem = Trusted::new(self, script_chan.clone());
|
||||||
|
|
||||||
let context = Arc::new(Mutex::new(ScriptContext {
|
let context = Arc::new(Mutex::new(ScriptContext {
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[base.html]
|
|
||||||
type: testharness
|
|
||||||
[Script src with a base URL]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue