diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2016-12-16 17:42:46 -0800 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2016-12-21 11:10:41 -0800 |
commit | 946e7fb7c34afd51ba332180387a10d88c878585 (patch) | |
tree | 5fbd55bf228ca7d2b5a46ae67aa72e8dedabd51d /components/layout/context.rs | |
parent | c5f01fe3b89c2a381fb891e9728fa2951b87a747 (diff) | |
download | servo-946e7fb7c34afd51ba332180387a10d88c878585.tar.gz servo-946e7fb7c34afd51ba332180387a10d88c878585.zip |
Stop using UnsafeNode in the StyleSharingCandidateCache.
Diffstat (limited to 'components/layout/context.rs')
-rw-r--r-- | components/layout/context.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/layout/context.rs b/components/layout/context.rs index cc20fa4ef0c..e2d1fa7831c 100644 --- a/components/layout/context.rs +++ b/components/layout/context.rs @@ -25,13 +25,14 @@ use std::hash::BuildHasherDefault; use std::rc::Rc; use std::sync::{Arc, Mutex}; use style::context::{SharedStyleContext, ThreadLocalStyleContext}; +use style::dom::TElement; /// TLS data scoped to the traversal. -pub struct ScopedThreadLocalLayoutContext { - pub style_context: ThreadLocalStyleContext, +pub struct ScopedThreadLocalLayoutContext<E: TElement> { + pub style_context: ThreadLocalStyleContext<E>, } -impl ScopedThreadLocalLayoutContext { +impl<E: TElement> ScopedThreadLocalLayoutContext<E> { pub fn new(shared: &SharedLayoutContext) -> Self { ScopedThreadLocalLayoutContext { style_context: ThreadLocalStyleContext::new(&shared.style_context), |