diff options
Diffstat (limited to 'components/style/context.rs')
-rw-r--r-- | components/style/context.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/components/style/context.rs b/components/style/context.rs index 6e4edfd1b52..ef19bc2561e 100644 --- a/components/style/context.rs +++ b/components/style/context.rs @@ -8,6 +8,7 @@ use dom::OpaqueNode; use error_reporting::ParseErrorReporter; use euclid::Size2D; use matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache}; +use properties::TComputedValues; use selector_impl::SelectorImplExt; use selector_matching::Stylist; use std::cell::RefCell; @@ -54,15 +55,15 @@ pub struct SharedStyleContext<Impl: SelectorImplExt> { pub error_reporter: Box<ParseErrorReporter + Sync>, } -pub struct LocalStyleContext { - pub applicable_declarations_cache: RefCell<ApplicableDeclarationsCache>, - pub style_sharing_candidate_cache: RefCell<StyleSharingCandidateCache>, +pub struct LocalStyleContext<C: TComputedValues> { + pub applicable_declarations_cache: RefCell<ApplicableDeclarationsCache<C>>, + pub style_sharing_candidate_cache: RefCell<StyleSharingCandidateCache<C>>, } -pub trait StyleContext<'a, Impl: SelectorImplExt> { +pub trait StyleContext<'a, Impl: SelectorImplExt, C: TComputedValues> { fn shared_context(&self) -> &'a SharedStyleContext<Impl>; - fn local_context(&self) -> &LocalStyleContext; + fn local_context(&self) -> &LocalStyleContext<C>; } /// Why we're doing reflow. |