[webkit-changes] [WebKit/WebKit] 37ebf3: REGRESSION(270688 at main): Text is not displayed if ...

Said Abou-Hallawa noreply at github.com
Wed Jan 15 17:45:25 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 37ebf3668e204784bc868427c5528fefbb82314c
      https://github.com/WebKit/WebKit/commit/37ebf3668e204784bc868427c5528fefbb82314c
  Author: Said Abou-Hallawa <said at apple.com>
  Date:   2025-01-15 (Wed, 15 Jan 2025)

  Changed paths:
    A LayoutTests/fast/text/otsvg-spacing-canvas-expected.html
    A LayoutTests/fast/text/otsvg-spacing-canvas.html
    M LayoutTests/fast/text/otsvg-spacing-expected.html
    M LayoutTests/fast/text/otsvg-spacing.html
    A LayoutTests/fast/text/resources/glyph-image-1.png
    A LayoutTests/fast/text/resources/glyph-image-2.png
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac-wk1/TestExpectations
    M LayoutTests/platform/win/TestExpectations
    M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
    M Source/WebCore/platform/graphics/GraphicsContext.cpp
    M Source/WebCore/platform/graphics/GraphicsContext.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListItem.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListItem.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
    M Source/WebCore/rendering/TextPainter.cpp
    M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
    M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h
    M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in
    M Source/WebKit/Shared/DisplayListArgumentCoders.serialization.in
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h

  Log Message:
  -----------
  REGRESSION(270688 at main): Text is not displayed if it is formatted with OpenType-SVG color fonts
https://bugs.webkit.org/show_bug.cgi?id=285935#
rdar://137496217

Reviewed by Simon Fraser.

drawDisplayListItems() was added to GraphicsContext and its subclasses in 270688 at main
to transfer a DisplayList in one IPC to GPUProcess. It turned out this is problematic
when RenderingResources are referenced from the items.

We do not transfer local ImageBuffers to GPUProcess and DisplayList::Recorder should
fail to record these items.  It is supposed to fall back to GraphicsContext which
transfers the local ImageBuffers to ShareableBitmaps before calling the corresponding
NativeImage functions.

The problem is this does not happen with individual items in
DisplayList::Recorder::drawDisplayListItems(). We keep them referencing ImageBuffers
although RemoteDisplayListRecorderProxy::recordResourceUse() fails to record the local
ImageBuffers.

The fix is to revert 270688 at main. Reverting this change should not have an effect on
MotionMark - Design sub-test. All the text runs in this sub-tests have only one
DrawDecomposedGlyphs item which references a Font resource. So replaying back this
item in WebProcess and sending it to GPUP individually should be the same as transferring
the one-item list and replaying it back in GPUProcess.

The layout test fast/text/otsvg-spacing.html was repurposed to test OpenType-SVG fonts
in DOM elements so we can test drawing trough TextPainter. otsvg-spacing-canvas.html
was added to test OpenType-SVG fonts in 2D canvas.

* LayoutTests/fast/text/otsvg-spacing-canvas-expected.html: Added.
* LayoutTests/fast/text/otsvg-spacing-canvas.html: Added.
* LayoutTests/fast/text/otsvg-spacing-expected.html:
* LayoutTests/fast/text/otsvg-spacing.html:
* LayoutTests/fast/text/resources/glyph-image-1.png: Added.
* LayoutTests/fast/text/resources/glyph-image-2.png: Added.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/win/TestExpectations:
* Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawDisplayListItems): Deleted.
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListItem.cpp:
(WebCore::DisplayList::applyItem):
* Source/WebCore/platform/graphics/displaylists/DisplayListItem.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawDisplayListItems::DrawDisplayListItems): Deleted.
(WebCore::DisplayList::DrawDisplayListItems::apply const): Deleted.
(WebCore::DisplayList::DrawDisplayListItems::dump const): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawDisplayListItems::items const): Deleted.
(WebCore::DisplayList::DrawDisplayListItems::destination const): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawDisplayListItems): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::recordDrawDisplayListItems): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
* Source/WebCore/rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextOrEmphasisMarks):
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::drawDisplayListItems): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h:
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
* Source/WebKit/Shared/DisplayListArgumentCoders.serialization.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordDrawDisplayListItems): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list