aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-02-08 02:53:22 +0100
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-02-13 16:05:14 +0100
commitdd503dfacb46c63702e4a4b49b85ca30df62a8df (patch)
tree81021ae722350d30583c718cff1aab22fe456db5 /components/script
parenta164176876bb6abccf729eb5d6334e3c22230103 (diff)
downloadservo-dd503dfacb46c63702e4a4b49b85ca30df62a8df.tar.gz
servo-dd503dfacb46c63702e4a4b49b85ca30df62a8df.zip
Refactor style to be completely backend-independent
This commit refactors the style crate to be completely independent of the actual implementation and pseudo-elements supported. This also adds a gecko backend which introduces parsing for the anonymous box pseudo-elements[1], although there's still no way of querying them. https://mxr.mozilla.org/mozilla-central/source/layout/style/nsCSSAnonBoxList.h
Diffstat (limited to 'components/script')
-rw-r--r--components/script/Cargo.toml2
-rw-r--r--components/script/dom/document.rs2
-rw-r--r--components/script/dom/htmllinkelement.rs3
-rw-r--r--components/script/dom/htmlmetaelement.rs3
-rw-r--r--components/script/dom/htmlstyleelement.rs3
-rw-r--r--components/script/layout_interface.rs2
6 files changed, 9 insertions, 6 deletions
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index ef93986c204..1f3b7874d22 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -81,7 +81,7 @@ num = "0.1.24"
rand = "0.3"
ref_slice = "0.1.0"
rustc-serialize = "0.3"
-selectors = {version = "0.4.2", features = ["heap_size"]}
+selectors = {version = "0.5", features = ["heap_size"]}
serde = "0.6"
smallvec = "0.1"
string_cache = {version = "0.2.9", features = ["heap_size", "unstable"]}
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 99a61d2f981..a3af57b0814 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -105,7 +105,7 @@ use std::sync::Arc;
use string_cache::{Atom, QualName};
use style::context::ReflowGoal;
use style::restyle_hints::ElementSnapshot;
-use style::stylesheets::Stylesheet;
+use style::servo::Stylesheet;
use time;
use url::{Host, Url};
use util::str::{DOMString, split_html_space_chars, str_join};
diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs
index 38bb2287ac3..683b8cc6a84 100644
--- a/components/script/dom/htmllinkelement.rs
+++ b/components/script/dom/htmllinkelement.rs
@@ -36,7 +36,8 @@ use std::mem;
use std::sync::{Arc, Mutex};
use string_cache::Atom;
use style::media_queries::{MediaQueryList, parse_media_query_list};
-use style::stylesheets::{Origin, Stylesheet};
+use style::servo::Stylesheet;
+use style::stylesheets::Origin;
use url::Url;
use util::str::{DOMString, HTML_SPACE_CHARACTERS};
diff --git a/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs
index fdba6dc7c3c..779c5c79e07 100644
--- a/components/script/dom/htmlmetaelement.rs
+++ b/components/script/dom/htmlmetaelement.rs
@@ -15,7 +15,8 @@ use dom::virtualmethods::VirtualMethods;
use std::ascii::AsciiExt;
use std::sync::Arc;
use string_cache::Atom;
-use style::stylesheets::{CSSRule, Origin, Stylesheet};
+use style::servo::Stylesheet;
+use style::stylesheets::{CSSRule, Origin};
use style::viewport::ViewportRule;
use util::str::{DOMString, HTML_SPACE_CHARACTERS};
diff --git a/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs
index 4b423b920b7..067561d4181 100644
--- a/components/script/dom/htmlstyleelement.rs
+++ b/components/script/dom/htmlstyleelement.rs
@@ -17,7 +17,8 @@ use layout_interface::{LayoutChan, Msg};
use std::sync::Arc;
use string_cache::Atom;
use style::media_queries::parse_media_query_list;
-use style::stylesheets::{Origin, Stylesheet};
+use style::servo::Stylesheet;
+use style::stylesheets::Origin;
use util::str::DOMString;
#[dom_struct]
diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs
index c759b358e79..831c04a9516 100644
--- a/components/script/layout_interface.rs
+++ b/components/script/layout_interface.rs
@@ -24,7 +24,7 @@ use std::sync::mpsc::{Receiver, Sender, channel};
use string_cache::Atom;
use style::context::ReflowGoal;
use style::selector_impl::PseudoElement;
-use style::stylesheets::Stylesheet;
+use style::servo::Stylesheet;
use url::Url;
use util::ipc::OptionalOpaqueIpcSender;