forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rgb() colors that use none should use hex syntax for serialization in…
… canvas https://bugs.webkit.org/show_bug.cgi?id=278392 Reviewed by Darin Adler. When using HTML serialization (such as in canvas code), `rgb(none none none)` should serialize as `#000000`, not `rgb(0, 0, 0)` as it currently does. This is more consistent and matches other browsers. * LayoutTests/fast/canvas/canvas-color-serialization.html: * LayoutTests/fast/canvas/canvas-color-serialization-expected.txt: - Add serialization tests. Additional will be added in WPT via web-platform-tests/wpt#47148. * Source/WebCore/platform/graphics/ColorSerialization.cpp: (WebCore::serializationForHTML): - Make sure to call through to the HTML serializer for legacy rgb() colors that have none (which is indicated by the use of SRGBA<float> without the "useColorFunctionSerialization" bit set). Canonical link: https://commits.webkit.org/283120@main
- Loading branch information
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters