Skip to content
Permalink
Browse files
Parsing for at-rule @font-feature-values
https://bugs.webkit.org/show_bug.cgi?id=246120
rdar://100830599

Reviewed by Myles C. Maxfield and Patrick Angle.

This implementation defines the @font-feature-values at-rule
and the six children font variation at-rules (@styleSet, @Stylistic, @character-variant,
@Swash, @ornaments, @annotation), but those children at-rules are not exposed in CSSOM.

https://www.w3.org/TR/css-fonts-4/#font-feature-values-syntax

* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/test_font_feature_values_parsing-expected.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
* Source/WebCore/css/CSSFontFeatureValuesRule.cpp: Added.
(WebCore::CSSFontFeatureValuesRule::CSSFontFeatureValuesRule):
(WebCore::CSSFontFeatureValuesRule::cssText const):
(WebCore::CSSFontFeatureValuesRule::reattach):
(WebCore::CSSFontFeatureValuesBlockRule::CSSFontFeatureValuesBlockRule):
(WebCore::CSSFontFeatureValuesBlockRule::cssText const):
(WebCore::CSSFontFeatureValuesBlockRule::reattach):
* Source/WebCore/css/CSSFontFeatureValuesRule.h: Added.
* Source/WebCore/css/CSSFontFeatureValuesRule.idl: Added.
* Source/WebCore/css/StyleRule.cpp:
(WebCore::StyleRuleBase::visitDerived):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
(WebCore::StyleRuleFontFeatureValues::StyleRuleFontFeatureValues):
(WebCore::StyleRuleFontFeatureValuesBlock::StyleRuleFontFeatureValuesBlock):
(WebCore::StyleRuleFontFeatureValues::create):
* Source/WebCore/css/StyleRule.h:
(WebCore::StyleRuleBase::isFontFeatureValuesRule const):
(WebCore::StyleRuleBase::isFontFeatureValuesBlockRule const):
(isType):
* Source/WebCore/css/StyleRuleType.h:
* Source/WebCore/css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::traverseSubresources const):
* Source/WebCore/css/parser/CSSAtRuleID.cpp:
(WebCore::cssAtRuleID):
* Source/WebCore/css/parser/CSSAtRuleID.h:
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::computeNewAllowedRules):
(WebCore::CSSParserImpl::consumeRuleList):
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeQualifiedRule):
(WebCore::fontFeatureValuesTypeMappings):
(WebCore::CSSParserImpl::consumeFontFeatureValuesRuleBlock):
(WebCore::CSSParserImpl::consumeFontFeatureValuesRule):
* Source/WebCore/css/parser/CSSParserImpl.h:
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeFamilyNameList):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.h:
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(flattenSourceData):

Canonical link: https://commits.webkit.org/255677@main
  • Loading branch information
mdubet authored and nt1m committed Oct 18, 2022
1 parent ca1c4d4 commit 4303ed343b77ef5e1fa84de8de8dbd0000cd79f1
Show file tree
Hide file tree
Showing 23 changed files with 903 additions and 128 deletions.
@@ -14,19 +14,19 @@ PASS CSSFontFaceRule must be primary interface of cssFontFaceRule
PASS Stringification of cssFontFaceRule
PASS CSSFontFaceRule interface: cssFontFaceRule must inherit property "style" with the proper type
FAIL CSSRule interface: cssFontFaceRule must inherit property "FONT_FEATURE_VALUES_RULE" with the proper type assert_inherits: property "FONT_FEATURE_VALUES_RULE" not found in prototype chain
FAIL CSSFontFeatureValuesRule interface: existence and properties of interface object assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface object length assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface object name assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface: existence and properties of interface prototype object assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface: attribute fontFamily assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface: attribute annotation assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface: attribute ornaments assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface: attribute stylistic assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface: attribute swash assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface: attribute characterVariant assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
FAIL CSSFontFeatureValuesRule interface: attribute styleset assert_own_property: self does not have own property "CSSFontFeatureValuesRule" expected property "CSSFontFeatureValuesRule" missing
PASS CSSFontFeatureValuesRule interface: existence and properties of interface object
PASS CSSFontFeatureValuesRule interface object length
PASS CSSFontFeatureValuesRule interface object name
PASS CSSFontFeatureValuesRule interface: existence and properties of interface prototype object
PASS CSSFontFeatureValuesRule interface: existence and properties of interface prototype object's "constructor" property
PASS CSSFontFeatureValuesRule interface: existence and properties of interface prototype object's @@unscopables property
FAIL CSSFontFeatureValuesRule interface: attribute fontFamily assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected "function" but got "undefined"
FAIL CSSFontFeatureValuesRule interface: attribute annotation assert_true: The prototype object must have a property "annotation" expected true got false
FAIL CSSFontFeatureValuesRule interface: attribute ornaments assert_true: The prototype object must have a property "ornaments" expected true got false
FAIL CSSFontFeatureValuesRule interface: attribute stylistic assert_true: The prototype object must have a property "stylistic" expected true got false
FAIL CSSFontFeatureValuesRule interface: attribute swash assert_true: The prototype object must have a property "swash" expected true got false
FAIL CSSFontFeatureValuesRule interface: attribute characterVariant assert_true: The prototype object must have a property "characterVariant" expected true got false
FAIL CSSFontFeatureValuesRule interface: attribute styleset assert_true: The prototype object must have a property "styleset" expected true got false
FAIL CSSFontFeatureValuesMap interface: existence and properties of interface object assert_own_property: self does not have own property "CSSFontFeatureValuesMap" expected property "CSSFontFeatureValuesMap" missing
FAIL CSSFontFeatureValuesMap interface object length assert_own_property: self does not have own property "CSSFontFeatureValuesMap" expected property "CSSFontFeatureValuesMap" missing
FAIL CSSFontFeatureValuesMap interface object name assert_own_property: self does not have own property "CSSFontFeatureValuesMap" expected property "CSSFontFeatureValuesMap" missing

0 comments on commit 4303ed3

Please sign in to comment.