mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Replace Root::deref() calls by Root::r() calls where possible.
This changes those calls that were already sound.
This commit is contained in:
parent
c9f26dfd59
commit
1dad710063
61 changed files with 479 additions and 471 deletions
|
@ -53,7 +53,7 @@ impl HTMLLinkElement {
|
|||
|
||||
fn get_attr(element: JSRef<Element>, name: &Atom) -> Option<String> {
|
||||
let elem = element.get_attribute(ns!(""), name).root();
|
||||
elem.map(|e| e.value().as_slice().into_string())
|
||||
elem.map(|e| e.r().value().as_slice().into_string())
|
||||
}
|
||||
|
||||
fn is_stylesheet(value: &Option<String>) -> bool {
|
||||
|
@ -127,7 +127,7 @@ 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.page().get_url()).parse(href) {
|
||||
match UrlParser::new().base_url(&window.r().page().get_url()).parse(href) {
|
||||
Ok(url) => {
|
||||
let LayoutChan(ref layout_chan) = window.page().layout_chan;
|
||||
layout_chan.send(Msg::LoadStylesheet(url));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue