Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b41ac703ca9b5f49427371523aedbaa2cc42a983
      
https://github.com/WebKit/WebKit/commit/b41ac703ca9b5f49427371523aedbaa2cc42a983
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-06-04 (Thu, 04 Jun 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/idlharness-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSFontFeatureValuesRule-expected.txt
    M Source/WebCore/css/CSSFontFeatureValuesRule.cpp
    M Source/WebCore/css/CSSFontFeatureValuesRule.h
    M Source/WebCore/css/CSSFontFeatureValuesRule.idl
    M Source/WebCore/css/StyleRule.h

  Log Message:
  -----------
  CSSFontFeatureValuesRule.fontFamily should be settable, not readonly
https://bugs.webkit.org/show_bug.cgi?id=315911
rdar://178323504

Reviewed by Antti Koivisto.

The CSS Fonts specification [1] defines `fontFamily` on CSSFontFeatureValuesRule
as a writable attribute (`attribute CSSOMString fontFamily;`), but WebKit
exposed it as `readonly`, so assigning to it was silently ignored.

Make the attribute settable. The setter parses the assigned string as a
`<family-name>#` list using the same parser the rule uses at parse time
(consumeFontFeatureValuesPreludeFamilyNameList), and on success replaces the
rule's families inside a RuleMutationScope so the change is properly
invalidated. Invalid input (an empty list or trailing tokens) is ignored,
matching other CSSOM setters such as CSSCounterStyleRule::setName.

[1] https://drafts.csswg.org/css-fonts/#cssfontfeaturevaluesrule

* Source/WebCore/css/CSSFontFeatureValuesRule.idl:
Drop `readonly` from the fontFamily attribute.

* Source/WebCore/css/CSSFontFeatureValuesRule.h:
* Source/WebCore/css/CSSFontFeatureValuesRule.cpp:
(WebCore::CSSFontFeatureValuesRule::setFontFamily): Added.

* Source/WebCore/css/StyleRule.h:
(WebCore::StyleRuleFontFeatureValues::setFontFamilies): Added

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/idlharness-expected.txt:
 Progression
* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom/CSSFontFeatureValuesRule-expected.txt:
 Ditto

Canonical link: https://commits.webkit.org/314602@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to