Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b5da4b2569257bc48c2a4a4d4baebee4749b945d
https://github.com/WebKit/WebKit/commit/b5da4b2569257bc48c2a4a4d4baebee4749b945d
Author: Claudio Saavedra <[email protected]>
Date: 2026-02-26 (Thu, 26 Feb 2026)
Changed paths:
A
LayoutTests/compositing/canvas/resize-canvas-with-unrealized-saves-crash-expected.txt
A
LayoutTests/compositing/canvas/resize-canvas-with-unrealized-saves-crash.html
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
Log Message:
-----------
REGRESSION(307450@main): CanvasRenderingContext2D does not account for
unrealized saves when resetting the context
https://bugs.webkit.org/show_bug.cgi?id=308741
Reviewed by Kimmo Kinnunen.
When canvas size dimensions are modified the rendering context stack
needs to be restored. However, if there are unrealized saves, the
check at the beginning of CanvasRenderingContext2DBase::restore()
will short-circuit and leave the state inconsistent after the image
buffer is reset or removed.
Resetting the counter for unrealized saves before the restore call
loop prevents this.
Test: compositing/canvas/resize-canvas-with-unrealized-saves-crash.html
*
LayoutTests/compositing/canvas/resize-canvas-with-unrealized-saves-crash-expected.txt:
Added.
*
LayoutTests/compositing/canvas/resize-canvas-with-unrealized-saves-crash.html:
Added.
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::~CanvasRenderingContext2DBase):
(WebCore::CanvasRenderingContext2DBase::didUpdateCanvasSizeProperties):
Canonical link: https://commits.webkit.org/308314@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications