Auto merge of #10247 - eddyb:document-base-url, r=Ms2ger

Use <base> in resolving url attributes (like "href").

Second take of #6303, now that the `base_url` infrastructure is in place.

<!-- 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/10247)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-03-29 17:11:12 +05:30
commit c4e112a3be
2 changed files with 1 additions and 4 deletions

View file

@ -1078,7 +1078,7 @@ impl Element {
}
let url = self.get_string_attribute(local_name);
let doc = document_from_node(self);
let base = doc.url();
let base = doc.base_url();
// https://html.spec.whatwg.org/multipage/#reflect
// XXXManishearth this doesn't handle `javascript:` urls properly
match base.join(&url) {

View file

@ -3,6 +3,3 @@
[The href attribute of the base element is specified]
expected: FAIL
[The src attribute of the img element must relative to the href attribute of the base element]
expected: FAIL