Branch: refs/heads/webkitglib/2.52
Home: https://github.com/WebKit/WebKit
Commit: a63c9d4868f5c1f7f7c6ec06b1f445d8cdb00cc5
https://github.com/WebKit/WebKit/commit/a63c9d4868f5c1f7f7c6ec06b1f445d8cdb00cc5
Author: Nipun Shukla <[email protected]>
Date: 2026-02-03 (Tue, 03 Feb 2026)
Changed paths:
M Source/WebCore/rendering/TextPainter.cpp
Log Message:
-----------
Cherry-pick 306581@main (231a8d1265f6).
https://bugs.webkit.org/show_bug.cgi?id=306546
REGRESSION(305254@main): MotionMark design suite regressed
https://bugs.webkit.org/show_bug.cgi?id=306546
rdar://168966510
Reviewed by Simon Fraser.
305254@main added a GraphicsContextStateSaver around glyph display list
replay to fix font state contamination. This caused a regression in
MotionMark
because the save/restore was applied to every cached text render, even for
fonts that never modify graphics state.
This change makes the state save conditional by checking whether color or
stroke
change at replay time. For most fonts and cases, this returns false,
indicating the display list contains only safe operations so needsStateSave
is
false and GraphicsContextStateSaver becomes a no-op. For fonts with
state-modifying operations, needsStateSave is true and state is properly
saved/restored.
This behavior is tested by ensuring we do not regress tests added in
305254@main
such as fast/text/glyph-display-lists/colr-glyph-state-leak.html
* Source/WebCore/rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextOrEmphasisMarks):
Canonical link: https://commits.webkit.org/306581@main
Canonical link: https://commits.webkit.org/305877.39@webkitglib/2.52
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications