Library changes

This commit is contained in:
Keegan McAllister 2013-08-09 13:24:10 -07:00
parent ffe60ea027
commit be061a9aa0
45 changed files with 167 additions and 183 deletions

View file

@ -47,7 +47,7 @@ use js::jsapi::{JSContext, JSObject};
use std::cell::Cell;
use std::comm;
use std::str::eq_slice;
use extra::net::url;
use std::FromStr;
pub struct Element {
parent: Node<ScriptView>,
@ -279,7 +279,7 @@ impl<'self> Element {
if "style" == name {
self.style_attribute = Some(
Stylesheet::from_attribute(
url::from_str("http://www.example.com/").unwrap(),
FromStr::from_str("http://www.example.com/").unwrap(),
value.get_ref()));
}
@ -290,8 +290,8 @@ impl<'self> Element {
}
fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) {
let doc = self.parent.owner_doc.get();
let win = doc.with_base(|doc| doc.window.get());
let doc = self.parent.owner_doc.unwrap();
let win = doc.with_base(|doc| doc.window.unwrap());
let cx = unsafe {(*win.page).js_info.get_ref().js_compartment.cx.ptr};
let cache = win.get_wrappercache();
let scope = cache.get_wrapper();
@ -419,7 +419,7 @@ impl Element {
debug!("no document");
None
}
}.get();
}.unwrap();
ClientRectList::new(rects, cx, scope)
}