Title: [288564] trunk
- Revision
- 288564
- Author
- mmaxfi...@apple.com
- Date
- 2022-01-25 10:50:03 -0800 (Tue, 25 Jan 2022)
Log Message
REGRESSION(r281419): iCloud.com Notes web app fonts render incorrectly
https://bugs.webkit.org/show_bug.cgi?id=235559
<rdar://problem/87268956>
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
* web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character-expected.txt: Added.
* web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html: Added.
Source/WebCore:
Chrome and Firefox render U+0000 NULL as invisible. We should do the same, despite it technically being classified as a control character.
https://github.com/w3c/csswg-drafts/pull/6983
Test: imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyCSSVisibilityRules):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (288563 => 288564)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-25 18:30:40 UTC (rev 288563)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-25 18:50:03 UTC (rev 288564)
@@ -1,3 +1,14 @@
+2022-01-25 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ REGRESSION(r281419): iCloud.com Notes web app fonts render incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=235559
+ <rdar://problem/87268956>
+
+ Reviewed by Darin Adler.
+
+ * web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character-expected.txt: Added.
+ * web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html: Added.
+
2022-01-25 Antti Koivisto <an...@apple.com>
[CSS Container Queries] Parsing support for container-name property
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character-expected.txt (0 => 288564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character-expected.txt 2022-01-25 18:50:03 UTC (rev 288564)
@@ -0,0 +1,5 @@
+Testing the NULL character
+Actual output:
+
+PASS Testing letter spacing and word spacing
+
Property changes on: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character-expected.txt
___________________________________________________________________
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Author Date Id Rev URL
\ No newline at end of property
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html (0 => 288564)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html 2022-01-25 18:50:03 UTC (rev 288564)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src=""
+<script src=""
+<link rel="stylesheet" href=""
+</head>
+<body class="show_output">
+<p class="desc">Testing the NULL character</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+
+<ul id="d"></ul>
+<script>
+var t = async_test("Testing letter spacing and word spacing");
+_addTest(function(canvas, ctx) {
+ ctx.font = "48px 'Helvetica'";
+ let result = ctx.measureText("\u0000");
+ _assertSame(result.width, 0, "result.width", "0");
+});
+</script>
+</body>
+</html>
+
Modified: trunk/Source/WebCore/ChangeLog (288563 => 288564)
--- trunk/Source/WebCore/ChangeLog 2022-01-25 18:30:40 UTC (rev 288563)
+++ trunk/Source/WebCore/ChangeLog 2022-01-25 18:50:03 UTC (rev 288564)
@@ -1,3 +1,20 @@
+2022-01-25 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ REGRESSION(r281419): iCloud.com Notes web app fonts render incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=235559
+ <rdar://problem/87268956>
+
+ Reviewed by Darin Adler.
+
+ Chrome and Firefox render U+0000 NULL as invisible. We should do the same, despite it technically being classified as a control character.
+
+ https://github.com/w3c/csswg-drafts/pull/6983
+
+ Test: imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html
+
+ * platform/graphics/WidthIterator.cpp:
+ (WebCore::WidthIterator::applyCSSVisibilityRules):
+
2022-01-25 Antoine Quint <grao...@webkit.org>
Refactor KeyframeEffect::getKeyframes()
Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.cpp (288563 => 288564)
--- trunk/Source/WebCore/platform/graphics/WidthIterator.cpp 2022-01-25 18:30:40 UTC (rev 288563)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.cpp 2022-01-25 18:50:03 UTC (rev 288564)
@@ -606,7 +606,9 @@
// https://www.w3.org/TR/css-text-3/#white-space-processing
// "Control characters (Unicode category Cc)—other than tabs (U+0009), line feeds (U+000A), carriage returns (U+000D) and sequences that form a segment break—must be rendered as a visible glyph"
- if (u_charType(characterResponsibleForThisGlyph) == U_CONTROL_CHAR) {
+ // Also, we're omitting NULL (U+0000) from this set because Chrome and Firefox do so and it's needed for compat. See https://github.com/w3c/csswg-drafts/pull/6983.
+ if (characterResponsibleForThisGlyph != nullCharacter
+ && u_charType(characterResponsibleForThisGlyph) == U_CONTROL_CHAR) {
// Let's assume that .notdef is visible.
GlyphBufferGlyph visibleGlyph = 0;
clobberGlyph(i, visibleGlyph);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes