[webkit-changes] [WebKit/WebKit] d88306: Incorrect tab stop if tab-size is a <length> and t...

Fujii Hironori noreply at github.com
Mon Jul 10 15:45:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d88306bc080b632ff421d82f64806ca1220fe9ab
      https://github.com/WebKit/WebKit/commit/d88306bc080b632ff421d82f64806ca1220fe9ab
  Author: Fujii Hironori <Hironori.Fujii at sony.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

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

  Log Message:
  -----------
  Incorrect tab stop if tab-size is a <length> and the distance to the next tab stop is less than 0.5ch
https://bugs.webkit.org/show_bug.cgi?id=258961

Reviewed by Myles C. Maxfield.

FontCascade::tabWidth returns the width between the current
position and the next tab stop. If it is less than 0.5ch, it
should return the width between the current position and the next
next tab stop.
<https://drafts.csswg.org/css-text-3/#white-space-phase-2>

The width of the next next tab stop is the sum of the width of
the next tab stop and the tab size. However, it just returned the
tab size in the case.

This change makes the following wpt tests pass.
  imported/w3c/web-platform-tests/css/css-text/tab-size/tab-min-rendered-width-1.html
  imported/w3c/web-platform-tests/css/css-text/white-space/tab-stop-threshold-004.html
  imported/w3c/web-platform-tests/css/css-text/white-space/tab-stop-threshold-002.html
  imported/w3c/web-platform-tests/css/css-text/white-space/tab-stop-threshold-006.html

* LayoutTests/TestExpectations:
* Source/WebCore/platform/graphics/FontCascade.h:
(WebCore::FontCascade::tabWidth const):

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




More information about the webkit-changes mailing list