Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3baa72dbb8d513476b27bcfae8d2dd02c6514541
https://github.com/WebKit/WebKit/commit/3baa72dbb8d513476b27bcfae8d2dd02c6514541
Author: Fujii Hironori <[email protected]>
Date: 2024-04-16 (Tue, 16 Apr 2024)
Changed paths:
A LayoutTests/fast/text/control-characters/complex-1-expected.txt
A LayoutTests/fast/text/control-characters/complex-1.html
M Source/WebCore/platform/graphics/FontCascade.h
M Source/WebCore/platform/graphics/WidthIterator.cpp
Log Message:
-----------
ComplexTextController: Control characters should be rendered as visible glyphs
https://bugs.webkit.org/show_bug.cgi?id=271869
Reviewed by Vitor Roriz.
Control characters weren't rendered as visible glyphs in the complex
text code path in some condition.
The spec <https://www.w3.org/TR/css-text-3/#white-space-processing> says:
> Control characters (Unicode category Cc)—other than tabs (U+0009),
> line feeds (U+000A), carriage returns (U+000D) and sequences that form
> a segment break—must be rendered as a visible glyph
https://webkit.org/b/149128 fixed the simple text code path.
https://webkit.org/b/153941 fixed a part of the complex text code
path. We need one more fix.
ComplexTextController constructor is using
FontCascade::isCharacterWhoseGlyphsShouldBeDeletedForTextRendering to
determine a character is visible. It returned false for control
characters.
Changed isCharacterWhoseGlyphsShouldBeDeletedForTextRendering to
return false for control characters other than tabs, line feeds, and
carriage returns.
WidthIterator::applyCSSVisibilityRules is also using
isCharacterWhoseGlyphsShouldBeDeletedForTextRendering. Changed it to
keep the original behavior.
* LayoutTests/fast/text/control-characters/complex-1-expected.txt: Added.
* LayoutTests/fast/text/control-characters/complex-1.html: Added.
* Source/WebCore/platform/graphics/FontCascade.h:
(WebCore::FontCascade::isCharacterWhoseGlyphsShouldBeDeletedForTextRendering):
* Source/WebCore/platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyCSSVisibilityRules):
Canonical link: https://commits.webkit.org/277574@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes