Bug 1224013 part 1 - Enable text-emphasis in UA sheets. r=dbaron
authorXidorn Quan <quanxunzhen@gmail.com>
Fri, 04 Dec 2015 12:02:41 +1100
changeset 309723 9dfd459c839628fc852a8beaf2fb599b28269dd2
parent 309722 0ab2f68aa0e2bbae1871e1a6f421ba0e8b8a076c
child 309724 15113b4231c70ccbc1ce420fd03f1984c5b89d22
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1224013
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
layout/style/nsCSSPropList.h
--- a/layout/style/html.css
+++ b/layout/style/html.css
@@ -813,20 +813,18 @@ rtc, rt {
   line-height: 1;
 %ifndef XP_WIN
   /* The widely-used Windows font Meiryo doesn't work fine with this
    * setting, so disable this on Windows. We should re-enable it once
    * Microsoft fixes this issue. See bug 1164279. */
   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;
 }
 rtc:lang(zh-TW), rt:lang(zh-TW) {
   font-size: 30%; /* bopomofo */
   -moz-min-font-size-ratio: 30%;
 }
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -3264,46 +3264,50 @@ CSS_PROP_TEXTRESET(
     VARIANT_HK,
     kTextDecorationStyleKTable,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Custom)
 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,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_Custom)
 CSS_PROP_TEXT(
     text-emphasis-position,
     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,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_TEXT(
     text-emphasis-style,
     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,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 CSS_PROP_TEXT(
     text-indent,
     text_indent,