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