forked from mirrors/gecko-dev
Bug 1898502 - [devtools] Turn output-parser.js lookup Arrays into Sets. r=devtools-reviewers,bomsy.
Depends on D211330 Differential Revision: https://phabricator.services.mozilla.com/D211371
This commit is contained in:
parent
0e7ecf590e
commit
5b434e2e53
1 changed files with 12 additions and 7 deletions
|
|
@ -21,7 +21,7 @@ const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
|
||||||
const STYLE_INSPECTOR_L10N = new LocalizationHelper(STYLE_INSPECTOR_PROPERTIES);
|
const STYLE_INSPECTOR_L10N = new LocalizationHelper(STYLE_INSPECTOR_PROPERTIES);
|
||||||
|
|
||||||
// Functions that accept an angle argument.
|
// Functions that accept an angle argument.
|
||||||
const ANGLE_TAKING_FUNCTIONS = [
|
const ANGLE_TAKING_FUNCTIONS = new Set([
|
||||||
"linear-gradient",
|
"linear-gradient",
|
||||||
"-moz-linear-gradient",
|
"-moz-linear-gradient",
|
||||||
"repeating-linear-gradient",
|
"repeating-linear-gradient",
|
||||||
|
|
@ -37,17 +37,17 @@ const ANGLE_TAKING_FUNCTIONS = [
|
||||||
"skewX",
|
"skewX",
|
||||||
"skewY",
|
"skewY",
|
||||||
"hue-rotate",
|
"hue-rotate",
|
||||||
];
|
]);
|
||||||
// All cubic-bezier CSS timing-function names.
|
// All cubic-bezier CSS timing-function names.
|
||||||
const BEZIER_KEYWORDS = [
|
const BEZIER_KEYWORDS = new Set([
|
||||||
"linear",
|
"linear",
|
||||||
"ease-in-out",
|
"ease-in-out",
|
||||||
"ease-in",
|
"ease-in",
|
||||||
"ease-out",
|
"ease-out",
|
||||||
"ease",
|
"ease",
|
||||||
];
|
]);
|
||||||
// Functions that accept a color argument.
|
// Functions that accept a color argument.
|
||||||
const COLOR_TAKING_FUNCTIONS = [
|
const COLOR_TAKING_FUNCTIONS = new Set([
|
||||||
"linear-gradient",
|
"linear-gradient",
|
||||||
"-moz-linear-gradient",
|
"-moz-linear-gradient",
|
||||||
"repeating-linear-gradient",
|
"repeating-linear-gradient",
|
||||||
|
|
@ -60,9 +60,14 @@ const COLOR_TAKING_FUNCTIONS = [
|
||||||
"repeating-conic-gradient",
|
"repeating-conic-gradient",
|
||||||
"drop-shadow",
|
"drop-shadow",
|
||||||
"color-mix",
|
"color-mix",
|
||||||
];
|
]);
|
||||||
// Functions that accept a shape argument.
|
// Functions that accept a shape argument.
|
||||||
const BASIC_SHAPE_FUNCTIONS = ["polygon", "circle", "ellipse", "inset"];
|
const BASIC_SHAPE_FUNCTIONS = new Set([
|
||||||
|
"polygon",
|
||||||
|
"circle",
|
||||||
|
"ellipse",
|
||||||
|
"inset",
|
||||||
|
]);
|
||||||
|
|
||||||
const BACKDROP_FILTER_ENABLED = Services.prefs.getBoolPref(
|
const BACKDROP_FILTER_ENABLED = Services.prefs.getBoolPref(
|
||||||
"layout.css.backdrop-filter.enabled"
|
"layout.css.backdrop-filter.enabled"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue