Auto merge of #13461 - servo:media, r=Manishearth

Pass the correct attribute to handle_stylesheet_url.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13461)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-09-30 01:21:08 -05:00 committed by GitHub
commit 7fe688b8e9
7 changed files with 67 additions and 8 deletions

View file

@ -0,0 +1,3 @@
body {
color: red;
}

View file

@ -0,0 +1 @@
Content-Type: text/css

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Test</title>
<style>
body {
color: green;
}
</style>
<p>This text should be green.

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Test</title>
<link rel=match href=stylesheet-media-ref.html>
<style>
body {
color: green;
}
</style>
<link rel=stylesheet id=link>
<script>
// This tests for a bug in Servo, where it would treat the media attribute as
// if it was the href attribute.
var link = document.getElementById("link");
link.setAttribute("media", "all")
</script>
<p>This text should be green.