Bug 1618678 - Make disabling layout.css.cached-scrollbar-styles.enabled not a massive perf regression. r=heycam

(Because of all the extra declarations)

Differential Revision: https://phabricator.services.mozilla.com/D65916

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2020-04-04 12:39:58 +00:00
Родитель 84a2155141
Коммит 622f498e09
1 изменённых файлов: 60 добавлений и 58 удалений

Просмотреть файл

@ -33,60 +33,73 @@
} }
/* Rules required for style caching of anonymous content scrollbar parts */ /* Rules required for style caching of anonymous content scrollbar parts */
scrollcorner:-moz-native-anonymous-no-specificity, @supports -moz-bool-pref("layout.css.cached-scrollbar-styles.enabled") {
resizer:-moz-native-anonymous-no-specificity, scrollcorner:-moz-native-anonymous-no-specificity,
scrollbar:-moz-native-anonymous-no-specificity, resizer:-moz-native-anonymous-no-specificity,
scrollbarbutton:-moz-native-anonymous-no-specificity, scrollbar:-moz-native-anonymous-no-specificity,
slider:-moz-native-anonymous-no-specificity { scrollbarbutton:-moz-native-anonymous-no-specificity,
/* All scrollbar parts must not inherit any properties from the scrollable slider:-moz-native-anonymous-no-specificity {
* element (except for visibility and pointer-events), for the anonymous /* All scrollbar parts must not inherit any properties from the scrollable
* content style caching system to work. * element (except for visibility and pointer-events), for the anonymous
*/ * content style caching system to work.
all: initial; */
visibility: inherit; all: initial;
pointer-events: inherit; visibility: inherit;
pointer-events: inherit;
/* These properties are not included in 'all'. */ /* These properties are not included in 'all'. */
-moz-list-reversed: initial; -moz-list-reversed: initial;
-moz-font-smoothing-background-color: initial; -moz-font-smoothing-background-color: initial;
-moz-min-font-size-ratio: initial; -moz-min-font-size-ratio: initial;
/* Using initial is not sufficient for direction, since its initial value can /* Using initial is not sufficient for direction, since its initial value can
* depend on the document's language. * depend on the document's language.
* *
* LTR is what we want for all scrollbar parts anyway, so that e.g. we don't * LTR is what we want for all scrollbar parts anyway, so that e.g. we don't
* reverse the rendering of a horizontal scrollbar. * reverse the rendering of a horizontal scrollbar.
*/ */
direction: ltr; direction: ltr;
/* Similarly for font properties, whose initial values depend on the /* Similarly for font properties, whose initial values depend on the
* document's language. Scrollbar parts don't have any text or rely on * document's language. Scrollbar parts don't have any text or rely on
* font metrics. * font metrics.
*/ */
font: 16px sans-serif; font: 16px sans-serif;
/* The initial value of justify-items is `legacy`, which makes it depend on /* The initial value of justify-items is `legacy`, which makes it depend on
* the parent style. * the parent style.
* *
* Reset it to something else. * Reset it to something else.
*/ */
justify-items: start; justify-items: start;
/* Avoid `object > *` rule in html.css from setting a useless, non-initial /* Avoid `object > *` rule in html.css from setting a useless, non-initial
* value of vertical-align. * value of vertical-align.
*/ */
vertical-align: initial !important; vertical-align: initial !important;
/* Duplicate the rules from the '*' rule above, which were clobbered by the /* Duplicate the rules from the '*' rule above, which were clobbered by the
* 'all: initial' declaration. * 'all: initial' declaration.
* *
* The other zero specificity rules above are on :root, and scrollbar parts * The other zero specificity rules above are on :root, and scrollbar parts
* cannot match :root, so no need to duplicate them. * cannot match :root, so no need to duplicate them.
*/
-moz-user-focus: ignore;
-moz-user-select: none;
display: -moz-box;
box-sizing: border-box;
}
/* There are other rules that set direction and cursor on scrollbar,
* expecting them to inherit into its children. Explicitly inherit those,
* overriding the 'all: initial; direction: ltr;' declarations above.
*/ */
-moz-user-focus: ignore; scrollbarbutton:-moz-native-anonymous-no-specificity,
-moz-user-select: none; slider:-moz-native-anonymous-no-specificity,
display: -moz-box; thumb:-moz-native-anonymous-no-specificity {
box-sizing: border-box; direction: inherit;
cursor: inherit;
}
} }
scrollbar[orient="vertical"], scrollbar[orient="vertical"],
@ -104,17 +117,6 @@ thumb {
-moz-box-pack: center; -moz-box-pack: center;
} }
/* There are other rules that set direction and cursor on scrollbar,
* expecting them to inherit into its children. Explicitly inherit those,
* overriding the 'all: initial; direction: ltr;' declarations above.
*/
scrollbarbutton:-moz-native-anonymous-no-specificity,
slider:-moz-native-anonymous-no-specificity,
thumb:-moz-native-anonymous-no-specificity {
direction: inherit;
cursor: inherit;
}
/********** resizer **********/ /********** resizer **********/
resizer { resizer {