[webkit-changes] [WebKit/WebKit] ddefac: Assertion when using non-absolute / non-font-relat...
Sam Weinig
noreply at github.com
Mon Jan 6 09:04:36 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ddefac0cb41ffb082140c9aa388104c4950c6246
https://github.com/WebKit/WebKit/commit/ddefac0cb41ffb082140c9aa388104c4950c6246
Author: Sam Weinig <sam at webkit.org>
Date: 2025-01-06 (Mon, 06 Jan 2025)
Changed paths:
A LayoutTests/fast/canvas/canvas-letterSpacing-wordSpacing-units-expected.txt
A LayoutTests/fast/canvas/canvas-letterSpacing-wordSpacing-units.html
M LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/text/2d.text.drawing.style.invalid.spacing.html
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
Log Message:
-----------
Assertion when using non-absolute / non-font-relative units in ctx.letterSpacing/ctx.wordSpacing
https://bugs.webkit.org/show_bug.cgi?id=285404
Reviewed by Darin Adler.
Fixes a debug only assertion when setting ctx.letterSpacing/ctx.wordSpacing
to non-absolute / non-font-relative units in the length passed in.
* LayoutTests/fast/canvas/canvas-letterSpacing-wordSpacing-units-expected.txt: Added.
* LayoutTests/fast/canvas/canvas-letterSpacing-wordSpacing-units.html: Added.
- Adds test that setting letterSpacing / wordSpacing doesn't crash for any unit.
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::unitAllowedForSpacing):
(WebCore::CanvasRenderingContext2DBase::setLetterSpacing):
(WebCore::CanvasRenderingContext2DBase::setWordSpacing):
- Add check for supported units.
Canonical link: https://commits.webkit.org/288468@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