Auto merge of #10626 - sliz1:10576, r=KiChjang

Use the document base url when resolving iframe URLs

Fixes #10576.

<!-- 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/10626)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-15 10:03:51 +05:30
commit 7faa3ed9cb
4 changed files with 5473 additions and 3 deletions

View file

@ -82,8 +82,7 @@ impl HTMLIFrameElement {
if url.is_empty() { if url.is_empty() {
None None
} else { } else {
let window = window_from_node(self); document_from_node(self).base_url().join(&url).ok()
window.get_url().join(&url).ok()
} }
}) })
} }

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,9 @@
<!doctype html>
<html>
<head>
<title>iframe Without Base Tag</title>
</head>
<body>
<iframe src="support/blank.htm">
</body>
</html>

View file

@ -0,0 +1,11 @@
<!doctype html>
<html>
<head>
<title>iframe With Base Tag</title>
<link rel="match" href="iframe-with-base-ref.html">
<base href="support/">
</head>
<body>
<iframe src="blank.htm">
</body>
</html>