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

@ -154,7 +154,9 @@ impl VirtualMethods for HTMLLinkElement {
},
&atom!("media") => {
if string_is_stylesheet(&rel) {
self.handle_stylesheet_url(&attr.value());
if let Some(href) = self.upcast::<Element>().get_attribute(&ns!(), &atom!("href")) {
self.handle_stylesheet_url(&href.value());
}
}
},
_ => {},