Move everything unrelated to the frame tree out of Page and into Document or Window. Reduce the API surface of Page to a bare minimum to allow for easier future removal.

This commit is contained in:
Josh Matthews 2015-02-19 13:08:50 -05:00
parent d9f04180a5
commit e2c4f5ed67
23 changed files with 664 additions and 672 deletions

View file

@ -71,14 +71,12 @@ impl BrowserContext {
fn create_window_proxy(&mut self) {
let win = self.active_window().root();
let win = win.r();
let page = win.page();
let js_info = page.js_info();
let WindowProxyHandler(handler) = js_info.as_ref().unwrap().dom_static.windowproxy_handler;
let WindowProxyHandler(handler) = win.windowproxy_handler();
assert!(!handler.is_null());
let parent = win.reflector().get_jsobject();
let cx = js_info.as_ref().unwrap().js_context.ptr;
let cx = win.get_cx();
let wrapper = with_compartment(cx, parent, || unsafe {
WrapperNew(cx, parent, handler)
});