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); | ||||
| 
 | ||||
| // 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" | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Nicolas Chevobbe
						Nicolas Chevobbe