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
|