diff --git a/src/components/layout/css/matching.rs b/src/components/layout/css/matching.rs index 514a4767dc8..afce7c237f0 100644 --- a/src/components/layout/css/matching.rs +++ b/src/components/layout/css/matching.rs @@ -553,14 +553,14 @@ impl<'ln> MatchMethods for LayoutNode<'ln> { applicable_declarations_cache, applicable_declarations.normal_shareable); if applicable_declarations.before.len() > 0 { - self.cascade_node_pseudo_element(parent_style, + self.cascade_node_pseudo_element(Some(layout_data.shared_data.style.get_ref()), applicable_declarations.before.as_slice(), &mut layout_data.data.before_style, applicable_declarations_cache, false); } if applicable_declarations.after.len() > 0 { - self.cascade_node_pseudo_element(parent_style, + self.cascade_node_pseudo_element(Some(layout_data.shared_data.style.get_ref()), applicable_declarations.after.as_slice(), &mut layout_data.data.after_style, applicable_declarations_cache, diff --git a/src/test/ref/basic.list b/src/test/ref/basic.list index 6f6c775d685..91eba682ffb 100644 --- a/src/test/ref/basic.list +++ b/src/test/ref/basic.list @@ -82,3 +82,4 @@ == position_fixed_background_color_a.html position_fixed_background_color_b.html == position_fixed_overflow_a.html position_fixed_overflow_b.html == noscript.html noscript_ref.html +== pseudo_inherit.html pseudo_inherit_ref.html diff --git a/src/test/ref/pseudo_inherit.html b/src/test/ref/pseudo_inherit.html new file mode 100644 index 00000000000..d536abbfbda --- /dev/null +++ b/src/test/ref/pseudo_inherit.html @@ -0,0 +1,17 @@ + + + + + + + +

B

+ + diff --git a/src/test/ref/pseudo_inherit_ref.html b/src/test/ref/pseudo_inherit_ref.html new file mode 100644 index 00000000000..0195f154cf3 --- /dev/null +++ b/src/test/ref/pseudo_inherit_ref.html @@ -0,0 +1,14 @@ + + + + + + + +

AB

+ +