From 27dafc4759347e3dbf7192b79f49f819771ad812 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Fri, 4 Dec 2015 15:16:54 +1100 Subject: [PATCH] Bug 1224013 part 1 - Enable text-emphasis in UA sheets. r=dbaron The only usage of text-emphasis in UA sheets is to clear it on ruby text. Making it enabled in UA sheets allows that rule to take effect without additional code to reload html.css when the pref changes. --- layout/style/html.css | 6 ++---- layout/style/nsCSSPropList.h | 12 ++++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/layout/style/html.css b/layout/style/html.css index d288e567fa1..bb3a1d46e17 100644 --- a/layout/style/html.css +++ b/layout/style/html.css @@ -818,10 +818,8 @@ rtc, rt { font-variant-east-asian: ruby; %endif } -@supports (text-emphasis: none) { - rtc, rt { - text-emphasis: none; - } +rtc, rt { + text-emphasis: none; } rtc:lang(zh), rt:lang(zh) { ruby-align: center; diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 48806894031..66915495cda 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -3269,14 +3269,16 @@ CSS_PROP_SHORTHAND( text-emphasis, text_emphasis, TextEmphasis, - CSS_PROPERTY_PARSE_FUNCTION, + CSS_PROPERTY_PARSE_FUNCTION | + CSS_PROPERTY_ENABLED_IN_UA_SHEETS, "layout.css.text-emphasis.enabled") CSS_PROP_TEXT( text-emphasis-color, text_emphasis_color, TextEmphasisColor, CSS_PROPERTY_PARSE_VALUE | - CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED, + CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED | + CSS_PROPERTY_ENABLED_IN_UA_SHEETS, "layout.css.text-emphasis.enabled", VARIANT_HC, nullptr, @@ -3287,7 +3289,8 @@ CSS_PROP_TEXT( text_emphasis_position, TextEmphasisPosition, CSS_PROPERTY_PARSE_VALUE | - CSS_PROPERTY_VALUE_PARSER_FUNCTION, + CSS_PROPERTY_VALUE_PARSER_FUNCTION | + CSS_PROPERTY_ENABLED_IN_UA_SHEETS, "layout.css.text-emphasis.enabled", 0, kTextEmphasisPositionKTable, @@ -3298,7 +3301,8 @@ CSS_PROP_TEXT( text_emphasis_style, TextEmphasisStyle, CSS_PROPERTY_PARSE_VALUE | - CSS_PROPERTY_VALUE_PARSER_FUNCTION, + CSS_PROPERTY_VALUE_PARSER_FUNCTION | + CSS_PROPERTY_ENABLED_IN_UA_SHEETS, "layout.css.text-emphasis.enabled", 0, nullptr,