File: CSSPropertyInitialValuesGeneratedInlines.h

package info (click to toggle)
webkit2gtk 2.51.4-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 481,584 kB
  • sloc: cpp: 3,903,132; javascript: 198,251; ansic: 165,758; python: 51,432; asm: 21,819; ruby: 18,095; perl: 16,963; xml: 4,623; sh: 2,408; yacc: 2,356; java: 2,019; lex: 1,358; pascal: 372; makefile: 203
file content (71 lines) | stat: -rw-r--r-- 3,420 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
// This file is automatically generated from CSSProperties.json by the process-css-properties.py script. Do not edit it.

#pragma once

#include "CSSPropertyNames.h"
#include "CSSUnits.h"
#include "CSSValueKeywords.h"
#include <wtf/Variant.h>

namespace WebCore {

struct InitialNumericValue {
    double number;
    CSSUnitType type { CSSUnitType::CSS_NUMBER };
};

using InitialValue = Variant<CSSValueID, InitialNumericValue>;

static constexpr InitialValue initialValueForLonghand(CSSPropertyID longhand)
{
    switch (longhand) {
    case CSSPropertyID::CSSPropertyBackgroundCoordinatedValueListPropertyTestDiscrete:
    case CSSPropertyID::CSSPropertyBackgroundCoordinatedValueListPropertyTestTwo:
    case CSSPropertyID::CSSPropertyTestAnimationWrapper:
    case CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationAlways:
    case CSSPropertyID::CSSPropertyTestAnimationWrapperAccelerationThreadedOnly:
    case CSSPropertyID::CSSPropertyTestCustomExtractor:
    case CSSPropertyID::CSSPropertyTestHighPriority:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalHorizontal:
    case CSSPropertyID::CSSPropertyTestLogicalPropertyGroupPhysicalVertical:
    case CSSPropertyID::CSSPropertyTestMatchOne:
    case CSSPropertyID::CSSPropertyTestMatchOneWithGroupWithSettingsFlag:
    case CSSPropertyID::CSSPropertyTestMatchOneWithKeywordWithSettingsFlag:
    case CSSPropertyID::CSSPropertyTestMatchOneWithMultipleKeywords:
    case CSSPropertyID::CSSPropertyTestMatchOneWithReferenceWithSettingsFlag:
    case CSSPropertyID::CSSPropertyTestMediumPriority:
    case CSSPropertyID::CSSPropertyTestNumericValueRange:
    case CSSPropertyID::CSSPropertyTestProperty:
    case CSSPropertyID::CSSPropertyTestRenderStyleStorageOneLevelReference:
    case CSSPropertyID::CSSPropertyTestRenderStyleStorageOneLevelValue:
    case CSSPropertyID::CSSPropertyTestRenderStyleStorageTwoLevelReference:
    case CSSPropertyID::CSSPropertyTestRenderStyleStorageTwoLevelValue:
    case CSSPropertyID::CSSPropertyTestSettingsOne:
    case CSSPropertyID::CSSPropertyTestSinkPriority:
    case CSSPropertyID::CSSPropertyTestTopPriority:
    case CSSPropertyID::CSSPropertyTestUsingSharedRule:
    case CSSPropertyID::CSSPropertyTestUsingSharedRuleExported:
    case CSSPropertyID::CSSPropertyTestUsingSharedRuleWithOverrideFunction:
        return InitialNumericValue { 0, CSSUnitType::CSS_NUMBER };
    case CSSPropertyID::CSSPropertyTestColor:
    case CSSPropertyID::CSSPropertyTestColorAllowsTypesAbsolute:
    case CSSPropertyID::CSSPropertyTestColorPropertyWithNoVisitedLinkSupport:
    case CSSPropertyID::CSSPropertyTestColorPropertyWithVisitedLinkSupport:
        return CSSValueCurrentColor;
    case CSSPropertyID::CSSPropertyTestKeyword:
    case CSSPropertyID::CSSPropertyTestKeywordWithAliasedTo:
    case CSSPropertyID::CSSPropertyTestRenderStyleStorageOneLevelEnum:
    case CSSPropertyID::CSSPropertyTestRenderStyleStorageOneLevelRaw:
    case CSSPropertyID::CSSPropertyTestRenderStyleStorageTwoLevelEnum:
    case CSSPropertyID::CSSPropertyTestRenderStyleStorageTwoLevelRaw:
        return CSSValueFoo;
    case CSSPropertyID::CSSPropertyTestMatchOneWithSettingsFlag:
    case CSSPropertyID::CSSPropertyTestUrlWithModifiers:
    case CSSPropertyID::CSSPropertyTestUrlWithNoModifiers:
        return CSSValueNone;
    default:
        RELEASE_ASSERT_NOT_REACHED();
    }
}
} // namespace WebCore