Stop using UnsafeNode in the StyleSharingCandidateCache.

This commit is contained in:
Bobby Holley 2016-12-16 17:42:46 -08:00
parent c5f01fe3b8
commit 946e7fb7c3
7 changed files with 63 additions and 67 deletions

View file

@ -54,7 +54,7 @@ impl<N> DomTraversal<N> for RecalcStyleAndConstructFlows
where N: LayoutNode + TNode,
N::ConcreteElement: TElement
{
type ThreadLocalContext = ScopedThreadLocalLayoutContext;
type ThreadLocalContext = ScopedThreadLocalLayoutContext<N::ConcreteElement>;
fn process_preorder(&self, traversal_data: &mut PerLevelTraversalData,
thread_local: &mut Self::ThreadLocalContext, node: N) {
@ -115,7 +115,7 @@ pub trait PostorderNodeMutTraversal<ConcreteThreadSafeLayoutNode: ThreadSafeLayo
#[inline]
#[allow(unsafe_code)]
fn construct_flows_at<'a, N>(context: &LayoutContext<'a>,
_thread_local: &ScopedThreadLocalLayoutContext,
_thread_local: &ScopedThreadLocalLayoutContext<N::ConcreteElement>,
root: OpaqueNode, node: N)
where N: LayoutNode,
{