Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[@Property] Support <time> and <dimension> syntax
https://bugs.webkit.org/show_bug.cgi?id=249096 rdar://103229229 Reviewed by Alan Baradlay. This patch also adds support for calc() in for dimension values. It was missing. * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-computation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-initial-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/typedom-expected.txt: * Source/WebCore/css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::primitiveType const): * Source/WebCore/css/calc/CSSCalcCategoryMapping.cpp: (WebCore::calcUnitCategory): (WebCore::calculationCategoryForCombination): (WebCore::canonicalUnitTypeForCalculationCategory): * Source/WebCore/css/calc/CSSCalcOperationNode.cpp: (WebCore::resolvedTypeForMinOrMaxOrClamp): (WebCore::sortingCategoryForType): (WebCore::CSSCalcOperationNode::primitiveType const): * Source/WebCore/css/calc/CSSCalcPrimitiveValueNode.cpp: (WebCore::CSSCalcPrimitiveValueNode::createCalcExpression const): (WebCore::CSSCalcPrimitiveValueNode::computeLengthPx const): * Source/WebCore/css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::parseCustomPropertyValueWithSyntaxDefinition): (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue): * Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp: (WebCore::CSSPropertyParserHelpers::ResolutionCSSPrimitiveValueWithCalcWithKnownTokenTypeFunctionConsumer::consume): (WebCore::CSSPropertyParserHelpers::ResolutionCSSPrimitiveValueWithKnownTokenTypeDimensionConsumer::consume): Deleted. * Source/WebCore/css/parser/CSSPropertySyntax.cpp: (WebCore::CSSPropertySyntax::parseComponent): * Source/WebCore/css/parser/CSSPropertySyntax.h: * Source/WebCore/platform/calc/CalculationCategory.cpp: (WebCore::operator<<): * Source/WebCore/platform/calc/CalculationCategory.h: Canonical link: https://commits.webkit.org/257706@main
- Loading branch information
Showing
14 changed files
with
96 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -39,6 +39,8 @@ class CSSPropertySyntax { | ||
Integer, | ||
Number, | ||
Angle, | ||
Time, | ||
Resolution, | ||
Color, | ||
Image, | ||
URL, | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -39,6 +39,7 @@ enum class CalculationCategory : uint8_t { | ||
Angle, | ||
Time, | ||
Frequency, | ||
Resolution, | ||
Other | ||
}; | ||
|
||