diff options
author | Josh Matthews <josh@joshmatthews.net> | 2014-04-24 13:03:19 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-05-03 14:18:31 -0400 |
commit | 91278da9dd55582401154e07f9eea34425a332c2 (patch) | |
tree | ccce9b42e8a6c54245e53620082efe0b9840eae1 /src/components/script/dom/htmlstyleelement.rs | |
parent | 46a33b4b38666252245af5dd3a38bb6f57ff8a8e (diff) | |
download | servo-91278da9dd55582401154e07f9eea34425a332c2.tar.gz servo-91278da9dd55582401154e07f9eea34425a332c2.zip |
Address review comments.
Diffstat (limited to 'src/components/script/dom/htmlstyleelement.rs')
-rw-r--r-- | src/components/script/dom/htmlstyleelement.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/script/dom/htmlstyleelement.rs b/src/components/script/dom/htmlstyleelement.rs index d5fe24aafe3..b0688f30889 100644 --- a/src/components/script/dom/htmlstyleelement.rs +++ b/src/components/script/dom/htmlstyleelement.rs @@ -95,19 +95,19 @@ impl<'a> StyleElementHelpers for JSRef<'a, HTMLStyleElement> { fn parse_own_css(&self) { let node: &JSRef<Node> = NodeCast::from_ref(self); let win = window_from_node(node).root(); - let url = win.get().page().get_url(); + let url = win.deref().page().get_url(); let data = node.GetTextContent().expect("Element.textContent must be a string"); let sheet = parse_inline_css(url, data); - let LayoutChan(ref layout_chan) = *win.get().page().layout_chan; + let LayoutChan(ref layout_chan) = *win.deref().page().layout_chan; layout_chan.send(AddStylesheetMsg(sheet)); } } impl<'a> VirtualMethods for JSRef<'a, HTMLStyleElement> { - fn super_type(&self) -> Option<~VirtualMethods:> { - let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_ref(self); - Some(~htmlelement.clone() as ~VirtualMethods:) + fn super_type<'a>(&'a mut self) -> Option<&'a mut VirtualMethods:> { + let htmlelement: &mut JSRef<HTMLElement> = HTMLElementCast::from_mut_ref(self); + Some(htmlelement as &mut VirtualMethods:) } fn child_inserted(&mut self, child: &JSRef<Node>) { |