Title: [289306] branches/safari-613-branch
Revision
289306
Author
[email protected]
Date
2022-02-07 18:55:23 -0800 (Mon, 07 Feb 2022)

Log Message

Cherry-pick r288564. rdar://problem/87268956

    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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288564 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog (289305 => 289306)


--- branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-02-08 02:55:19 UTC (rev 289305)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-02-08 02:55:23 UTC (rev 289306)
@@ -1,5 +1,44 @@
 2022-02-07  Russell Epstein  <[email protected]>
 
+        Cherry-pick r288564. rdar://problem/87268956
+
+    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):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-25  Myles C. Maxfield  <[email protected]>
+
+            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-02-07  Russell Epstein  <[email protected]>
+
         Cherry-pick r288362. rdar://problem/87832940
 
     WPT version of css/css-cascade/parsing/layer-import-parsing.html crashes with nullptr

Added: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character-expected.txt (0 => 289306)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character-expected.txt	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character-expected.txt	2022-02-08 02:55:23 UTC (rev 289306)
@@ -0,0 +1,5 @@
+Testing the NULL character
+Actual output:
+
+PASS Testing letter spacing and word spacing
+

Added: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html (0 => 289306)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/null-character.html	2022-02-08 02:55:23 UTC (rev 289306)
@@ -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: branches/safari-613-branch/Source/WebCore/ChangeLog (289305 => 289306)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-02-08 02:55:19 UTC (rev 289305)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-02-08 02:55:23 UTC (rev 289306)
@@ -1,5 +1,50 @@
 2022-02-07  Russell Epstein  <[email protected]>
 
+        Cherry-pick r288564. rdar://problem/87268956
+
+    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):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-25  Myles C. Maxfield  <[email protected]>
+
+            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-02-07  Russell Epstein  <[email protected]>
+
         Cherry-pick r288553. rdar://problem/87976757
 
     Missing EnabledBySetting=WebXREnabled where Conditional=WEBXR exists

Modified: branches/safari-613-branch/Source/WebCore/platform/graphics/WidthIterator.cpp (289305 => 289306)


--- branches/safari-613-branch/Source/WebCore/platform/graphics/WidthIterator.cpp	2022-02-08 02:55:19 UTC (rev 289305)
+++ branches/safari-613-branch/Source/WebCore/platform/graphics/WidthIterator.cpp	2022-02-08 02:55:23 UTC (rev 289306)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to