Remove separate classes for CSS wide keywords (initial/inherit/unset/revert)
https://bugs.webkit.org/show_bug.cgi?id=232750
Reviewed by Sam Weinig.
Remove CSSInitialValue, CSSInheritedValue, CSSRevertValue and CSSUnsetValue classes.
They can all be handled by CSSPrimitiveValue.
- Sources.txt:
- WebCore.xcodeproj/project.pbxproj:
- bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
(WebCore::toJSNewlyCreated):
Avoid changing the class type visible in CSSOM.
- css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationStyleFlagsToCSSValue):
(WebCore::renderTextDecorationSkipToCSSValue):
- css/CSSInheritedValue.cpp: Removed.
- css/CSSInheritedValue.h: Removed.
- css/CSSInitialValue.cpp: Removed.
- css/CSSInitialValue.h: Removed.
- css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::isCSSWideKeyword const):
- css/CSSPrimitiveValue.h:
- css/CSSRevertValue.cpp: Removed.
- css/CSSRevertValue.h: Removed.
- css/CSSUnsetValue.cpp: Removed.
- css/CSSUnsetValue.h: Removed.
- css/CSSValue.cpp:
(WebCore::CSSValue::cssValueType const):
(WebCore::CSSValue::equals const):
(WebCore::CSSValue::cssText const):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::treatAsInheritedValue const):
(WebCore::CSSValue::treatAsInitialValue const):
(WebCore::CSSValue::isInitialValue const):
(WebCore::CSSValue::isImplicitInitialValue const):
(WebCore::CSSValue::isInheritValue const):
(WebCore::CSSValue::isUnsetValue const):
(WebCore::CSSValue::isRevertValue const):
(WebCore::CSSValue::isCSSWideKeyword const):
(WebCore::CSSValue::CSSValue):
(WebCore::CSSValue::isInheritedValue const): Deleted.
(WebCore::CSSValue::isInitialValue const): Deleted.
(WebCore::CSSValue::isUnsetValue const): Deleted.
(WebCore::CSSValue::isRevertValue const): Deleted.
(WebCore::CSSValue::isGlobalKeyword const): Deleted.
(WebCore::StaticCSSValuePool::StaticCSSValuePool):
(WebCore::CSSValuePool::createImplicitInitialValue):
(WebCore::CSSValuePool::createInheritedValue): Deleted.
(WebCore::CSSValuePool::createExplicitInitialValue): Deleted.
(WebCore::CSSValuePool::createUnsetValue): Deleted.
(WebCore::CSSValuePool::createRevertValue): Deleted.
- css/DeprecatedCSSOMPrimitiveValue.h:
(WebCore::DeprecatedCSSOMPrimitiveValue::isCSSWideKeyword const):
- css/SelectorChecker.cpp:
- css/StyleProperties.cpp:
(WebCore::StyleProperties::borderRadiusValue const):
(WebCore::StyleProperties::pageBreakPropertyValue const):
- css/parser/CSSParserFastPaths.cpp:
(WebCore::parseKeywordValue):
- css/parser/CSSParserIdioms.h:
(WebCore::isCSSWideKeyword):
(WebCore::isValidCustomIdentifier):
Separate the concept of valid custom identifier from that of CSS-wide keyword. The former also excludes the obsolete "default" keyword.
- css/parser/CSSPropertyParser.cpp:
(WebCore::maybeConsumeCSSWideKeyword):
- css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
(WebCore::CSSPropertyParserHelpers::consumeCounterStyleNameInPrelude):
(WebCore::CSSPropertyParserHelpers::concatenateFamilyName):
(WebCore::CSSPropertyParserHelpers::isCSSWideKeyword): Deleted.
- editing/EditingStyle.cpp:
(WebCore::fontWeightIsBold):
- editing/cocoa/HTMLConverter.mm:
(HTMLConverterCaches::propertyValueForNode):
(HTMLConverterCaches::floatPropertyValueForNode):
(HTMLConverterCaches::colorPropertyValueForNode):
- html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::createSharedCellStyle const):
- style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::addMatchedProperties):
- style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::addMatch):
(WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode const):
(WebCore::Style::Builder::applyProperty):
(WebCore::Style::Builder::resolveValue):
- svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::parseAttribute):