[webkit-changes] [WebKit/WebKit] 1bd647: [CSS] Allow empty font-family name

Matthieu Dubet noreply at github.com
Wed Jul 12 11:56:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1bd647f19109a84e816403fa2ef37f49a3b77f0e
      https://github.com/WebKit/WebKit/commit/1bd647f19109a84e816403fa2ef37f49a3b77f0e
  Author: Matthieu Dubet <m_dubet at apple.com>
  Date:   2023-07-12 (Wed, 12 Jul 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/fast/text/font-face-empty-string-expected.txt
    M LayoutTests/fast/text/font-face-empty-string.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-non-ident-font-family-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-non-ident-font-family-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-non-ident-font-family.html
    M Source/WebCore/css/CSSFontFaceSet.cpp
    M Source/WebCore/css/CSSFontSelector.cpp
    M Source/WebCore/css/FontFace.cpp
    M Source/WebCore/css/parser/CSSParserImpl.cpp
    M Source/WebCore/platform/graphics/FontCascadeFonts.cpp
    M Source/WebCore/style/StyleBuilderCustom.h

  Log Message:
  -----------
  [CSS] Allow empty font-family name
https://bugs.webkit.org/show_bug.cgi?id=257092
rdar://109613703

Reviewed by Tim Nguyen.

We allow the empty string to be used as a font-family name per spec.
This also fixes a bug with non-ident family name (such as "foo bar").

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-non-ident-font-family-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-non-ident-font-family-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/font-palette-non-ident-font-family.html: Added.
* Source/WebCore/css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::addToFacesLookupTable):
(WebCore::CSSFontFaceSet::removeFromFacesLookupTable):
(WebCore::CSSFontFaceSet::matchingFacesExcludingPreinstalledFonts):
* Source/WebCore/css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontPaletteValuesRule):
(WebCore::CSSFontSelector::lookupFontPaletteValues):
(WebCore::CSSFontSelector::fontRangesForFamily):
* Source/WebCore/css/FontFace.cpp:
(WebCore::FontFace::setFamily):
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeFontPaletteValuesRule):
* Source/WebCore/platform/graphics/FontCascadeFonts.cpp:
(WebCore::realizeNextFallback):
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueFontFamily):

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




More information about the webkit-changes mailing list