aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout')
-rw-r--r--components/layout/construct.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs
index 33b88f6b8c0..bb7f0372189 100644
--- a/components/layout/construct.rs
+++ b/components/layout/construct.rs
@@ -714,7 +714,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
}
let mut style = (*style).clone();
- properties::modify_style_for_text(&mut style);
+ match node.get_pseudo_element_type() {
+ PseudoElementType::Before(_) |
+ PseudoElementType::After(_) => {}
+ _ => properties::modify_style_for_text(&mut style)
+ }
let selected_style = node.selected_style(self.style_context());
@@ -950,7 +954,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
// Modify the style as necessary. (See the comment in
// `properties::modify_style_for_replaced_content()`.)
let mut style = node.style(self.style_context()).clone();
- properties::modify_style_for_replaced_content(&mut style);
+ match node.get_pseudo_element_type() {
+ PseudoElementType::Before(_) |
+ PseudoElementType::After(_) => {}
+ _ => properties::modify_style_for_replaced_content(&mut style)
+ }
// If this is generated content, then we need to initialize the accumulator with the
// fragment corresponding to that content. Otherwise, just initialize with the ordinary