Remove unsound Root::deref() calls in HTML elements.

This commit is contained in:
Ms2ger 2015-01-01 18:36:37 +01:00
parent 6032a2f8af
commit d09d245ee1
5 changed files with 8 additions and 3 deletions

View file

@ -127,7 +127,8 @@ trait PrivateHTMLLinkElementHelpers {
impl<'a> PrivateHTMLLinkElementHelpers for JSRef<'a, HTMLLinkElement> {
fn handle_stylesheet_url(self, href: &str) {
let window = window_from_node(self).root();
match UrlParser::new().base_url(&window.r().page().get_url()).parse(href) {
let window = window.r();
match UrlParser::new().base_url(&window.page().get_url()).parse(href) {
Ok(url) => {
let LayoutChan(ref layout_chan) = window.page().layout_chan;
layout_chan.send(Msg::LoadStylesheet(url));