Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ac0b3b11540ea30b21025ae0f09143755c4e029b
https://github.com/WebKit/WebKit/commit/ac0b3b11540ea30b21025ae0f09143755c4e029b
Author: Kimmo Kinnunen <[email protected]>
Date: 2026-08-17 (Mon, 17 Aug 2026)
Changed paths:
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Tools/TestWebKitAPI/Tests/WebCore/cocoa/GraphicsContextCGTests.mm
Log Message:
-----------
GraphicsContextCG::strokeRect modifies stroke thickness state
https://bugs.webkit.org/show_bug.cgi?id=321910
rdar://185084876
Reviewed by Mike Wyrzykowski.
Avoid calling the public GraphicsContext state setter function. This
will modify the context state, which is not the intention of the
strokeRect.
Instead, use the CGContext API directly.
Currently not possible to invoke the bug from web, but prevents future
state-related optimizations.
Test: Tools/TestWebKitAPI/Tests/WebCore/cocoa/GraphicsContextCGTests.mm
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::strokeRect):
* Tools/TestWebKitAPI/Tests/WebCore/cocoa/GraphicsContextCGTests.mm:
(TestWebKitAPI::TEST(GraphicsContextTests, StrokeRectPreservesStrokeThickness)):
(TestWebKitAPI::TEST(GraphicsContextTests,
StrokeRectDoesNotDesynchroniseLineWidth)):
Canonical link: https://commits.webkit.org/319296@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications