mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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:
parent
d9f04180a5
commit
e2c4f5ed67
23 changed files with 664 additions and 672 deletions
|
@ -25,7 +25,7 @@ use dom::element::ElementTypeId;
|
|||
use dom::htmlelement::{HTMLElement, HTMLElementTypeId};
|
||||
use dom::node::{Node, NodeHelpers, NodeTypeId, document_from_node, window_from_node, CloneChildrenFlag};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::window::ScriptHelpers;
|
||||
use dom::window::{WindowHelpers, ScriptHelpers};
|
||||
use script_task::{ScriptMsg, Runnable};
|
||||
|
||||
use encoding::all::UTF_8;
|
||||
|
@ -214,8 +214,7 @@ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> {
|
|||
// Step 14.
|
||||
let window = window_from_node(self).root();
|
||||
let window = window.r();
|
||||
let page = window.page();
|
||||
let base_url = page.get_url();
|
||||
let base_url = window.get_url();
|
||||
|
||||
let load = match element.get_attribute(ns!(""), &atom!("src")).root() {
|
||||
// Step 14.
|
||||
|
@ -243,7 +242,7 @@ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> {
|
|||
// state of the element's `crossorigin` content attribute, the origin being
|
||||
// the origin of the script element's node document, and the default origin
|
||||
// behaviour set to taint.
|
||||
ScriptOrigin::External(load_whole_resource(&page.resource_task, url))
|
||||
ScriptOrigin::External(load_whole_resource(&window.resource_task(), url))
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue