mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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
|
@ -14,7 +14,7 @@ use dom::document::DocumentHelpers;
|
|||
use dom::element::{Element, ElementHelpers, StylePriority};
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{window_from_node, document_from_node, NodeDamage, Node};
|
||||
use dom::window::Window;
|
||||
use dom::window::{Window, WindowHelpers};
|
||||
use util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
use style::properties::{is_supported_property, longhands_from_shorthand, parse_style_attribute};
|
||||
|
@ -222,9 +222,8 @@ impl<'a> CSSStyleDeclarationMethods for JSRef<'a, CSSStyleDeclaration> {
|
|||
let owner = self.owner.root();
|
||||
let window = window_from_node(owner.r()).root();
|
||||
let window = window.r();
|
||||
let page = window.page();
|
||||
let decl_block = parse_style_attribute(synthesized_declaration.as_slice(),
|
||||
&page.get_url());
|
||||
&window.get_url());
|
||||
|
||||
// Step 7
|
||||
if decl_block.normal.len() == 0 {
|
||||
|
@ -271,9 +270,8 @@ impl<'a> CSSStyleDeclarationMethods for JSRef<'a, CSSStyleDeclaration> {
|
|||
let owner = self.owner.root();
|
||||
let window = window_from_node(owner.r()).root();
|
||||
let window = window.r();
|
||||
let page = window.page();
|
||||
let decl_block = parse_style_attribute(property.as_slice(),
|
||||
&page.get_url());
|
||||
&window.get_url());
|
||||
let element: JSRef<Element> = ElementCast::from_ref(owner.r());
|
||||
|
||||
// Step 5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue