diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2017-07-05 14:19:37 -0700 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2017-07-05 16:37:17 -0700 |
commit | 3330653dc80cc8947af17f1989fb7fbf390c4d2f (patch) | |
tree | 85556e4b7c09512eb64519fa6fa7675e52eb532a /components/style/gecko/traversal.rs | |
parent | 296a215e5404eb0fd0c0a34cc1283cd0b84aaea9 (diff) | |
download | servo-3330653dc80cc8947af17f1989fb7fbf390c4d2f.tar.gz servo-3330653dc80cc8947af17f1989fb7fbf390c4d2f.zip |
Rip out the generic abstractions around ThreadLocalStyleContext.
MozReview-Commit-ID: 5WTLuk323Ac
Diffstat (limited to 'components/style/gecko/traversal.rs')
-rw-r--r-- | components/style/gecko/traversal.rs | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/components/style/gecko/traversal.rs b/components/style/gecko/traversal.rs index eb7f52ad269..35683ba08e3 100644 --- a/components/style/gecko/traversal.rs +++ b/components/style/gecko/traversal.rs @@ -5,7 +5,7 @@ //! Gecko-specific bits for the styling DOM traversal. use atomic_refcell::AtomicRefCell; -use context::{SharedStyleContext, StyleContext, ThreadLocalStyleContext}; +use context::{SharedStyleContext, StyleContext}; use data::ElementData; use dom::{NodeInfo, TNode}; use gecko::wrapper::{GeckoElement, GeckoNode}; @@ -29,25 +29,19 @@ impl<'a> RecalcStyleOnly<'a> { } impl<'recalc, 'le> DomTraversal<GeckoElement<'le>> for RecalcStyleOnly<'recalc> { - type ThreadLocalContext = ThreadLocalStyleContext<GeckoElement<'le>>; - fn process_preorder(&self, traversal_data: &PerLevelTraversalData, - thread_local: &mut Self::ThreadLocalContext, + context: &mut StyleContext<GeckoElement<'le>>, node: GeckoNode<'le>) { if node.is_element() { let el = node.as_element().unwrap(); let mut data = unsafe { el.ensure_data() }.borrow_mut(); - let mut context = StyleContext { - shared: &self.shared, - thread_local: thread_local, - }; - recalc_style_at(self, traversal_data, &mut context, el, &mut data); + recalc_style_at(self, traversal_data, context, el, &mut data); } } - fn process_postorder(&self, _: &mut Self::ThreadLocalContext, _: GeckoNode<'le>) { + fn process_postorder(&self, _: &mut StyleContext<GeckoElement<'le>>, _: GeckoNode<'le>) { unreachable!(); } @@ -66,10 +60,6 @@ impl<'recalc, 'le> DomTraversal<GeckoElement<'le>> for RecalcStyleOnly<'recalc> &self.shared } - fn create_thread_local_context(&self) -> Self::ThreadLocalContext { - ThreadLocalStyleContext::new(&self.shared) - } - fn is_parallel(&self) -> bool { self.driver.is_parallel() } |