aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/context.rs
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/layout/context.rs
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/layout/context.rs')
-rw-r--r--components/layout/context.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/layout/context.rs b/components/layout/context.rs
index 7eb01a68846..953c98797f5 100644
--- a/components/layout/context.rs
+++ b/components/layout/context.rs
@@ -25,8 +25,10 @@ use std::hash::BuildHasherDefault;
use std::rc::Rc;
use std::sync::mpsc::Sender;
use std::sync::{Arc, Mutex};
-use style::context::{LocalStyleContext, SharedStyleContext, StyleContext};
+use style::context::{LocalStyleContext, StyleContext};
use style::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
+use style::selector_impl::ServoSelectorImpl;
+use style::servo::SharedStyleContext;
use url::Url;
use util::opts;
@@ -104,7 +106,7 @@ pub struct LayoutContext<'a> {
cached_local_layout_context: Rc<LocalLayoutContext>,
}
-impl<'a> StyleContext<'a> for LayoutContext<'a> {
+impl<'a> StyleContext<'a, ServoSelectorImpl> for LayoutContext<'a> {
fn shared_context(&self) -> &'a SharedStyleContext {
&self.shared.style_context
}