[webkit-changes] [WebKit/WebKit] 8434df: Implementing drawPath delegate for DrawGlyphsRecorder

Vitor Roriz noreply at github.com
Fri Nov 3 04:05:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8434dfba0479e828260c310732d53334beab4d69
      https://github.com/WebKit/WebKit/commit/8434dfba0479e828260c310732d53334beab4d69
  Author: Vitor Roriz <vitor.roriz at apple.com>
  Date:   2023-11-03 (Fri, 03 Nov 2023)

  Changed paths:
    R LayoutTests/fast/text/canvas-color-fonts/linedash-COLR-expected-mismatch.html
    A LayoutTests/fast/text/canvas-color-fonts/linedash-COLR-expected.html
    M LayoutTests/fast/text/canvas-color-fonts/stroke-color-COLR-expected.html
    M LayoutTests/fast/text/canvas-color-fonts/stroke-color-shadow-COLR-expected.html
    M LayoutTests/fast/text/canvas-color-fonts/stroke-color-shadow-ctm-COLR-expected.html
    M LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html
    M LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR.html
    M LayoutTests/fast/text/glyph-display-lists/glyph-display-list-colr-unshared.html
    A LayoutTests/platform/gtk/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html
    A LayoutTests/platform/gtk/fast/text/resources/Ahem-COLR.ttf
    M LayoutTests/platform/ios-wk2/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    A LayoutTests/platform/mac-monterey/fast/text/canvas-color-fonts/linedash-COLR-expected-mismatch.html
    A LayoutTests/platform/mac-monterey/fast/text/canvas-color-fonts/stroke-color-COLR-expected.html
    A LayoutTests/platform/mac-monterey/fast/text/canvas-color-fonts/stroke-color-shadow-COLR-expected.html
    A LayoutTests/platform/mac-monterey/fast/text/canvas-color-fonts/stroke-color-shadow-ctm-COLR-expected.html
    A LayoutTests/platform/mac-monterey/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html
    A LayoutTests/platform/mac-monterey/fast/text/resources/Ahem-COLR.ttf
    A LayoutTests/platform/mac-ventura/fast/text/canvas-color-fonts/linedash-COLR-expected-mismatch.html
    A LayoutTests/platform/mac-ventura/fast/text/canvas-color-fonts/stroke-color-COLR-expected.html
    A LayoutTests/platform/mac-ventura/fast/text/canvas-color-fonts/stroke-color-shadow-COLR-expected.html
    A LayoutTests/platform/mac-ventura/fast/text/canvas-color-fonts/stroke-color-shadow-ctm-COLR-expected.html
    A LayoutTests/platform/mac-ventura/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html
    A LayoutTests/platform/mac-ventura/fast/text/resources/Ahem-COLR.ttf
    M LayoutTests/platform/mac-wk2/TestExpectations
    M LayoutTests/platform/mac/TestExpectations
    A LayoutTests/platform/wpe/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html
    A LayoutTests/platform/wpe/fast/text/resources/Ahem-COLR.ttf
    M Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h
    M Source/WebCore/platform/graphics/DrawGlyphsRecorder.h
    M Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp

  Log Message:
  -----------
  Implementing drawPath delegate for DrawGlyphsRecorder
https://bugs.webkit.org/show_bug.cgi?id=262223
rdar://115721319

Reviewed by Said Abou-Hallawa.

After a CoreText update, certain multi-coloured glyphs will no longer
be drawn as a glyph (drawGlyphs) but as a path. However, up to now
WebKit hasn't implemented the drawPath delegate, so this was making
multi-coloured glyphs not to be drawn and thefefore, breaking some our
tests. This path implements the drawPath delegate.

Some tests were relying on implementation details of COLRv0 by CoreText.
Multi-coloured glyphs, like the glyph for unicode "A" in Ahem-COLR.ttf won't
be drawn as a glyph but as a path now. Therefore, certain things like
line-dashing and strokes aren't supported, which is what COLRv0 expects
and it is consistency with other browser engines implementations. For that
reason we are rebasilining such tests. It might be that other tests
on different platforms not tested here will also need rebaseline.

Note: For Apple Platforms, these changes are only for Sonoma, when CoreText was updated. So we
are keeping the former behavior for the former MAC OSes baselines.

* LayoutTests/fast/text/canvas-color-fonts/linedash-COLR-expected.html: Copied from LayoutTests/fast/text/canvas-color-fonts/stroke-color-COLR-expected.html.
* LayoutTests/fast/text/canvas-color-fonts/stroke-color-COLR-expected.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-color-shadow-COLR-expected.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-color-shadow-ctm-COLR-expected.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR.html:
* LayoutTests/fast/text/glyph-display-lists/glyph-display-list-colr-unshared.html:
* LayoutTests/platform/ios-wk2/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-monterey/fast/text/canvas-color-fonts/linedash-COLR-expected-mismatch.html: Copied from LayoutTests/fast/text/canvas-color-fonts/linedash-COLR-expected-mismatch.html.
* LayoutTests/platform/mac-monterey/fast/text/canvas-color-fonts/stroke-color-COLR-expected.html: Copied from LayoutTests/fast/text/canvas-color-fonts/stroke-color-COLR-expected.html.
* LayoutTests/platform/mac-monterey/fast/text/canvas-color-fonts/stroke-color-shadow-COLR-expected.html: Copied from LayoutTests/fast/text/canvas-color-fonts/stroke-color-shadow-COLR-expected.html.
* LayoutTests/platform/mac-monterey/fast/text/canvas-color-fonts/stroke-color-shadow-ctm-COLR-expected.html: Copied from LayoutTests/fast/text/canvas-color-fonts/stroke-color-shadow-ctm-COLR-expected.html.
* LayoutTests/platform/mac-monterey/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html: Copied from LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html.
* LayoutTests/platform/mac-ventura/fast/text/canvas-color-fonts/linedash-COLR-expected-mismatch.html: Renamed from LayoutTests/fast/text/canvas-color-fonts/linedash-COLR-expected-mismatch.html.
* LayoutTests/platform/mac-ventura/fast/text/canvas-color-fonts/stroke-color-COLR-expected.html: Copied from LayoutTests/fast/text/canvas-color-fonts/stroke-color-COLR-expected.html.
* LayoutTests/platform/mac-ventura/fast/text/canvas-color-fonts/stroke-color-shadow-COLR-expected.html: Copied from LayoutTests/fast/text/canvas-color-fonts/stroke-color-shadow-COLR-expected.html.
* LayoutTests/platform/mac-ventura/fast/text/canvas-color-fonts/stroke-color-shadow-ctm-COLR-expected.html: Copied from LayoutTests/fast/text/canvas-color-fonts/stroke-color-shadow-ctm-COLR-expected.html.
* LayoutTests/platform/mac-ventura/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html: Copied from LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html.
 * LayoutTests/platform/mac-monterey/fast/text/resources/Ahem-COLR.ttf: Added.
 * LayoutTests/platform/mac-ventura/fast/text/resources/Ahem-COLR.ttf: Added.
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:
* Source/WebCore/platform/graphics/DrawGlyphsRecorder.h:
* Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:
(WebCore::drawPath):
(WebCore::DrawGlyphsRecorder::createInternalContext):
(WebCore::DrawGlyphsRecorder::recordDrawPath):

 * LayoutTests/platform/gtk/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html: Added.
 * LayoutTests/platform/gtk/fast/text/resources/Ahem-COLR.ttf: Added.
 * LayoutTests/platform/wpe/fast/text/canvas-color-fonts/stroke-gradient-COLR-expected.html: Added.
 * LayoutTests/platform/wpe/fast/text/resources/Ahem-COLR.ttf: Added.

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




More information about the webkit-changes mailing list