Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: b7e7afad1304ab572e0b27562c4b0c9747930ad8 https://github.com/WebKit/WebKit/commit/b7e7afad1304ab572e0b27562c4b0c9747930ad8 Author: Sam Weinig <s...@webkit.org> Date: 2024-09-03 (Tue, 03 Sep 2024)
Changed paths: M LayoutTests/fast/canvas/canvas-color-serialization-expected.txt M LayoutTests/fast/canvas/canvas-color-serialization.html M Source/WebCore/platform/graphics/ColorSerialization.cpp Log Message: ----------- 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 https://github.com/web-platform-tests/wpt/pull/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 To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes