From 64f19ae34db3e754dbc62288e01598700315d978 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sun, 24 Mar 2019 23:13:53 +0100 Subject: [PATCH] style: Add support for the 'content' CSS property on ::marker pseudo elements. Bug: 205202 Reviewed-by: emilio --- components/style/style_adjuster.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index 8df5bc222bf..54b7dfc8a5b 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -174,10 +174,15 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { /// Apply the blockification rules based on the table in CSS 2.2 section 9.7. /// + /// A ::marker pseudo-element with 'list-style-position:outside' needs to + /// have its 'display' blockified. fn blockify_if_necessary(&mut self, layout_parent_style: &ComputedValues, element: Option) where E: TElement, { + use crate::selector_parser::PseudoElement; + use crate::computed_values::list_style_position::T as ListStylePosition; + let mut blockify = false; macro_rules! blockify_if { ($if_what:expr) => { @@ -200,6 +205,8 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { blockify_if!(self.style.floated()); blockify_if!(self.style.out_of_flow_positioned()); + blockify_if!(self.style.pseudo == Some(&PseudoElement::Marker) && + self.style.get_parent_list().clone_list_style_position() == ListStylePosition::Outside); if !blockify { return;