[webkit-changes] [WebKit/WebKit] 49f518: [CSS Fonts] The `from-font` value for CSS `font-si...

ChangSeok Oh noreply at github.com
Wed Sep 27 17:28:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 49f5188b5e8285f7c3b97cd7161b517ff0bd2886
      https://github.com/WebKit/WebKit/commit/49f5188b5e8285f7c3b97cd7161b517ff0bd2886
  Author: ChangSeok Oh <changseok at webkit.org>
  Date:   2023-09-27 (Wed, 27 Sep 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/platform/graphics/FontCascadeCache.h
    M Source/WebCore/platform/graphics/FontCascadeFonts.cpp
    M Source/WebCore/platform/graphics/FontSizeAdjust.h
    M Source/WebCore/style/StyleBuilderConverter.h
    M Source/WebCore/style/StyleFontSizeFunctions.cpp
    M Source/WebCore/style/StyleFontSizeFunctions.h

  Log Message:
  -----------
  [CSS Fonts] The `from-font` value for CSS `font-size-adjust` is not computed correctly
https://bugs.webkit.org/show_bug.cgi?id=259551

Reviewed by Myles C. Maxfield.

When resolving styles, we used the parent-style font to compute the aspect ratio
for font-size-adjust: from-font because the first available font could not be
determined at that moment. Unfortunately, this causes the failure of
font-size-adjust-014.html. To make the test happy, we should defer resolving
the aspect value after determining a primary font. Also, FontDescriptionKey
should consider if the font-size-adjust has from-font, not simply checking if
it has a valid value when looking up a proper FontCascadeFonts.

* LayoutTests/TestExpectations:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::fontSizeAdjustFromStyle):
* Source/WebCore/platform/graphics/FontCascadeCache.h:
(WebCore::FontDescriptionKey::FontDescriptionKey):
* Source/WebCore/platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::glyphDataForCharacter):
* Source/WebCore/platform/graphics/FontSizeAdjust.h:
(WebCore::FontSizeAdjust::operator bool const):
(WebCore::FontSizeAdjust::resolve const):
(WebCore::add):
(WebCore::operator<<):
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertFontSizeAdjust):
* Source/WebCore/style/StyleFontSizeFunctions.cpp:
(WebCore::Style::aspectValueOfPrimaryFont): Deleted.
* Source/WebCore/style/StyleFontSizeFunctions.h:

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




More information about the webkit-changes mailing list