Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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
- Loading branch information