[webkit-changes] [WebKit/WebKit] d516ad: Cherry-pick 262061 at main (9bd41e74f05f). https://bu...

ChangSeok Oh noreply at github.com
Sat Mar 25 13:06:06 PDT 2023


  Branch: refs/heads/webkitglib/2.40
  Home:   https://github.com/WebKit/WebKit
  Commit: d516adb9242e81f3770342096c00d44d2a08e409
      https://github.com/WebKit/WebKit/commit/d516adb9242e81f3770342096c00d44d2a08e409
  Author: ChangSeok Oh <changseok at webkit.org>
  Date:   2023-03-24 (Fri, 24 Mar 2023)

  Changed paths:
    M LayoutTests/platform/gtk/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.png
    M LayoutTests/platform/gtk/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt
    M LayoutTests/platform/wpe/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt
    M Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp

  Log Message:
  -----------
  Cherry-pick 262061 at main (9bd41e74f05f). https://bugs.webkit.org/show_bug.cgi?id=254145

    [GTK] font-size-adjust does not work for non-Ahem fonts
    https://bugs.webkit.org/show_bug.cgi?id=254145

    Reviewed by Carlos Garcia Campos.

    The GTK port does not properly handle the font-size-adjust CSS property.
    This is because xHeight is not retrieved with FreeType in Font::platformInit()
    at SimpleFontDataFreeType.cpp. We attempt to get the xHeight from FreeType first,
    then do the same from Cairo. If we get 0 of xHeight in the first trial and
    set it to `std::optional<float> xHeight`, the second trial never happens
    as `if (!xHeight)` does not hit. That condition just checks if xHeight has
    a value or not. Our intention is to retry to get xHeight by an alternative way
    (i.e., Cairo) where the xHeight is not normal (i.e., 0). To fix this, we test
    if xHeight has a value and that is a non-zero value for the second trial.
    Otherwise, we get the xHeight from Cairo.

    The following results are updated since the xHeight value was not reflected.

    * LayoutTests/platform/gtk/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.png:
    * LayoutTests/platform/gtk/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt:
    * LayoutTests/platform/wpe/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt:
    * Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp:
    (WebCore::Font::platformInit):

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




More information about the webkit-changes mailing list