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

@ -875,12 +875,12 @@ pub extern "C" fn Servo_ResolveStyle(element: RawGeckoElementBorrowed,
};
let mut tlc = ThreadLocalStyleContext::new(traversal.shared_context());
let context = StyleContext {
let mut context = StyleContext {
shared: traversal.shared_context(),
thread_local: &mut tlc,
};
recalc_style_at(&traversal, &mut traversal_data, &context, element, &mut data);
recalc_style_at(&traversal, &mut traversal_data, &mut context, element, &mut data);
// The element was either unstyled or needed restyle. If it was unstyled, it may have
// additional unstyled children that subsequent traversals won't find now that the style