[webkit-changes] [WebKit/WebKit] c70366: Incorrect 'ch' unit value in vertical-rl/lr when t...

Alan Baradlay noreply at github.com
Sat Dec 30 11:45:58 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c703662a90c4e4c77a0b77be66ec82405f21d6bc
      https://github.com/WebKit/WebKit/commit/c703662a90c4e4c77a0b77be66ec82405f21d6bc
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-12-30 (Sat, 30 Dec 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/css/CSSPrimitiveValue.cpp
    M Source/WebCore/platform/graphics/FontCascade.cpp
    M Source/WebCore/platform/graphics/FontCascade.h

  Log Message:
  -----------
  Incorrect 'ch' unit value in vertical-rl/lr when text-orientation is not upright
https://bugs.webkit.org/show_bug.cgi?id=266937

Reviewed by Antti Koivisto.

In case of vertical writing mode the primary font has the orientation value of 'vertical'.
It ensures we get CJK rendering right in addition to other font dependent attributes like ideographic baseline.
However when we render/measure non-CJK glyphs (non-upright mode), a horizontal font variant is used.
This variant should also be used as the base for the 'ch' unit. It essentially means the we use the actual advance width
as opposed to the 'height' of the '0' character.

* LayoutTests/TestExpectations:
* Source/WebCore/css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeUnzoomedNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::equalForLengthResolution):
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::zeroWidth const):
* Source/WebCore/platform/graphics/FontCascade.h:

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




More information about the webkit-changes mailing list