Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 07b1f5f81cef6ffba197c22cc94d52526da87709
      
https://github.com/WebKit/WebKit/commit/07b1f5f81cef6ffba197c22cc94d52526da87709
  Author: Amanda Falke <afa...@igalia.com>
  Date:   2023-05-25 (Thu, 25 May 2023)

  Changed paths:
    M LayoutTests/platform/glib/TestExpectations
    M 
LayoutTests/platform/glib/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt
    M 
LayoutTests/platform/glib/fast/text/unicode-variation-selector-expected.txt
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp

  Log Message:
  -----------
  Ignore bidi control characters while collecting fallback fonts
https://bugs.webkit.org/show_bug.cgi?id=257200

Reviewed by Myles C. Maxfield.

https://drafts.csswg.org/css-text-3/#white-space-processing
"Unsupported Default_ignorable characters must be ignored for text rendering."

Fixes test fast/text/fallback-font-and-zero-width-glyph.html; ignores
bidi control characters while collecting fallback fonts.

Per 245154@main, taking zero width glyphs (e.g. control chars) into
consideration while collecting fallback font information may result in
incorrect line height and baseline positioning; an alternative
mentioned there was to check against unicode ranges to omit
certain glyphs.

246121@main replaced our previous hardcoded list of Default_ignorable
characters with the helper 
function,FontCascade::isCharacterWhoseGlyphsShouldBeDeletedForTextRendering
(also refactored in 260081@main).

That helper function covers the use case 'rightToLeftOverride' which the
test `LayoutTests/fast/text/fallback-font-and-zero-width-glyph.html`
relies on. Test now passing.

* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::fallbackFontsForRunWithIterator):
Use FontCascade::isCharacterWhoseGlyphsShouldBeDeletedForTextRendering
to ignore default ignorable characters when collecting fallback fonts.

* LayoutTests/platform/glib/TestExpectations:
Update, as fast/text/fallback-font-and-zero-width-glyph.html now passing.

* 
LayoutTests/platform/glib/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
Update expectations for formatting characters; see ranges at 
https://www.compart.com/en/unicode/category/Cf.

* LayoutTests/platform/glib/fast/text/unicode-variation-selector-expected.txt:
Update expectations; Variation selectors default ignorable code points
were updated in 246121@main, see
'LayoutTests/imported/w3c/web-platform-tests/css/css-text/white-space/default-ignorable-complex.html`

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to