[webkit-changes] [WebKit/WebKit] 66230a: Fix *-baseline computation for {text-, }after-edge/...

Ahmad Saleem noreply at github.com
Wed Jan 11 09:58:54 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 66230a3a52c0df0f439fa5e0cbd299aadbc4ad70
      https://github.com/WebKit/WebKit/commit/66230a3a52c0df0f439fa5e0cbd299aadbc4ad70
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
    M LayoutTests/platform/glib/svg/custom/alignment-baseline-modes-expected.txt
    M LayoutTests/platform/glib/svg/custom/dominant-baseline-modes-expected.txt
    M LayoutTests/platform/ios/svg/custom/alignment-baseline-modes-expected.txt
    M LayoutTests/platform/ios/svg/custom/dominant-baseline-modes-expected.txt
    M LayoutTests/platform/mac/svg/custom/alignment-baseline-modes-expected.png
    M LayoutTests/platform/mac/svg/custom/alignment-baseline-modes-expected.txt
    M LayoutTests/platform/mac/svg/custom/dominant-baseline-modes-expected.png
    M LayoutTests/platform/mac/svg/custom/dominant-baseline-modes-expected.txt
    M LayoutTests/svg/custom/alignment-baseline-modes.svg
    M Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp

  Log Message:
  -----------
  Fix *-baseline computation for {text-,}after-edge/ideographic/baseline

Fix *-baseline computation for {text-,}after-edge/ideographic/baseline
https://bugs.webkit.org/show_bug.cgi?id=250297

Reviewed by Simon Fraser.

This patch is to align WebKit with Blink / Chromium and Gecko / Firefox.

Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=176877

Negative descents were assumed, although they are positive. Fix sign of
'descent' in the {text-,}after-edge and ideographic cases.
Also fix the obvious mistake in the 'baseline' case, where it ought to be
handled in a similar way as 'auto', and not just return the "computed"
alignment-baseline value.

* Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp:
(SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift):
(1) Add "Baseline" similar to "Auto" and update ASSERT
(2) Update "Baseline" case to match "Auto"
(3) Fix "sign" of "Ideographic"
* LayoutTests/svg/custom/alignment-baseline-modes.svg: Add Test Case
* LayoutTests/platform/glib/svg/custom/alignment-baseline-modes-expected.txt: Update Test Expectations
* LayoutTests/platform/glib/svg/custom/dominant-baseline-modes-expected.txt: Rebaselined
* LayoutTests/platform/ios/svg/custom/alignment-baseline-modes-expected.txt: Update Test Expectations
* LayoutTests/platform/ios/svg/custom/dominant-baseline-modes-expected.txt: Rebaselined
* LayoutTests/platform/mac/svg/custom/alignment-baseline-modes-expected.txt: Update Test Expectations
* LayoutTests/platform/mac/svg/custom/alignment-baseline-modes-expected.png: Update Test Expectations
* LayoutTests/platform/mac/svg/custom/dominant-baseline-modes-expected.txt: Rebaselined
* LayoutTests/platform/mac/svg/custom/dominant-baseline-modes-expected.png: Rebaselined

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




More information about the webkit-changes mailing list