mirror of
https://github.com/servo/servo.git
synced 2025-09-10 23:18:20 +01:00
Stop using UnsafeNode in the StyleSharingCandidateCache.
This commit is contained in:
parent
c5f01fe3b8
commit
946e7fb7c3
7 changed files with 63 additions and 67 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue