[webkit-changes] [WebKit/WebKit] 3b04a5: text-emphasis marks should not be rendered if ther...

Vitor Roriz noreply at github.com
Fri Apr 14 17:30:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3b04a522163d5f16917facb89c73d5686d3de884
      https://github.com/WebKit/WebKit/commit/3b04a522163d5f16917facb89c73d5686d3de884
  Author: Vitor Roriz <vitor.roriz at apple.com>
  Date:   2023-04-14 (Fri, 14 Apr 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/platform/graphics/ComplexTextController.cpp
    M Source/WebCore/platform/graphics/FontCascade.cpp
    M Source/WebCore/platform/graphics/GlyphBuffer.h
    M Source/WebCore/platform/graphics/WidthIterator.cpp
    M Source/WebCore/platform/graphics/coretext/GlyphPageCoreText.cpp

  Log Message:
  -----------
  text-emphasis marks should not be rendered if there is no emphasized character
https://bugs.webkit.org/show_bug.cgi?id=251201
rdar://problem/104688963

Reviewed by Myles C. Maxfield.

There were 2 different reasons for failing these tests:
1. When drawing emphasis mark (drawEmphasisMarks())
we weren't skipping the glyphs that were replaced
by the deleted glyph (0xFFFF).

2. When iterating through the characters to be drawn with
the text iterators, we weren't converting characters encoded
as surrogated pairs (UTF16). When one of these characters
would show up, we would pass them to canReceiveTextEmphasis(),
implicitly converting the UChar word to a UChar32 word,
without properly converting the surrogated pairs.

* LayoutTests/TestExpectations:
* Source/WebCore/platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::drawEmphasisMarks const):
* Source/WebCore/platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::makeGlyphInvisible):
* Source/WebCore/platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::applyCSSVisibilityRules):
* Source/WebCore/platform/graphics/coretext/GlyphPageCoreText.cpp:

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




More information about the webkit-changes mailing list