File: CSSPropertyNames.gperf

package info (click to toggle)
webkit2gtk 2.51.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 455,340 kB
  • sloc: cpp: 3,865,253; javascript: 197,710; ansic: 165,177; python: 49,241; asm: 21,868; ruby: 18,095; perl: 16,926; xml: 4,623; sh: 2,409; yacc: 2,356; java: 2,019; lex: 1,330; pascal: 372; makefile: 210
file content (930 lines) | stat: -rw-r--r-- 52,110 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
%{
// This file is automatically generated from CSSProperties.json by the process-css-properties.py script. Do not edit it.

#include "config.h"
#include "CSSPropertyNames.h"

#include "BoxSides.h"
#include "CSSProperty.h"
#include "Settings.h"
#include <string.h>
#include <wtf/ASCIICType.h>
#include <wtf/Hasher.h>
#include <wtf/text/AtomString.h>
#include <wtf/text/TextStream.h>


IGNORE_WARNINGS_BEGIN("implicit-fallthrough")
WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN

// Older versions of gperf like to use the `register` keyword.
#define register

namespace WebCore {

static_assert(cssPropertyIDEnumValueCount <= (std::numeric_limits<uint16_t>::max() + 1), "CSSPropertyID should fit into uint16_t.");

const std::array<CSSPropertyID, 105> computedPropertyIDs {
    CSSPropertyID::CSSPropertyBackgroundFillLayerTestPrimary,
    CSSPropertyID::CSSPropertyBackgroundFillLayerTestSecondary,
    CSSPropertyID::CSSPropertyBackgroundFillLayerTestSecondaryWithConverter,
    CSSPropertyID::CSSPropertyTestAnimationWrapper,
    CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationAlways,
    CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationThreadedOnly,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommas,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasFixed,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasSingleItemOpt,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpaces,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesFixed,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesSingleItemOpt,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithType,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeWithDefaultPrevious,
    CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeWithDefaultPreviousTwo,
    CSSPropertyID::CSSPropertyTestColor,
    CSSPropertyID::CSSPropertyTestColorAllowsTypesAbsolute,
    CSSPropertyID::CSSPropertyTestColorPropertyWithNoVisitedLinkSupport,
    CSSPropertyID::CSSPropertyTestColorPropertyWithVisitedLinkSupport,
    CSSPropertyID::CSSPropertyTestCustomExtractor,
    CSSPropertyID::CSSPropertyTestExtractorConverter,
    CSSPropertyID::CSSPropertyTestFunctionBoundedParameters,
    CSSPropertyID::CSSPropertyTestFunctionFixedParameters,
    CSSPropertyID::CSSPropertyTestFunctionNoParameters,
    CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllAnyOrder,
    CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllAnyOrderWithOptional,
    CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllOrdered,
    CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllOrderedWithOptional,
    CSSPropertyID::CSSPropertyTestFunctionParametersMatchOneOrMoreAnyOrder,
    CSSPropertyID::CSSPropertyTestFunctionSingleParameter,
    CSSPropertyID::CSSPropertyTestFunctionSingleParameterMatchOne,
    CSSPropertyID::CSSPropertyTestFunctionSingleParameterOptional,
    CSSPropertyID::CSSPropertyTestFunctionUnboundedParametersNoMin,
    CSSPropertyID::CSSPropertyTestFunctionUnboundedParametersWithMinimum,
    CSSPropertyID::CSSPropertyTestHighPriority,
    CSSPropertyID::CSSPropertyTestImage,
    CSSPropertyID::CSSPropertyTestImageNoImageSet,
    CSSPropertyID::CSSPropertyTestKeyword,
    CSSPropertyID::CSSPropertyTestKeywordWithAliasedTo,
    CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock,
    CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline,
    CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal,
    CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrder,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithCustomType,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptional,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndCustomType,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndCustomType,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndCustomTypeNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndPreserveOrderAndCustomType,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndPreserveOrderAndCustomTypeNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndPreserveOrderAndCustomType,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalWithPreserveOrder,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalWithPreserveOrderNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithPreserveOrder,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithPreserveOrderAndCustomType,
    CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithPreserveOrderNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchAllOrdered,
    CSSPropertyID::CSSPropertyTestMatchAllOrderedWithCustomType,
    CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptional,
    CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndCustomType,
    CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndCustomTypeAndNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndMultipleRequired,
    CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndMultipleRequiredAndCustomType,
    CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchOne,
    CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrder,
    CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithCustomType,
    CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithCustomTypeNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrder,
    CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderAndCustomType,
    CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderAndCustomTypeNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestMatchOneWithGroupWithSettingsFlag,
    CSSPropertyID::CSSPropertyTestMatchOneWithKeywordWithSettingsFlag,
    CSSPropertyID::CSSPropertyTestMatchOneWithMultipleKeywords,
    CSSPropertyID::CSSPropertyTestMatchOneWithReferenceWithSettingsFlag,
    CSSPropertyID::CSSPropertyTestMatchOneWithSettingsFlag,
    CSSPropertyID::CSSPropertyTestMediumPriority,
    CSSPropertyID::CSSPropertyTestNumericValueRange,
    CSSPropertyID::CSSPropertyTestProperty,
    CSSPropertyID::CSSPropertyTestSettingsOne,
    CSSPropertyID::CSSPropertyTestSharedBuilderExtractorConverter,
    CSSPropertyID::CSSPropertyTestSinkPriority,
    CSSPropertyID::CSSPropertyTestTopPriority,
    CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMin,
    CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMinNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMinSingleItemOpt,
    CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesNoMin,
    CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesNoMinNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMin,
    CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMinNoSingleItemOpt,
    CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMinSingleItemOpt,
    CSSPropertyID::CSSPropertyTestUrlWithModifiers,
    CSSPropertyID::CSSPropertyTestUrlWithNoModifiers,
    CSSPropertyID::CSSPropertyTestUsingSharedRule,
    CSSPropertyID::CSSPropertyTestUsingSharedRuleExported,
    CSSPropertyID::CSSPropertyTestUsingSharedRuleWithOverrideFunction,
};

constexpr ASCIILiteral propertyNameStrings[numCSSProperties] = {
    "test-top-priority"_s,
    "test-high-priority"_s,
    "background-fill-layer-test-primary"_s,
    "test-medium-priority"_s,
    "background-fill-layer-test-secondary"_s,
    "background-fill-layer-test-secondary-with-converter"_s,
    "first-test-descriptor-for-first-descriptor"_s,
    "first-test-descriptor-for-second-descriptor"_s,
    "test-animation-wrapper"_s,
    "test-animation-wrapper-acceleration-always"_s,
    "test-animation-wrapper-acceleration-threaded-only"_s,
    "test-bounded-repetition-with-commas"_s,
    "test-bounded-repetition-with-commas-fixed"_s,
    "test-bounded-repetition-with-commas-no-single-item-opt"_s,
    "test-bounded-repetition-with-commas-single-item-opt"_s,
    "test-bounded-repetition-with-spaces"_s,
    "test-bounded-repetition-with-spaces-fixed"_s,
    "test-bounded-repetition-with-spaces-no-single-item-opt"_s,
    "test-bounded-repetition-with-spaces-single-item-opt"_s,
    "test-bounded-repetition-with-spaces-with-type"_s,
    "test-bounded-repetition-with-spaces-with-type-no-single-item-opt"_s,
    "test-bounded-repetition-with-spaces-with-type-with-default-previous"_s,
    "test-bounded-repetition-with-spaces-with-type-with-default-previous-two"_s,
    "test-color"_s,
    "test-color-allows-types-absolute"_s,
    "test-color-property-with-no-visited-link-support"_s,
    "test-color-property-with-visited-link-support"_s,
    "test-custom-extractor"_s,
    "test-extractor-converter"_s,
    "test-function-bounded-parameters"_s,
    "test-function-fixed-parameters"_s,
    "test-function-no-parameters"_s,
    "test-function-parameters-match-all-any-order"_s,
    "test-function-parameters-match-all-any-order-with-optional"_s,
    "test-function-parameters-match-all-ordered"_s,
    "test-function-parameters-match-all-ordered-with-optional"_s,
    "test-function-parameters-match-one-or-more-any-order"_s,
    "test-function-single-parameter"_s,
    "test-function-single-parameter-match-one"_s,
    "test-function-single-parameter-optional"_s,
    "test-function-unbounded-parameters-no-min"_s,
    "test-function-unbounded-parameters-with-minimum"_s,
    "test-image"_s,
    "test-image-no-image-set"_s,
    "test-keyword"_s,
    "test-keyword-with-aliased-to"_s,
    "test-match-all-any-order"_s,
    "test-match-all-any-order-with-custom-type"_s,
    "test-match-all-any-order-with-optional"_s,
    "test-match-all-any-order-with-optional-and-custom-type"_s,
    "test-match-all-any-order-with-optional-and-multiple-required-and-custom-type"_s,
    "test-match-all-any-order-with-optional-and-multiple-required-and-custom-type-no-single-item-opt"_s,
    "test-match-all-any-order-with-optional-and-multiple-required-and-preserve-order-and-custom-type"_s,
    "test-match-all-any-order-with-optional-and-multiple-required-and-preserve-order-and-custom-type-no-single-item-opt"_s,
    "test-match-all-any-order-with-optional-and-preserve-order-and-custom-type"_s,
    "test-match-all-any-order-with-optional-no-single-item-opt"_s,
    "test-match-all-any-order-with-optional-single-item-opt"_s,
    "test-match-all-any-order-with-optional-with-preserve-order"_s,
    "test-match-all-any-order-with-optional-with-preserve-order-no-single-item-opt"_s,
    "test-match-all-any-order-with-preserve-order"_s,
    "test-match-all-any-order-with-preserve-order-and-custom-type"_s,
    "test-match-all-any-order-with-preserve-order-no-single-item-opt"_s,
    "test-match-all-ordered"_s,
    "test-match-all-ordered-with-custom-type"_s,
    "test-match-all-ordered-with-optional"_s,
    "test-match-all-ordered-with-optional-and-custom-type"_s,
    "test-match-all-ordered-with-optional-and-custom-type-and-no-single-item-opt"_s,
    "test-match-all-ordered-with-optional-and-multiple-required"_s,
    "test-match-all-ordered-with-optional-and-multiple-required-and-custom-type"_s,
    "test-match-all-ordered-with-optional-no-single-item-opt"_s,
    "test-match-all-ordered-with-optional-single-item-opt"_s,
    "test-match-one"_s,
    "test-match-one-or-more-any-order"_s,
    "test-match-one-or-more-any-order-no-single-item-opt"_s,
    "test-match-one-or-more-any-order-with-custom-type"_s,
    "test-match-one-or-more-any-order-with-custom-type-no-single-item-opt"_s,
    "test-match-one-or-more-any-order-with-preserve-order"_s,
    "test-match-one-or-more-any-order-with-preserve-order-and-custom-type"_s,
    "test-match-one-or-more-any-order-with-preserve-order-and-custom-type-no-single-item-opt"_s,
    "test-match-one-or-more-any-order-with-preserve-order-no-single-item-opt"_s,
    "test-match-one-with-group-with-settings-flag"_s,
    "test-match-one-with-keyword-with-settings-flag"_s,
    "test-match-one-with-multiple-keywords"_s,
    "test-match-one-with-reference-with-settings-flag"_s,
    "test-match-one-with-settings-flag"_s,
    "test-numeric-value-range"_s,
    "test-property"_s,
    "test-settings-one"_s,
    "test-shared-builder-extractor-converter"_s,
    "test-unbounded-repetition-with-commas-with-min"_s,
    "test-unbounded-repetition-with-commas-with-min-no-single-item-opt"_s,
    "test-unbounded-repetition-with-commas-with-min-single-item-opt"_s,
    "test-unbounded-repetition-with-spaces-no-min"_s,
    "test-unbounded-repetition-with-spaces-no-min-no-single-item-opt"_s,
    "test-unbounded-repetition-with-spaces-with-min"_s,
    "test-unbounded-repetition-with-spaces-with-min-no-single-item-opt"_s,
    "test-unbounded-repetition-with-spaces-with-min-single-item-opt"_s,
    "test-url-with-modifiers"_s,
    "test-url-with-no-modifiers"_s,
    "test-using-shared-rule"_s,
    "test-using-shared-rule-exported"_s,
    "test-using-shared-rule-with-override-function"_s,
    "test-sink-priority"_s,
    "test-logical-property-group-physical-horizontal"_s,
    "test-logical-property-group-physical-vertical"_s,
    "test-logical-property-group-logical-block"_s,
    "test-logical-property-group-logical-inline"_s,
    "all"_s,
    "font"_s,
    "test-shorthand-one"_s,
    "test-shorthand-two"_s,
};

%}
%struct-type
struct CSSPropertyHashTableEntry {
    const char* name;
    uint16_t id;
};
%language=C++
%readonly-tables
%global-table
%7bit
%compare-strncmp
%define class-name CSSPropertyNamesHash
%enum

%%
all, CSSPropertyID::CSSPropertyAll
background-fill-layer-test-primary, CSSPropertyID::CSSPropertyBackgroundFillLayerTestPrimary
background-fill-layer-test-secondary, CSSPropertyID::CSSPropertyBackgroundFillLayerTestSecondary
background-fill-layer-test-secondary-with-converter, CSSPropertyID::CSSPropertyBackgroundFillLayerTestSecondaryWithConverter
first-test-descriptor-for-first-descriptor, CSSPropertyID::CSSPropertyFirstTestDescriptorForFirstDescriptor
first-test-descriptor-for-second-descriptor, CSSPropertyID::CSSPropertyFirstTestDescriptorForSecondDescriptor
font, CSSPropertyID::CSSPropertyFont
test-animation-wrapper, CSSPropertyID::CSSPropertyTestAnimationWrapper
test-animation-wrapper-acceleration-always, CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationAlways
test-animation-wrapper-acceleration-threaded-only, CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationThreadedOnly
test-bounded-repetition-with-commas, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommas
test-bounded-repetition-with-commas-fixed, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasFixed
test-bounded-repetition-with-commas-no-single-item-opt, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasNoSingleItemOpt
test-bounded-repetition-with-commas-single-item-opt, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasSingleItemOpt
test-bounded-repetition-with-spaces, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpaces
test-bounded-repetition-with-spaces-fixed, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesFixed
test-bounded-repetition-with-spaces-no-single-item-opt, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesNoSingleItemOpt
test-bounded-repetition-with-spaces-single-item-opt, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesSingleItemOpt
test-bounded-repetition-with-spaces-with-type, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithType
test-bounded-repetition-with-spaces-with-type-no-single-item-opt, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeNoSingleItemOpt
test-bounded-repetition-with-spaces-with-type-with-default-previous, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeWithDefaultPrevious
test-bounded-repetition-with-spaces-with-type-with-default-previous-two, CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeWithDefaultPreviousTwo
test-color, CSSPropertyID::CSSPropertyTestColor
test-color-allows-types-absolute, CSSPropertyID::CSSPropertyTestColorAllowsTypesAbsolute
test-color-property-with-no-visited-link-support, CSSPropertyID::CSSPropertyTestColorPropertyWithNoVisitedLinkSupport
test-color-property-with-visited-link-support, CSSPropertyID::CSSPropertyTestColorPropertyWithVisitedLinkSupport
test-custom-extractor, CSSPropertyID::CSSPropertyTestCustomExtractor
test-extractor-converter, CSSPropertyID::CSSPropertyTestExtractorConverter
test-function-bounded-parameters, CSSPropertyID::CSSPropertyTestFunctionBoundedParameters
test-function-fixed-parameters, CSSPropertyID::CSSPropertyTestFunctionFixedParameters
test-function-no-parameters, CSSPropertyID::CSSPropertyTestFunctionNoParameters
test-function-parameters-match-all-any-order, CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllAnyOrder
test-function-parameters-match-all-any-order-with-optional, CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllAnyOrderWithOptional
test-function-parameters-match-all-ordered, CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllOrdered
test-function-parameters-match-all-ordered-with-optional, CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllOrderedWithOptional
test-function-parameters-match-one-or-more-any-order, CSSPropertyID::CSSPropertyTestFunctionParametersMatchOneOrMoreAnyOrder
test-function-single-parameter, CSSPropertyID::CSSPropertyTestFunctionSingleParameter
test-function-single-parameter-match-one, CSSPropertyID::CSSPropertyTestFunctionSingleParameterMatchOne
test-function-single-parameter-optional, CSSPropertyID::CSSPropertyTestFunctionSingleParameterOptional
test-function-unbounded-parameters-no-min, CSSPropertyID::CSSPropertyTestFunctionUnboundedParametersNoMin
test-function-unbounded-parameters-with-minimum, CSSPropertyID::CSSPropertyTestFunctionUnboundedParametersWithMinimum
test-high-priority, CSSPropertyID::CSSPropertyTestHighPriority
test-image, CSSPropertyID::CSSPropertyTestImage
test-image-no-image-set, CSSPropertyID::CSSPropertyTestImageNoImageSet
test-keyword, CSSPropertyID::CSSPropertyTestKeyword
test-keyword-with-aliased-to, CSSPropertyID::CSSPropertyTestKeywordWithAliasedTo
test-logical-property-group-logical-block, CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock
test-logical-property-group-logical-inline, CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline
test-logical-property-group-physical-horizontal, CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal
test-logical-property-group-physical-vertical, CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical
test-match-all-any-order, CSSPropertyID::CSSPropertyTestMatchAllAnyOrder
test-match-all-any-order-with-custom-type, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithCustomType
test-match-all-any-order-with-optional, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptional
test-match-all-any-order-with-optional-and-custom-type, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndCustomType
test-match-all-any-order-with-optional-and-multiple-required-and-custom-type, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndCustomType
test-match-all-any-order-with-optional-and-multiple-required-and-custom-type-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndCustomTypeNoSingleItemOpt
test-match-all-any-order-with-optional-and-multiple-required-and-preserve-order-and-custom-type, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndPreserveOrderAndCustomType
test-match-all-any-order-with-optional-and-multiple-required-and-preserve-order-and-custom-type-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndPreserveOrderAndCustomTypeNoSingleItemOpt
test-match-all-any-order-with-optional-and-preserve-order-and-custom-type, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndPreserveOrderAndCustomType
test-match-all-any-order-with-optional-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalNoSingleItemOpt
test-match-all-any-order-with-optional-single-item-opt, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalSingleItemOpt
test-match-all-any-order-with-optional-with-preserve-order, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalWithPreserveOrder
test-match-all-any-order-with-optional-with-preserve-order-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalWithPreserveOrderNoSingleItemOpt
test-match-all-any-order-with-preserve-order, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithPreserveOrder
test-match-all-any-order-with-preserve-order-and-custom-type, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithPreserveOrderAndCustomType
test-match-all-any-order-with-preserve-order-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithPreserveOrderNoSingleItemOpt
test-match-all-ordered, CSSPropertyID::CSSPropertyTestMatchAllOrdered
test-match-all-ordered-with-custom-type, CSSPropertyID::CSSPropertyTestMatchAllOrderedWithCustomType
test-match-all-ordered-with-optional, CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptional
test-match-all-ordered-with-optional-and-custom-type, CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndCustomType
test-match-all-ordered-with-optional-and-custom-type-and-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndCustomTypeAndNoSingleItemOpt
test-match-all-ordered-with-optional-and-multiple-required, CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndMultipleRequired
test-match-all-ordered-with-optional-and-multiple-required-and-custom-type, CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndMultipleRequiredAndCustomType
test-match-all-ordered-with-optional-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalNoSingleItemOpt
test-match-all-ordered-with-optional-single-item-opt, CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalSingleItemOpt
test-match-one, CSSPropertyID::CSSPropertyTestMatchOne
test-match-one-or-more-any-order, CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrder
test-match-one-or-more-any-order-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderNoSingleItemOpt
test-match-one-or-more-any-order-with-custom-type, CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithCustomType
test-match-one-or-more-any-order-with-custom-type-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithCustomTypeNoSingleItemOpt
test-match-one-or-more-any-order-with-preserve-order, CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrder
test-match-one-or-more-any-order-with-preserve-order-and-custom-type, CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderAndCustomType
test-match-one-or-more-any-order-with-preserve-order-and-custom-type-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderAndCustomTypeNoSingleItemOpt
test-match-one-or-more-any-order-with-preserve-order-no-single-item-opt, CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderNoSingleItemOpt
test-match-one-with-group-with-settings-flag, CSSPropertyID::CSSPropertyTestMatchOneWithGroupWithSettingsFlag
test-match-one-with-keyword-with-settings-flag, CSSPropertyID::CSSPropertyTestMatchOneWithKeywordWithSettingsFlag
test-match-one-with-multiple-keywords, CSSPropertyID::CSSPropertyTestMatchOneWithMultipleKeywords
test-match-one-with-reference-with-settings-flag, CSSPropertyID::CSSPropertyTestMatchOneWithReferenceWithSettingsFlag
test-match-one-with-settings-flag, CSSPropertyID::CSSPropertyTestMatchOneWithSettingsFlag
test-medium-priority, CSSPropertyID::CSSPropertyTestMediumPriority
test-numeric-value-range, CSSPropertyID::CSSPropertyTestNumericValueRange
test-property, CSSPropertyID::CSSPropertyTestProperty
test-settings-one, CSSPropertyID::CSSPropertyTestSettingsOne
test-shared-builder-extractor-converter, CSSPropertyID::CSSPropertyTestSharedBuilderExtractorConverter
test-shorthand-one, CSSPropertyID::CSSPropertyTestShorthandOne
test-shorthand-two, CSSPropertyID::CSSPropertyTestShorthandTwo
test-sink-priority, CSSPropertyID::CSSPropertyTestSinkPriority
test-top-priority, CSSPropertyID::CSSPropertyTestTopPriority
test-unbounded-repetition-with-commas-with-min, CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMin
test-unbounded-repetition-with-commas-with-min-no-single-item-opt, CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMinNoSingleItemOpt
test-unbounded-repetition-with-commas-with-min-single-item-opt, CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMinSingleItemOpt
test-unbounded-repetition-with-spaces-no-min, CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesNoMin
test-unbounded-repetition-with-spaces-no-min-no-single-item-opt, CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesNoMinNoSingleItemOpt
test-unbounded-repetition-with-spaces-with-min, CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMin
test-unbounded-repetition-with-spaces-with-min-no-single-item-opt, CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMinNoSingleItemOpt
test-unbounded-repetition-with-spaces-with-min-single-item-opt, CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMinSingleItemOpt
test-url-with-modifiers, CSSPropertyID::CSSPropertyTestUrlWithModifiers
test-url-with-no-modifiers, CSSPropertyID::CSSPropertyTestUrlWithNoModifiers
test-using-shared-rule, CSSPropertyID::CSSPropertyTestUsingSharedRule
test-using-shared-rule-exported, CSSPropertyID::CSSPropertyTestUsingSharedRuleExported
test-using-shared-rule-with-override-function, CSSPropertyID::CSSPropertyTestUsingSharedRuleWithOverrideFunction
%%

CSSPropertyID findCSSProperty(const char* characters, unsigned length)
{
    auto* value = CSSPropertyNamesHash::in_word_set(characters, length);
    return value ? static_cast<CSSPropertyID>(value->id) : CSSPropertyID::CSSPropertyInvalid;
}

ASCIILiteral nameLiteral(CSSPropertyID id)
{
    if (id < firstCSSProperty)
        return { };
    unsigned index = id - firstCSSProperty;
    if (index >= numCSSProperties)
        return { };
    return propertyNameStrings[index];
}

const AtomString& nameString(CSSPropertyID id)
{
    if (id < firstCSSProperty)
        return nullAtom();
    unsigned index = id - firstCSSProperty;
    if (index >= numCSSProperties)
        return nullAtom();

    static NeverDestroyed<std::array<AtomString, numCSSProperties>> atomStrings;
    auto& string = atomStrings.get()[index];
    if (string.isNull())
        string = propertyNameStrings[index];
    return string;
}

String nameForIDL(CSSPropertyID id)
{
    Latin1Character characters[maxCSSPropertyNameLength];
    const char* nameForCSS = nameLiteral(id);
    if (!nameForCSS)
        return emptyString();

    auto* propertyNamePointer = nameForCSS;
    auto* nextCharacter = characters;
    while (char character = *propertyNamePointer++) {
        if (character == '-') {
            char nextCharacter = *propertyNamePointer++;
            if (!nextCharacter)
                break;
            character = (propertyNamePointer - 2 != nameForCSS) ? toASCIIUpper(nextCharacter) : nextCharacter;
        }
        *nextCharacter++ = character;
    }
    return std::span<const Latin1Character> { characters, nextCharacter };
}


bool isInternal(CSSPropertyID id)
{
    switch (id) {
        return true;
    default:
        return false;
    }
}

static bool isExposedNotInvalidAndNotInternal(CSSPropertyID id, const CSSPropertySettings& settings)
{
    switch (id) {
    case CSSPropertyID::CSSPropertyFirstTestDescriptorForFirstDescriptor:
        return settings.cssDescriptorEnabled;
    case CSSPropertyID::CSSPropertyTestSettingsOne:
        return settings.cssSettingsOneEnabled;
    case CSSPropertyID::CSSPropertyTestShorthandTwo:
        return settings.cssSettingsShorthandEnabled;
    default:
        return true;
    }
}

static bool isExposedNotInvalidAndNotInternal(CSSPropertyID id, const Settings& settings)
{
    switch (id) {
    case CSSPropertyID::CSSPropertyFirstTestDescriptorForFirstDescriptor:
        return settings.cssDescriptorEnabled();
    case CSSPropertyID::CSSPropertyTestSettingsOne:
        return settings.cssSettingsOneEnabled();
    case CSSPropertyID::CSSPropertyTestShorthandTwo:
        return settings.cssSettingsShorthandEnabled();
    default:
        return true;
    }
}

bool isExposed(CSSPropertyID id, const CSSPropertySettings* settings)
{
    if (id == CSSPropertyID::CSSPropertyInvalid || isInternal(id))
        return false;
    if (!settings)
        return true;
    return isExposedNotInvalidAndNotInternal(id, *settings);
}

bool isExposed(CSSPropertyID id, const CSSPropertySettings& settings)
{
    if (id == CSSPropertyID::CSSPropertyInvalid || isInternal(id))
        return false;
    return isExposedNotInvalidAndNotInternal(id, settings);
}

bool isExposed(CSSPropertyID id, const Settings* settings)
{
    if (id == CSSPropertyID::CSSPropertyInvalid || isInternal(id))
        return false;
    if (!settings)
        return true;
    return isExposedNotInvalidAndNotInternal(id, *settings);
}

bool isExposed(CSSPropertyID id, const Settings& settings)
{
    if (id == CSSPropertyID::CSSPropertyInvalid || isInternal(id))
        return false;
    return isExposedNotInvalidAndNotInternal(id, settings);
}

constexpr bool isInheritedPropertyTable[cssPropertyIDEnumValueCount] = {
    false, // CSSPropertyID::CSSPropertyInvalid
    true , // CSSPropertyID::CSSPropertyCustom
    false, // CSSPropertyID::CSSPropertyTestTopPriority
    false, // CSSPropertyID::CSSPropertyTestHighPriority
    false, // CSSPropertyID::CSSPropertyBackgroundFillLayerTestPrimary
    false, // CSSPropertyID::CSSPropertyTestMediumPriority
    false, // CSSPropertyID::CSSPropertyBackgroundFillLayerTestSecondary
    false, // CSSPropertyID::CSSPropertyBackgroundFillLayerTestSecondaryWithConverter
    false, // CSSPropertyID::CSSPropertyFirstTestDescriptorForFirstDescriptor
    false, // CSSPropertyID::CSSPropertyFirstTestDescriptorForSecondDescriptor
    false, // CSSPropertyID::CSSPropertyTestAnimationWrapper
    false, // CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationAlways
    false, // CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationThreadedOnly
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommas
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasFixed
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpaces
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesFixed
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithType
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeWithDefaultPrevious
    false, // CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeWithDefaultPreviousTwo
    false, // CSSPropertyID::CSSPropertyTestColor
    false, // CSSPropertyID::CSSPropertyTestColorAllowsTypesAbsolute
    false, // CSSPropertyID::CSSPropertyTestColorPropertyWithNoVisitedLinkSupport
    false, // CSSPropertyID::CSSPropertyTestColorPropertyWithVisitedLinkSupport
    false, // CSSPropertyID::CSSPropertyTestCustomExtractor
    false, // CSSPropertyID::CSSPropertyTestExtractorConverter
    false, // CSSPropertyID::CSSPropertyTestFunctionBoundedParameters
    false, // CSSPropertyID::CSSPropertyTestFunctionFixedParameters
    false, // CSSPropertyID::CSSPropertyTestFunctionNoParameters
    false, // CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllAnyOrder
    false, // CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllAnyOrderWithOptional
    false, // CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllOrdered
    false, // CSSPropertyID::CSSPropertyTestFunctionParametersMatchAllOrderedWithOptional
    false, // CSSPropertyID::CSSPropertyTestFunctionParametersMatchOneOrMoreAnyOrder
    false, // CSSPropertyID::CSSPropertyTestFunctionSingleParameter
    false, // CSSPropertyID::CSSPropertyTestFunctionSingleParameterMatchOne
    false, // CSSPropertyID::CSSPropertyTestFunctionSingleParameterOptional
    false, // CSSPropertyID::CSSPropertyTestFunctionUnboundedParametersNoMin
    false, // CSSPropertyID::CSSPropertyTestFunctionUnboundedParametersWithMinimum
    false, // CSSPropertyID::CSSPropertyTestImage
    false, // CSSPropertyID::CSSPropertyTestImageNoImageSet
    false, // CSSPropertyID::CSSPropertyTestKeyword
    false, // CSSPropertyID::CSSPropertyTestKeywordWithAliasedTo
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrder
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptional
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndCustomTypeNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndPreserveOrderAndCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndMultipleRequiredAndPreserveOrderAndCustomTypeNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndPreserveOrderAndCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalWithPreserveOrder
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalWithPreserveOrderNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithPreserveOrder
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithPreserveOrderAndCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithPreserveOrderNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchAllOrdered
    false, // CSSPropertyID::CSSPropertyTestMatchAllOrderedWithCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptional
    false, // CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndCustomTypeAndNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndMultipleRequired
    false, // CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndMultipleRequiredAndCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchOne
    false, // CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrder
    false, // CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithCustomTypeNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrder
    false, // CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderAndCustomType
    false, // CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderAndCustomTypeNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestMatchOneWithGroupWithSettingsFlag
    false, // CSSPropertyID::CSSPropertyTestMatchOneWithKeywordWithSettingsFlag
    false, // CSSPropertyID::CSSPropertyTestMatchOneWithMultipleKeywords
    false, // CSSPropertyID::CSSPropertyTestMatchOneWithReferenceWithSettingsFlag
    false, // CSSPropertyID::CSSPropertyTestMatchOneWithSettingsFlag
    false, // CSSPropertyID::CSSPropertyTestNumericValueRange
    false, // CSSPropertyID::CSSPropertyTestProperty
    false, // CSSPropertyID::CSSPropertyTestSettingsOne
    false, // CSSPropertyID::CSSPropertyTestSharedBuilderExtractorConverter
    false, // CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMin
    false, // CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMinNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMinSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesNoMin
    false, // CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesNoMinNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMin
    false, // CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMinNoSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMinSingleItemOpt
    false, // CSSPropertyID::CSSPropertyTestUrlWithModifiers
    false, // CSSPropertyID::CSSPropertyTestUrlWithNoModifiers
    false, // CSSPropertyID::CSSPropertyTestUsingSharedRule
    false, // CSSPropertyID::CSSPropertyTestUsingSharedRuleExported
    false, // CSSPropertyID::CSSPropertyTestUsingSharedRuleWithOverrideFunction
    false, // CSSPropertyID::CSSPropertyTestSinkPriority
    false, // CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal
    false, // CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical
    false, // CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock
    false, // CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline
    false, // CSSPropertyID::CSSPropertyAll
    false, // CSSPropertyID::CSSPropertyFont
    false, // CSSPropertyID::CSSPropertyTestShorthandOne
    false, // CSSPropertyID::CSSPropertyTestShorthandTwo
};

bool CSSProperty::isInheritedProperty(CSSPropertyID id)
{
    ASSERT(id < cssPropertyIDEnumValueCount);
    ASSERT(id != CSSPropertyID::CSSPropertyInvalid);
    return isInheritedPropertyTable[id];
}

CSSPropertyID cascadeAliasProperty(CSSPropertyID id)
{
    switch (id) {
    default:
        return id;
    }
}

Vector<String> CSSProperty::aliasesForProperty(CSSPropertyID id)
{
    switch (id) {
    default:
        return { };
    }
}

const WTF::BitSet<cssPropertyIDEnumValueCount> CSSProperty::colorProperties = ([]() -> WTF::BitSet<cssPropertyIDEnumValueCount> {
    WTF::BitSet<cssPropertyIDEnumValueCount> result;
    result.set(CSSPropertyID::CSSPropertyTestColor);
    result.set(CSSPropertyID::CSSPropertyTestColorAllowsTypesAbsolute);
    result.set(CSSPropertyID::CSSPropertyTestColorPropertyWithNoVisitedLinkSupport);
    result.set(CSSPropertyID::CSSPropertyTestColorPropertyWithVisitedLinkSupport);
    return result;
})();

const WTF::BitSet<cssPropertyIDEnumValueCount> CSSProperty::physicalProperties = ([]() -> WTF::BitSet<cssPropertyIDEnumValueCount> {
    WTF::BitSet<cssPropertyIDEnumValueCount> result;
    result.set(CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal);
    result.set(CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical);
    return result;
})();

char16_t CSSProperty::listValuedPropertySeparator(CSSPropertyID id)
{
    switch (id) {
    default:
        break;
    }
    return '\0';
}

bool CSSProperty::allowsNumberOrIntegerInput(CSSPropertyID id)
{
    switch (id) {
    case CSSPropertyID::CSSPropertyTestTopPriority:
    case CSSPropertyID::CSSPropertyTestHighPriority:
    case CSSPropertyID::CSSPropertyBackgroundFillLayerTestPrimary:
    case CSSPropertyID::CSSPropertyTestMediumPriority:
    case CSSPropertyID::CSSPropertyBackgroundFillLayerTestSecondary:
    case CSSPropertyID::CSSPropertyBackgroundFillLayerTestSecondaryWithConverter:
    case CSSPropertyID::CSSPropertyTestAnimationWrapper:
    case CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationAlways:
    case CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationThreadedOnly:
    case CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestBoundedRepetitionWithCommasSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithType:
    case CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeWithDefaultPrevious:
    case CSSPropertyID::CSSPropertyTestBoundedRepetitionWithSpacesWithTypeWithDefaultPreviousTwo:
    case CSSPropertyID::CSSPropertyTestCustomExtractor:
    case CSSPropertyID::CSSPropertyTestExtractorConverter:
    case CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndCustomType:
    case CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalAndPreserveOrderAndCustomType:
    case CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalWithPreserveOrder:
    case CSSPropertyID::CSSPropertyTestMatchAllAnyOrderWithOptionalWithPreserveOrderNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndCustomType:
    case CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalAndCustomTypeAndNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestMatchAllOrderedWithOptionalSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestMatchOne:
    case CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrder:
    case CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithCustomType:
    case CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithCustomTypeNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrder:
    case CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderAndCustomType:
    case CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderAndCustomTypeNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestMatchOneOrMoreAnyOrderWithPreserveOrderNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestMatchOneWithGroupWithSettingsFlag:
    case CSSPropertyID::CSSPropertyTestMatchOneWithKeywordWithSettingsFlag:
    case CSSPropertyID::CSSPropertyTestMatchOneWithMultipleKeywords:
    case CSSPropertyID::CSSPropertyTestMatchOneWithReferenceWithSettingsFlag:
    case CSSPropertyID::CSSPropertyTestNumericValueRange:
    case CSSPropertyID::CSSPropertyTestProperty:
    case CSSPropertyID::CSSPropertyTestSettingsOne:
    case CSSPropertyID::CSSPropertyTestSharedBuilderExtractorConverter:
    case CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMinNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithCommasWithMinSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesNoMin:
    case CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesNoMinNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMinNoSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestUnboundedRepetitionWithSpacesWithMinSingleItemOpt:
    case CSSPropertyID::CSSPropertyTestUsingSharedRule:
    case CSSPropertyID::CSSPropertyTestSinkPriority:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline:
        return true;
    default:
        return false;
    }
}

bool CSSProperty::disablesNativeAppearance(CSSPropertyID id)
{
    switch (id) {
        return true;
    default:
        return false;
    }
}

bool CSSProperty::isTestGroupProperty(CSSPropertyID id)
{
    switch (id) {
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical:
    case CSSPropertyID::CSSPropertyTestShorthandOne:
    case CSSPropertyID::CSSPropertyTestShorthandTwo:
        return true;
    default:
        return false;
    }
}

bool CSSProperty::isInLogicalPropertyGroup(CSSPropertyID id)
{
    switch (id) {
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical:
        return true;
    default:
        return false;
    }
}

bool CSSProperty::areInSameLogicalPropertyGroupWithDifferentMappingLogic(CSSPropertyID id1, CSSPropertyID id2)
{
    switch (id1) {
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline:
        switch (id2) {
        case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal:
        case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical:
            return true;
        default:
            return false;
        }
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical:
        switch (id2) {
        case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock:
        case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline:
            return true;
        default:
            return false;
        }
    default:
        return false;
    }
}

CSSPropertyID CSSProperty::resolveDirectionAwareProperty(CSSPropertyID id, WritingMode writingMode)
{
    switch (id) {
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock: {
        static constexpr CSSPropertyID properties[2] = { CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal, CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical };
        return properties[static_cast<size_t>(mapAxisLogicalToPhysical(writingMode, LogicalBoxAxis::Block))];
    }
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline: {
        static constexpr CSSPropertyID properties[2] = { CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal, CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical };
        return properties[static_cast<size_t>(mapAxisLogicalToPhysical(writingMode, LogicalBoxAxis::Inline))];
    }
    default:
        return id;
    }
}

CSSPropertyID CSSProperty::unresolvePhysicalProperty(CSSPropertyID id, WritingMode writingMode)
{
    switch (id) {
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal: {
        static constexpr CSSPropertyID properties[2] = { CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline, CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock };
        return properties[static_cast<size_t>(mapAxisPhysicalToLogical(writingMode, BoxAxis::Horizontal))];
    }
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical: {
        static constexpr CSSPropertyID properties[2] = { CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalInline, CSSPropertyID::CSSPropertyTestLogicalPropertyGroupLogicalBlock };
        return properties[static_cast<size_t>(mapAxisPhysicalToLogical(writingMode, BoxAxis::Vertical))];
    }
    default:
        return id;
    }
}

bool CSSProperty::isDescriptorOnly(CSSPropertyID id)
{
    switch (id) {
    case CSSPropertyID::CSSPropertyFirstTestDescriptorForFirstDescriptor:
    case CSSPropertyID::CSSPropertyFirstTestDescriptorForSecondDescriptor:
        return true;
    default:
        return false;
    }
}

bool CSSProperty::acceptsQuirkyColor(CSSPropertyID id)
{
    switch (id) {
        return true;
    default:
        return false;
    }
}

bool CSSProperty::acceptsQuirkyLength(CSSPropertyID id)
{
    switch (id) {
        return true;
    default:
        return false;
    }
}

bool CSSProperty::acceptsQuirkyAngle(CSSPropertyID id)
{
    switch (id) {
        return true;
    default:
        return false;
    }
}

bool CSSProperty::animationUsesNonAdditiveOrCumulativeInterpolation(CSSPropertyID id)
{
    switch (id) {
        return true;
    default:
        return false;
    }
}

bool CSSProperty::animationUsesNonNormalizedDiscreteInterpolation(CSSPropertyID id)
{
    switch (id) {
        return true;
    default:
        return false;
    }
}

bool CSSProperty::animationIsAccelerated(CSSPropertyID id, [[maybe_unused]] const Settings& settings)
{
    switch (id) {
    case CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationAlways:
        return true;
    default:
        return false;
    }
}

std::span<const CSSPropertyID> CSSProperty::allAcceleratedAnimationProperties([[maybe_unused]] const Settings& settings)
{
    static constexpr std::array propertiesExcludingThreadedOnly {
        CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationAlways,
    };
    return std::span<const CSSPropertyID> { propertiesExcludingThreadedOnly };
}

CSSPropertySettings::CSSPropertySettings(const Settings& settings)
    : cssDescriptorEnabled { settings.cssDescriptorEnabled() }
    , cssSettingsOneEnabled { settings.cssSettingsOneEnabled() }
    , cssSettingsShorthandEnabled { settings.cssSettingsShorthandEnabled() }
{
}

bool operator==(const CSSPropertySettings& a, const CSSPropertySettings& b)
{
    return a.cssDescriptorEnabled == b.cssDescriptorEnabled
        && a.cssSettingsOneEnabled == b.cssSettingsOneEnabled
        && a.cssSettingsShorthandEnabled == b.cssSettingsShorthandEnabled;
}

void add(Hasher& hasher, const CSSPropertySettings& settings)
{
    uint64_t bits = settings.cssDescriptorEnabled << 0
        | settings.cssSettingsOneEnabled << 1
        | settings.cssSettingsShorthandEnabled << 2;
    add(hasher, bits);
}


TextStream& operator<<(TextStream& stream, CSSPropertyID property)
{
    return stream << nameLiteral(property);
}

} // namespace WebCore

WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
IGNORE_WARNINGS_END