Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff8fd01e634aff2e9a52c7b8a280f4f74cf60df4
      
https://github.com/WebKit/WebKit/commit/ff8fd01e634aff2e9a52c7b8a280f4f74cf60df4
  Author: Diego Pino Garcia <[email protected]>
  Date:   2026-08-28 (Fri, 28 Aug 2026)

  Changed paths:
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/platform/graphics/Font.cpp

  Log Message:
  -----------
  [GLIB] imported/w3c/web-platform-tests/css/css-values/ch-unit-017.html is 
failing
https://bugs.webkit.org/show_bug.cgi?id=206001

Reviewed by Carlos Garcia Campos.

The test fails because two divs of expected same size are actually
different. One of the divs uses 'writing-mode: vertical-rl' with a
custom 'OpenType @font-face' and 'width: 5ch'. This information is
relevant because GLIB ports always build with OPENTYPE_VERTICAL enabled.

A Font's constructor calls 'platformGlyphInit', which computes the
font's zero-glyph width (used to resolve the CSS 'ch' unit) via
'FontInlines::widthForGlyph'. That method decides between the glyph's
horizontal and vertical advance based on whether 'm_verticalData' is
set, but at that point in construction it isn't set yet (it's only
initialized further down in the constructor), so the width is always
computed as horizontal, even for a genuinely vertical font.

Simply moving initialization of 'm_verticalData' earlier doesn't work,
as it creates side effects in a few tests that are legitimately passing
(e.g fast/writing-mode/text-orientation-basic.html). Instead, this change
leaves 'm_verticalData' initialization where it is and performs an
independent 'OpenTypeVerticalData' lookup inside 'platformGlyphInit', with
the goal of computing 'zero-glyph''s width correctly.

As a result of this change, a few 'ch-units-vrl-XXX' tests which were wrongly
passing before are now failing.

* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/platform/graphics/Font.cpp:
(WebCore::m_shouldNotBeUsedForArabic):
(WebCore::Font::platformGlyphInit):

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



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

Reply via email to