From d2e0098a030f06c496d8e6e1a778b4f6b4103670 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 22 Feb 2017 17:15:31 +0100 Subject: [PATCH] Stylo: add `content: -moz-alt-content` --- components/style/properties/gecko.mako.rs | 2 ++ .../style/properties/longhand/counters.mako.rs | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 34f6981925b..ac98e99ee24 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -3120,6 +3120,8 @@ clip-path => self.gecko.mContents[i].mType = eStyleContentType_NoOpenQuote, ContentItem::NoCloseQuote => self.gecko.mContents[i].mType = eStyleContentType_NoCloseQuote, + ContentItem::MozAltContent + => self.gecko.mContents[i].mType = eStyleContentType_AltContent, ContentItem::Counter(..) | ContentItem::Counters(..) => self.gecko.mContents[i].mType = eStyleContentType_Uninitialized, diff --git a/components/style/properties/longhand/counters.mako.rs b/components/style/properties/longhand/counters.mako.rs index 265e4b9bfe0..e44a49233ed 100644 --- a/components/style/properties/longhand/counters.mako.rs +++ b/components/style/properties/longhand/counters.mako.rs @@ -44,6 +44,11 @@ NoOpenQuote, /// `no-close-quote`. NoCloseQuote, + + % if product == "gecko": + /// `-moz-alt-content` + MozAltContent, + % endif } impl ToCss for ContentItem { @@ -72,6 +77,10 @@ ContentItem::CloseQuote => dest.write_str("close-quote"), ContentItem::NoOpenQuote => dest.write_str("no-open-quote"), ContentItem::NoCloseQuote => dest.write_str("no-close-quote"), + + % if product == "gecko": + ContentItem::MozAltContent => dest.write_str("-moz-alt-content"), + % endif } } } @@ -159,6 +168,11 @@ "close-quote" => content.push(ContentItem::CloseQuote), "no-open-quote" => content.push(ContentItem::NoOpenQuote), "no-close-quote" => content.push(ContentItem::NoCloseQuote), + + % if product == "gecko": + "-moz-alt-content" => content.push(ContentItem::MozAltContent), + % endif + _ => return Err(()) } }