Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 25f15dd7a67f38d43043f60b020478051ab7aaf9
https://github.com/WebKit/WebKit/commit/25f15dd7a67f38d43043f60b020478051ab7aaf9
Author: Kimmo Kinnunen <[email protected]>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/fast/css/appearance-apple-pay-button-after-text-expected.html
A LayoutTests/fast/css/appearance-apple-pay-button-after-text.html
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations
M Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm
M Source/WebCore/platform/cocoa/DragImageCocoa.mm
M Source/WebCore/platform/graphics/FontCascade.h
M Source/WebCore/platform/graphics/FontPlatformData.h
M Source/WebCore/platform/graphics/ca/PlatformCALayer.mm
M Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
M Source/WebCore/platform/graphics/cocoa/controls/ApplePayButtonCocoa.mm
M Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorder.cpp
M Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp
M Source/WebCore/platform/ios/LegacyTileCache.mm
M Source/WebCore/testing/cocoa/WebViewVisualIdentificationOverlay.mm
M Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm
Log Message:
-----------
CG: Avoid getting, setting text matrix many times when drawing glyphs
https://bugs.webkit.org/show_bug.cgi?id=322709
rdar://185974109
Reviewed by Mike Wyrzykowski.
Reland: Fix Apple Pay text + icon drawing by setting identity matrix,
it is assumed by the PKDrawApplePayButtonWithCornerRadius.
Reset to identity also in FontCascadeCoreText, just to safeguard
against similar bugs in other system draw functions.
FontCascade would use ScopedTextMatrix get and restore the TextMatrix
CGContext property.
This state is not part of CGContext GState and is generally
modified by CT*Draw commands. As such it cannot be expected to be
saved by the CGContext using functions.
Instead always explicitly set the transform when using CT. Leave the
transform dirty.
Works towards making FontCascadeCoreText platform context property
modifications more consistent. This is needed to make GraphicsContextCG
state application lazy.
* Source/WebCore/platform/graphics/FontCascade.h:
* Source/WebCore/platform/graphics/FontPlatformData.h:
(WebCore::ScopedTextMatrix::savedMatrix const): Deleted.
* Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:
(WebCore::GraphicsContext::drawMultiRepresentationHEIC):
* Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorder.cpp:
(WebCore::DrawGlyphsRecorder::prepareInternalContext):
(WebCore::DrawGlyphsRecorder::drawNativeText):
* Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:
(WebCore::computeTextMatrix):
(WebCore::fillVectorWithHorizontalGlyphPositions):
(WebCore::fillVectorWithVerticalGlyphPositions):
(WebCore::FontCascade::drawGlyphs):
(WebCore::computeOverallTextMatrix): Deleted.
(WebCore::computeVerticalTextMatrix): Deleted.
(WebCore::showGlyphsWithAdvances): Deleted.
Canonical link: https://commits.webkit.org/321502@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications