diff options
Diffstat (limited to 'components/style/traversal.rs')
-rw-r--r-- | components/style/traversal.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/components/style/traversal.rs b/components/style/traversal.rs index f39347e83ab..c7ba825acbd 100644 --- a/components/style/traversal.rs +++ b/components/style/traversal.rs @@ -123,8 +123,8 @@ pub fn recalc_style_at<'a, N, C>(context: &'a C, root: OpaqueNode, node: N) where N: TNode, - C: StyleContext<'a, <N::ConcreteElement as Element>::Impl, N::ConcreteComputedValues>, - <N::ConcreteElement as Element>::Impl: SelectorImplExt + 'a { + C: StyleContext<'a, <N::ConcreteElement as Element>::Impl>, + <N::ConcreteElement as Element>::Impl: SelectorImplExt<ComputedValues=N::ConcreteComputedValues> + 'a { // Initialize layout data. // // FIXME(pcwalton): Stop allocating here. Ideally this should just be done by the HTML @@ -167,8 +167,9 @@ pub fn recalc_style_at<'a, N, C>(context: &'a C, let shareable_element = match node.as_element() { Some(element) => { // Perform the CSS selector matching. - let stylist = unsafe { &*context.shared_context().stylist.0 }; - if element.match_element(stylist, + let stylist = &context.shared_context().stylist; + + if element.match_element(&**stylist, Some(&*bf), &mut applicable_declarations) { Some(element) |