diff --git a/devtools/client/shared/output-parser.js b/devtools/client/shared/output-parser.js index 5202ae3a8e1e..76d6253ee643 100644 --- a/devtools/client/shared/output-parser.js +++ b/devtools/client/shared/output-parser.js @@ -21,7 +21,7 @@ const { LocalizationHelper } = require("resource://devtools/shared/l10n.js"); const STYLE_INSPECTOR_L10N = new LocalizationHelper(STYLE_INSPECTOR_PROPERTIES); // Functions that accept an angle argument. -const ANGLE_TAKING_FUNCTIONS = [ +const ANGLE_TAKING_FUNCTIONS = new Set([ "linear-gradient", "-moz-linear-gradient", "repeating-linear-gradient", @@ -37,17 +37,17 @@ const ANGLE_TAKING_FUNCTIONS = [ "skewX", "skewY", "hue-rotate", -]; +]); // All cubic-bezier CSS timing-function names. -const BEZIER_KEYWORDS = [ +const BEZIER_KEYWORDS = new Set([ "linear", "ease-in-out", "ease-in", "ease-out", "ease", -]; +]); // Functions that accept a color argument. -const COLOR_TAKING_FUNCTIONS = [ +const COLOR_TAKING_FUNCTIONS = new Set([ "linear-gradient", "-moz-linear-gradient", "repeating-linear-gradient", @@ -60,9 +60,14 @@ const COLOR_TAKING_FUNCTIONS = [ "repeating-conic-gradient", "drop-shadow", "color-mix", -]; +]); // 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( "layout.css.backdrop-filter.enabled"