aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_thread.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/layout_thread.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/layout_thread.rs')
-rw-r--r--components/layout/layout_thread.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs
index aaa6a1e98c0..a540039c51b 100644
--- a/components/layout/layout_thread.rs
+++ b/components/layout/layout_thread.rs
@@ -62,13 +62,15 @@ use std::sync::mpsc::{channel, Sender, Receiver};
use std::sync::{Arc, Mutex, MutexGuard, RwLock};
use style::animation::Animation;
use style::computed_values::{filter, mix_blend_mode};
-use style::context::{SharedStyleContext, StylistWrapper, ReflowGoal};
+use style::context::{ReflowGoal, StylistWrapper};
use style::dom::{TDocument, TElement, TNode};
use style::error_reporting::ParseErrorReporter;
use style::media_queries::{Device, MediaType};
use style::parallel::WorkQueueData;
-use style::selector_matching::{Stylist, USER_OR_USER_AGENT_STYLESHEETS};
-use style::stylesheets::{CSSRuleIteratorExt, Stylesheet};
+use style::selector_impl::ServoSelectorImpl;
+use style::selector_matching::USER_OR_USER_AGENT_STYLESHEETS;
+use style::servo::{SharedStyleContext, Stylesheet, Stylist};
+use style::stylesheets::CSSRuleIteratorExt;
use traversal::RecalcStyleAndConstructFlows;
use url::Url;
use util::geometry::MAX_RECT;
@@ -477,7 +479,7 @@ impl LayoutThread {
style_context: SharedStyleContext {
viewport_size: self.viewport_size.clone(),
screen_size_changed: screen_size_changed,
- stylist: StylistWrapper(&*rw_data.stylist),
+ stylist: StylistWrapper::<ServoSelectorImpl>(&*rw_data.stylist),
generation: self.generation,
goal: goal,
new_animations_sender: Mutex::new(self.new_animations_sender.clone()),