Title: [267008] trunk
Revision
267008
Author
mmaxfi...@apple.com
Date
2020-09-14 01:17:03 -0700 (Mon, 14 Sep 2020)

Log Message

[Apple Win] Migrate from CGFontGetGlyphsForUnichars() to CTFontGetGlyphsForCharacters()
https://bugs.webkit.org/show_bug.cgi?id=216446

Reviewed by Darin Adler.

Source/WebCore:

This patch is one of the steps to moving the Apple Win port from CGFont to CTFont.
This patch removes the #if !PLATFORM(WIN) guard from GlyphPageCoreText.cpp and deletes
the old functions it used to be using.

Covered by existing tests.

* PlatformAppleWin.cmake:
* platform/graphics/coretext/GlyphPageCoreText.cpp:
* platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: Removed. There's nothing left in the
  file.

LayoutTests:

Updating tests.

* fast/text/flag-codepoint.html: The Windows emoji font draws slightly higher than the ascent.
  Update the test to be more robust.
* platform/win/fast/css/font-face-opentype-expected.png: Added.
* platform/win/fast/css/font-face-opentype-expected.txt:
* platform/win/mathml/presentation/roots-expected.txt:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (267007 => 267008)


--- trunk/LayoutTests/ChangeLog	2020-09-14 00:00:42 UTC (rev 267007)
+++ trunk/LayoutTests/ChangeLog	2020-09-14 08:17:03 UTC (rev 267008)
@@ -1,3 +1,18 @@
+2020-09-14  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        [Apple Win] Migrate from CGFontGetGlyphsForUnichars() to CTFontGetGlyphsForCharacters()
+        https://bugs.webkit.org/show_bug.cgi?id=216446
+
+        Reviewed by Darin Adler.
+
+        Updating tests.
+
+        * fast/text/flag-codepoint.html: The Windows emoji font draws slightly higher than the ascent.
+          Update the test to be more robust.
+        * platform/win/fast/css/font-face-opentype-expected.png: Added.
+        * platform/win/fast/css/font-face-opentype-expected.txt:
+        * platform/win/mathml/presentation/roots-expected.txt:
+
 2020-09-13  Rob Buis  <rb...@igalia.com>
 
         Make CanvasRenderingContext2D functions parameters not default to undefined

Modified: trunk/LayoutTests/fast/text/flag-codepoint.html (267007 => 267008)


--- trunk/LayoutTests/fast/text/flag-codepoint.html	2020-09-14 00:00:42 UTC (rev 267007)
+++ trunk/LayoutTests/fast/text/flag-codepoint.html	2020-09-14 08:17:03 UTC (rev 267008)
@@ -4,13 +4,13 @@
 </head>
 <body>
 This test makes sure that combining grapheme clusters with Tag codepoints (U+E0000 - U+E007F) join correctly. The test passes if you don't see anything below.
-<div style="position: relative; font-size: 100px;">
+<div style="position: relative; top: 2px; font-size: 100px;">
 <div style="display: -webkit-box;">
 <div style="word-break: break-word;">
 🏴󠁧󠁢󠁥󠁮󠁧󠁿
 </div>
 </div>
-<div style="position: absolute; left: 0px; top: 0px; width: 750px; height: 120px; background: white;"></div>
+<div style="position: absolute; left: 0px; top: -2px; width: 750px; height: 124px; background: white;"></div>
 </div>
 </body>
 </html>

Added: trunk/LayoutTests/platform/win/fast/css/font-face-opentype-expected.png


(Binary files differ)
Index: trunk/LayoutTests/platform/win/fast/css/font-face-opentype-expected.png =================================================================== --- trunk/LayoutTests/platform/win/fast/css/font-face-opentype-expected.png 2020-09-14 00:00:42 UTC (rev 267007) +++ trunk/LayoutTests/platform/win/fast/css/font-face-opentype-expected.png 2020-09-14 08:17:03 UTC (rev 267008) Property changes on: trunk/LayoutTests/platform/win/fast/css/font-face-opentype-expected.png ___________________________________________________________________

Added: svn:mime-type

+image/png \ No newline at end of property

Modified: trunk/LayoutTests/platform/win/fast/css/font-face-opentype-expected.txt (267007 => 267008)


--- trunk/LayoutTests/platform/win/fast/css/font-face-opentype-expected.txt	2020-09-14 00:00:42 UTC (rev 267007)
+++ trunk/LayoutTests/platform/win/fast/css/font-face-opentype-expected.txt	2020-09-14 08:17:03 UTC (rev 267008)
@@ -33,10 +33,10 @@
         RenderText {#text} at (0,0) size 744x36
           text run at (0,0) width 744: "Check if glyphs not in Ahem.otf can be rendered using a fallback font. If the test passes, you should see a single-quote"
           text run at (0,18) width 104: "character below:"
-      RenderBlock (anonymous) at (0,204) size 784x16
-        RenderInline {SPAN} at (0,0) size 16x16
-          RenderText {#text} at (0,0) size 16x16
-            text run at (0,0) width 16: "'"
+      RenderBlock (anonymous) at (0,204) size 784x18
+        RenderInline {SPAN} at (0,0) size 3x16
+          RenderText {#text} at (0,1) size 3x16
+            text run at (0,1) width 3: "'"
         RenderText {#text} at (0,0) size 0x0
         RenderText {#text} at (0,0) size 0x0
         RenderText {#text} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/win/mathml/presentation/roots-expected.txt (267007 => 267008)


--- trunk/LayoutTests/platform/win/mathml/presentation/roots-expected.txt	2020-09-14 00:00:42 UTC (rev 267007)
+++ trunk/LayoutTests/platform/win/mathml/presentation/roots-expected.txt	2020-09-14 08:17:03 UTC (rev 267008)
@@ -1,8 +1,8 @@
-layer at (0,0) size 800x699
+layer at (0,0) size 800x697
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x699
-  RenderBlock {html} at (0,0) size 800x699
-    RenderBody {body} at (8,16) size 784x667
+layer at (0,0) size 800x697
+  RenderBlock {html} at (0,0) size 800x697
+    RenderBody {body} at (8,16) size 784x665
       RenderBlock {p} at (0,0) size 784x18
         RenderText {#text} at (0,0) size 177x18
           text run at (0,0) width 177: "square root (should be red): "
@@ -18,7 +18,7 @@
         RenderMathMLMath {math} at (110,0) size 49x17
           RenderMathMLRoot {msqrt} at (0,0) size 49x17
             RenderMathMLRow {mrow} at (11,3) size 38x13
-              RenderMathMLToken {mi} at (0,3) size 10x9 [padding: 0 2 0 0]
+              RenderMathMLToken {mi} at (0,3) size 9x8 [padding: 0 2 0 0]
                 RenderBlock (anonymous) at (0,0) size 8x9
                   RenderText {#text} at (0,-4) size 8x16
                     text run at (0,-4) width 8: "x"
@@ -33,22 +33,22 @@
       RenderBlock {p} at (0,68) size 784x22
         RenderText {#text} at (0,4) size 222x18
           text run at (0,4) width 222: "long square root with implied row: "
-        RenderMathMLMath {math} at (222,0) size 58x21
-          RenderMathMLRoot {msqrt} at (0,0) size 58x21
-            RenderMathMLScripts {msup} at (12,3) size 18x17
-              RenderMathMLToken {mi} at (0,6) size 10x10 [padding: 0 2 0 0]
+        RenderMathMLMath {math} at (222,0) size 57x21
+          RenderMathMLRoot {msqrt} at (0,0) size 57x21
+            RenderMathMLScripts {msup} at (12,3) size 17x16
+              RenderMathMLToken {mi} at (0,6) size 9x9 [padding: 0 2 0 0]
                 RenderBlock (anonymous) at (0,0) size 8x9
                   RenderText {#text} at (0,-4) size 8x16
                     text run at (0,-4) width 8: "x"
-              RenderMathMLToken {mn} at (9,0) size 8x10
+              RenderMathMLToken {mn} at (9,0) size 7x10
                 RenderBlock (anonymous) at (0,0) size 7x10
                   RenderText {#text} at (0,0) size 7x12
                     text run at (0,0) width 7: "2"
-            RenderMathMLOperator {mo} at (29,8) size 20x12
+            RenderMathMLOperator {mo} at (28,8) size 20x12
               RenderBlock (anonymous) at (3,0) size 13x11
                 RenderText {#text} at (0,-2) size 12x16
                   text run at (0,-2) width 12: "+"
-            RenderMathMLToken {mn} at (48,7) size 10x13
+            RenderMathMLToken {mn} at (47,7) size 10x13
               RenderBlock (anonymous) at (0,0) size 9x12
                 RenderText {#text} at (0,-1) size 9x16
                   text run at (0,-1) width 9: "1"
@@ -59,7 +59,7 @@
           RenderMathMLRoot {msqrt} at (0,0) size 50x37
             RenderMathMLFraction {mfrac} at (12,3) size 38x30
               RenderMathMLRow {mrow} at (0,0) size 38x12
-                RenderMathMLToken {mi} at (0,3) size 10x9 [padding: 0 2 0 0]
+                RenderMathMLToken {mi} at (0,3) size 9x8 [padding: 0 2 0 0]
                   RenderBlock (anonymous) at (0,0) size 8x9
                     RenderText {#text} at (0,-4) size 8x16
                       text run at (0,-4) width 8: "x"
@@ -72,7 +72,7 @@
                     RenderText {#text} at (0,-1) size 9x16
                       text run at (0,-1) width 9: "1"
               RenderMathMLRow {mrow} at (0,17) size 38x13
-                RenderMathMLToken {mi} at (0,3) size 10x9 [padding: 0 2 0 0]
+                RenderMathMLToken {mi} at (0,3) size 9x8 [padding: 0 2 0 0]
                   RenderBlock (anonymous) at (0,0) size 8x9
                     RenderText {#text} at (0,-4) size 8x16
                       text run at (0,-4) width 8: "x"
@@ -100,30 +100,30 @@
       RenderBlock {p} at (0,195) size 784x20
         RenderText {#text} at (0,2) size 75x18
           text run at (0,2) width 75: "long index: "
-        RenderMathMLMath {math} at (75,0) size 54x18
-          RenderMathMLRoot {mroot} at (0,0) size 54x18
-            RenderMathMLToken {mn} at (44,4) size 10x13
+        RenderMathMLMath {math} at (75,0) size 53x19
+          RenderMathMLRoot {mroot} at (0,0) size 53x19
+            RenderMathMLToken {mn} at (43,5) size 10x13
               RenderBlock (anonymous) at (0,0) size 9x12
                 RenderText {#text} at (0,-1) size 9x16
                   text run at (0,-1) width 9: "2"
-            RenderMathMLRow {mrow} at (1,0) size 38x8
-              RenderMathMLToken {mi} at (0,1) size 5x6 [padding: 0 1 0 0]
+            RenderMathMLRow {mrow} at (1,0) size 37x9
+              RenderMathMLToken {mi} at (0,2) size 5x5 [padding: 0 1 0 0]
                 RenderBlock (anonymous) at (0,0) size 4x6
                   RenderText {#text} at (0,-2) size 4x9
                     text run at (0,-2) width 4: "x"
-              RenderMathMLOperator {mo} at (4,0) size 12x7
+              RenderMathMLOperator {mo} at (5,0) size 11x7
                 RenderBlock (anonymous) at (2,0) size 7x7
                   RenderText {#text} at (0,-1) size 7x9
                     text run at (0,-1) width 7: "+"
-              RenderMathMLToken {mi} at (15,1) size 7x7 [padding: 0 1 0 0]
+              RenderMathMLToken {mi} at (16,2) size 5x7 [padding: 0 1 0 0]
                 RenderBlock (anonymous) at (0,0) size 5x7
                   RenderText {#text} at (0,-2) size 5x9
                     text run at (0,-2) width 5: "y"
-              RenderMathMLOperator {mo} at (21,0) size 12x7
+              RenderMathMLOperator {mo} at (21,0) size 11x7
                 RenderBlock (anonymous) at (2,0) size 7x7
                   RenderText {#text} at (0,-1) size 7x9
                     text run at (0,-1) width 7: "+"
-              RenderMathMLToken {mi} at (32,1) size 6x6 [padding: 0 1 0 0]
+              RenderMathMLToken {mi} at (32,2) size 4x5 [padding: 0 1 0 0]
                 RenderBlock (anonymous) at (0,0) size 4x6
                   RenderText {#text} at (0,-2) size 4x9
                     text run at (0,-2) width 4: "z"
@@ -130,11 +130,11 @@
       RenderBlock {p} at (0,231) size 784x37
         RenderText {#text} at (0,9) size 185x18
           text run at (0,9) width 185: "long index w/ complex base: "
-        RenderMathMLMath {math} at (185,0) size 84x37
-          RenderMathMLRoot {mroot} at (0,0) size 84x37
-            RenderMathMLFraction {mfrac} at (45,3) size 39x30
+        RenderMathMLMath {math} at (185,0) size 82x37
+          RenderMathMLRoot {mroot} at (0,0) size 82x37
+            RenderMathMLFraction {mfrac} at (44,3) size 38x30
               RenderMathMLRow {mrow} at (0,0) size 38x12
-                RenderMathMLToken {mi} at (0,3) size 10x9 [padding: 0 2 0 0]
+                RenderMathMLToken {mi} at (0,3) size 9x8 [padding: 0 2 0 0]
                   RenderBlock (anonymous) at (0,0) size 8x9
                     RenderText {#text} at (0,-4) size 8x16
                       text run at (0,-4) width 8: "x"
@@ -147,7 +147,7 @@
                     RenderText {#text} at (0,-1) size 9x16
                       text run at (0,-1) width 9: "1"
               RenderMathMLRow {mrow} at (0,17) size 38x13
-                RenderMathMLToken {mi} at (0,3) size 10x9 [padding: 0 2 0 0]
+                RenderMathMLToken {mi} at (0,3) size 9x8 [padding: 0 2 0 0]
                   RenderBlock (anonymous) at (0,0) size 8x9
                     RenderText {#text} at (0,-4) size 8x16
                       text run at (0,-4) width 8: "x"
@@ -159,55 +159,55 @@
                   RenderBlock (anonymous) at (0,0) size 9x12
                     RenderText {#text} at (0,-1) size 9x16
                       text run at (0,-1) width 9: "2"
-            RenderMathMLRow {mrow} at (1,5) size 38x9
-              RenderMathMLToken {mi} at (0,1) size 5x6 [padding: 0 1 0 0]
+            RenderMathMLRow {mrow} at (1,5) size 37x9
+              RenderMathMLToken {mi} at (0,2) size 5x5 [padding: 0 1 0 0]
                 RenderBlock (anonymous) at (0,0) size 4x6
                   RenderText {#text} at (0,-2) size 4x9
                     text run at (0,-2) width 4: "x"
-              RenderMathMLOperator {mo} at (4,0) size 12x7
+              RenderMathMLOperator {mo} at (5,0) size 11x7
                 RenderBlock (anonymous) at (2,0) size 7x7
                   RenderText {#text} at (0,-1) size 7x9
                     text run at (0,-1) width 7: "+"
-              RenderMathMLToken {mi} at (15,1) size 7x7 [padding: 0 1 0 0]
+              RenderMathMLToken {mi} at (16,2) size 5x7 [padding: 0 1 0 0]
                 RenderBlock (anonymous) at (0,0) size 5x7
                   RenderText {#text} at (0,-2) size 5x9
                     text run at (0,-2) width 5: "y"
-              RenderMathMLOperator {mo} at (21,0) size 12x7
+              RenderMathMLOperator {mo} at (21,0) size 11x7
                 RenderBlock (anonymous) at (2,0) size 7x7
                   RenderText {#text} at (0,-1) size 7x9
                     text run at (0,-1) width 7: "+"
-              RenderMathMLToken {mi} at (32,1) size 6x6 [padding: 0 1 0 0]
+              RenderMathMLToken {mi} at (32,2) size 4x5 [padding: 0 1 0 0]
                 RenderBlock (anonymous) at (0,0) size 4x6
                   RenderText {#text} at (0,-2) size 4x9
                     text run at (0,-2) width 4: "z"
-      RenderBlock {p} at (0,284) size 784x38
-        RenderText {#text} at (0,20) size 75x18
-          text run at (0,20) width 75: "high index: "
-        RenderMathMLMath {math} at (75,0) size 22x36
-          RenderMathMLRoot {mroot} at (0,0) size 22x36
-            RenderMathMLToken {mn} at (12,22) size 10x13
+      RenderBlock {p} at (0,284) size 784x36
+        RenderText {#text} at (0,18) size 75x18
+          text run at (0,18) width 75: "high index: "
+        RenderMathMLMath {math} at (75,0) size 22x35
+          RenderMathMLRoot {mroot} at (0,0) size 22x35
+            RenderMathMLToken {mn} at (12,21) size 10x13
               RenderBlock (anonymous) at (0,0) size 9x12
                 RenderText {#text} at (0,-1) size 9x16
                   text run at (0,-1) width 9: "2"
-            RenderMathMLFraction {mfrac} at (1,0) size 6x26
-              RenderMathMLFraction {mfrac} at (0,0) size 6x17
-                RenderMathMLToken {mi} at (0,0) size 6x6 [padding: 0 1 0 0]
+            RenderMathMLFraction {mfrac} at (1,0) size 6x25
+              RenderMathMLFraction {mfrac} at (0,0) size 5x16
+                RenderMathMLToken {mi} at (0,0) size 5x5 [padding: 0 1 0 0]
                   RenderBlock (anonymous) at (0,0) size 4x6
                     RenderText {#text} at (0,-2) size 4x9
                       text run at (0,-2) width 4: "x"
-                RenderMathMLToken {mi} at (0,9) size 6x8 [padding: 0 1 0 0]
+                RenderMathMLToken {mi} at (0,9) size 5x7 [padding: 0 1 0 0]
                   RenderBlock (anonymous) at (0,0) size 5x7
                     RenderText {#text} at (0,-2) size 5x9
                       text run at (0,-2) width 5: "y"
-              RenderMathMLToken {mi} at (0,19) size 6x7 [padding: 0 1 0 0]
+              RenderMathMLToken {mi} at (0,19) size 5x6 [padding: 0 1 0 0]
                 RenderBlock (anonymous) at (0,0) size 4x6
                   RenderText {#text} at (0,-2) size 4x9
                     text run at (0,-2) width 4: "z"
-      RenderBlock {p} at (0,338) size 784x97
+      RenderBlock {p} at (0,336) size 784x97
         RenderText {#text} at (0,21) size 155x18
           text run at (0,21) width 155: "Imbricated square roots: "
-        RenderMathMLMath {math} at (155,0) size 300x98
-          RenderMathMLRoot {msqrt} at (0,0) size 300x98
+        RenderMathMLMath {math} at (155,0) size 298x98
+          RenderMathMLRoot {msqrt} at (0,0) size 298x98
             RenderMathMLToken {mn} at (10,24) size 9x13
               RenderBlock (anonymous) at (0,0) size 9x12
                 RenderText {#text} at (0,-1) size 9x16
@@ -216,8 +216,8 @@
               RenderBlock (anonymous) at (3,0) size 13x11
                 RenderText {#text} at (0,-2) size 12x16
                   text run at (0,-2) width 12: "+"
-            RenderMathMLRoot {msqrt} at (38,3) size 262x95
-              RenderMathMLRow {mrow} at (10,3) size 252x91
+            RenderMathMLRoot {msqrt} at (38,3) size 260x95
+              RenderMathMLRow {mrow} at (10,3) size 250x91
                 RenderMathMLToken {mn} at (0,18) size 9x12
                   RenderBlock (anonymous) at (0,0) size 9x12
                     RenderText {#text} at (0,-1) size 9x16
@@ -226,8 +226,8 @@
                   RenderBlock (anonymous) at (3,0) size 13x11
                     RenderText {#text} at (0,-2) size 12x16
                       text run at (0,-2) width 12: "+"
-                RenderMathMLRoot {msqrt} at (28,0) size 224x91
-                  RenderMathMLRow {mrow} at (12,3) size 212x73
+                RenderMathMLRoot {msqrt} at (28,0) size 222x91
+                  RenderMathMLRow {mrow} at (12,3) size 210x73
                     RenderMathMLToken {mn} at (0,15) size 9x12
                       RenderBlock (anonymous) at (0,0) size 9x12
                         RenderText {#text} at (0,-1) size 9x16
@@ -236,8 +236,8 @@
                       RenderBlock (anonymous) at (3,0) size 13x11
                         RenderText {#text} at (0,-2) size 12x16
                           text run at (0,-2) width 12: "+"
-                    RenderMathMLRoot {msqrt} at (28,0) size 184x73
-                      RenderMathMLRow {mrow} at (12,3) size 171x55
+                    RenderMathMLRoot {msqrt} at (28,0) size 182x73
+                      RenderMathMLRow {mrow} at (12,3) size 170x55
                         RenderMathMLToken {mn} at (0,12) size 9x12
                           RenderBlock (anonymous) at (0,0) size 9x12
                             RenderText {#text} at (0,-1) size 9x16
@@ -246,8 +246,8 @@
                           RenderBlock (anonymous) at (3,0) size 13x11
                             RenderText {#text} at (0,-2) size 12x16
                               text run at (0,-2) width 12: "+"
-                        RenderMathMLRoot {msqrt} at (28,0) size 143x55
-                          RenderMathMLRow {mrow} at (12,3) size 131x38
+                        RenderMathMLRoot {msqrt} at (28,0) size 142x55
+                          RenderMathMLRow {mrow} at (12,3) size 130x38
                             RenderMathMLToken {mn} at (0,8) size 9x13
                               RenderBlock (anonymous) at (0,0) size 9x13
                                 RenderText {#text} at (0,0) size 9x16
@@ -256,8 +256,8 @@
                               RenderBlock (anonymous) at (3,0) size 13x11
                                 RenderText {#text} at (0,-2) size 12x16
                                   text run at (0,-2) width 12: "+"
-                            RenderMathMLRoot {msqrt} at (28,0) size 103x37
-                              RenderMathMLRow {mrow} at (12,3) size 91x22
+                            RenderMathMLRoot {msqrt} at (28,0) size 102x37
+                              RenderMathMLRow {mrow} at (12,3) size 90x22
                                 RenderMathMLToken {mn} at (0,6) size 9x12
                                   RenderBlock (anonymous) at (0,0) size 9x12
                                     RenderText {#text} at (0,-1) size 9x16
@@ -266,8 +266,8 @@
                                   RenderBlock (anonymous) at (3,0) size 13x11
                                     RenderText {#text} at (0,-2) size 12x16
                                       text run at (0,-2) width 12: "+"
-                                RenderMathMLRoot {msqrt} at (28,0) size 63x21
-                                  RenderMathMLRow {mrow} at (12,3) size 51x17
+                                RenderMathMLRoot {msqrt} at (28,0) size 62x21
+                                  RenderMathMLRow {mrow} at (12,3) size 50x17
                                     RenderMathMLToken {mn} at (0,3) size 9x12
                                       RenderBlock (anonymous) at (0,0) size 9x12
                                         RenderText {#text} at (0,-1) size 9x16
@@ -276,106 +276,106 @@
                                       RenderBlock (anonymous) at (3,0) size 13x11
                                         RenderText {#text} at (0,-2) size 12x16
                                           text run at (0,-2) width 12: "+"
-                                    RenderMathMLRoot {msqrt} at (28,0) size 23x17
-                                      RenderMathMLToken {mi} at (11,3) size 12x13 [padding: 0 2 0 0]
+                                    RenderMathMLRoot {msqrt} at (28,0) size 22x17
+                                      RenderMathMLToken {mi} at (11,3) size 10x12 [padding: 0 2 0 0]
                                         RenderBlock (anonymous) at (0,0) size 10x12
                                           RenderText {#text} at (0,-1) size 10x16
                                             text run at (0,-1) width 10: "A"
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {p} at (0,451) size 784x100
-        RenderText {#text} at (0,32) size 110x18
-          text run at (0,32) width 110: "Imbricated roots: "
-        RenderMathMLMath {math} at (110,0) size 323x101
-          RenderMathMLRoot {mroot} at (0,0) size 323x101
-            RenderMathMLRow {mrow} at (11,3) size 312x98
-              RenderMathMLToken {mn} at (0,32) size 9x12
+      RenderBlock {p} at (0,449) size 784x100
+        RenderText {#text} at (0,31) size 110x18
+          text run at (0,31) width 110: "Imbricated roots: "
+        RenderMathMLMath {math} at (110,0) size 320x101
+          RenderMathMLRoot {mroot} at (0,0) size 320x101
+            RenderMathMLRow {mrow} at (11,3) size 309x98
+              RenderMathMLToken {mn} at (0,31) size 9x12
                 RenderBlock (anonymous) at (0,0) size 9x12
                   RenderText {#text} at (0,-1) size 9x16
                     text run at (0,-1) width 9: "1"
-              RenderMathMLOperator {mo} at (9,33) size 20x11
+              RenderMathMLOperator {mo} at (9,32) size 20x11
                 RenderBlock (anonymous) at (3,0) size 13x11
                   RenderText {#text} at (0,-2) size 12x16
                     text run at (0,-2) width 12: "+"
-              RenderMathMLRoot {mroot} at (28,0) size 284x98
-                RenderMathMLRow {mrow} at (11,3) size 273x95
-                  RenderMathMLToken {mn} at (0,29) size 9x12
+              RenderMathMLRoot {mroot} at (28,0) size 281x98
+                RenderMathMLRow {mrow} at (11,3) size 270x95
+                  RenderMathMLToken {mn} at (0,28) size 9x12
                     RenderBlock (anonymous) at (0,0) size 9x12
                       RenderText {#text} at (0,-1) size 9x16
                         text run at (0,-1) width 9: "2"
-                  RenderMathMLOperator {mo} at (9,30) size 20x11
+                  RenderMathMLOperator {mo} at (9,29) size 20x11
                     RenderBlock (anonymous) at (3,0) size 13x11
                       RenderText {#text} at (0,-2) size 12x16
                         text run at (0,-2) width 12: "+"
-                  RenderMathMLRoot {mroot} at (28,0) size 245x94
-                    RenderMathMLRow {mrow} at (11,3) size 234x91
-                      RenderMathMLToken {mn} at (0,26) size 9x12
+                  RenderMathMLRoot {mroot} at (28,0) size 242x94
+                    RenderMathMLRow {mrow} at (11,3) size 231x91
+                      RenderMathMLToken {mn} at (0,25) size 9x12
                         RenderBlock (anonymous) at (0,0) size 9x12
                           RenderText {#text} at (0,-1) size 9x16
                             text run at (0,-1) width 9: "3"
-                      RenderMathMLOperator {mo} at (9,27) size 20x11
+                      RenderMathMLOperator {mo} at (9,26) size 20x11
                         RenderBlock (anonymous) at (3,0) size 13x11
                           RenderText {#text} at (0,-2) size 12x16
                             text run at (0,-2) width 12: "+"
-                      RenderMathMLRoot {mroot} at (28,0) size 205x91
-                        RenderMathMLRow {mrow} at (13,3) size 192x73
-                          RenderMathMLToken {mn} at (0,23) size 9x12
+                      RenderMathMLRoot {mroot} at (28,0) size 203x91
+                        RenderMathMLRow {mrow} at (13,3) size 190x73
+                          RenderMathMLToken {mn} at (0,22) size 9x12
                             RenderBlock (anonymous) at (0,0) size 9x12
                               RenderText {#text} at (0,-1) size 9x16
                                 text run at (0,-1) width 9: "4"
-                          RenderMathMLOperator {mo} at (9,24) size 20x11
+                          RenderMathMLOperator {mo} at (9,23) size 20x11
                             RenderBlock (anonymous) at (3,0) size 13x11
                               RenderText {#text} at (0,-2) size 12x16
                                 text run at (0,-2) width 12: "+"
-                          RenderMathMLRoot {mroot} at (28,0) size 164x73
-                            RenderMathMLRow {mrow} at (13,3) size 151x55
-                              RenderMathMLToken {mn} at (0,19) size 9x13
+                          RenderMathMLRoot {mroot} at (28,0) size 162x73
+                            RenderMathMLRow {mrow} at (13,3) size 149x55
+                              RenderMathMLToken {mn} at (0,18) size 9x13
                                 RenderBlock (anonymous) at (0,0) size 9x13
                                   RenderText {#text} at (0,0) size 9x16
                                     text run at (0,0) width 9: "5"
-                              RenderMathMLOperator {mo} at (9,21) size 20x11
+                              RenderMathMLOperator {mo} at (9,20) size 20x11
                                 RenderBlock (anonymous) at (3,0) size 13x11
                                   RenderText {#text} at (0,-2) size 12x16
                                     text run at (0,-2) width 12: "+"
-                              RenderMathMLRoot {mroot} at (28,0) size 123x55
-                                RenderMathMLRow {mrow} at (13,3) size 110x38
-                                  RenderMathMLToken {mn} at (0,17) size 9x12
+                              RenderMathMLRoot {mroot} at (28,0) size 121x55
+                                RenderMathMLRow {mrow} at (13,3) size 108x38
+                                  RenderMathMLToken {mn} at (0,16) size 9x12
                                     RenderBlock (anonymous) at (0,0) size 9x12
                                       RenderText {#text} at (0,-1) size 9x16
                                         text run at (0,-1) width 9: "6"
-                                  RenderMathMLOperator {mo} at (9,18) size 20x11
+                                  RenderMathMLOperator {mo} at (9,17) size 20x11
                                     RenderBlock (anonymous) at (3,0) size 13x11
                                       RenderText {#text} at (0,-2) size 12x16
                                         text run at (0,-2) width 12: "+"
-                                  RenderMathMLRoot {mroot} at (28,0) size 82x37
-                                    RenderMathMLRow {mrow} at (13,3) size 69x28
-                                      RenderMathMLToken {mn} at (0,14) size 9x12
+                                  RenderMathMLRoot {mroot} at (28,0) size 80x37
+                                    RenderMathMLRow {mrow} at (13,3) size 67x27
+                                      RenderMathMLToken {mn} at (0,13) size 9x12
                                         RenderBlock (anonymous) at (0,0) size 9x12
                                           RenderText {#text} at (0,-1) size 9x16
                                             text run at (0,-1) width 9: "7"
-                                      RenderMathMLOperator {mo} at (9,15) size 20x11
+                                      RenderMathMLOperator {mo} at (9,14) size 20x11
                                         RenderBlock (anonymous) at (3,0) size 13x11
                                           RenderText {#text} at (0,-2) size 12x16
                                             text run at (0,-2) width 12: "+"
-                                      RenderMathMLRoot {mroot} at (28,0) size 41x27
-                                        RenderMathMLToken {mi} at (28,13) size 13x13 [padding: 0 2 0 0]
+                                      RenderMathMLRoot {mroot} at (28,0) size 39x27
+                                        RenderMathMLToken {mi} at (28,13) size 11x12 [padding: 0 2 0 0]
                                           RenderBlock (anonymous) at (0,0) size 10x12
                                             RenderText {#text} at (0,-1) size 10x16
                                               text run at (0,-1) width 10: "A"
                                         RenderMathMLFraction {mfrac} at (1,0) size 22x17
-                                          RenderMathMLRow {mrow} at (0,0) size 22x8
-                                            RenderMathMLToken {mi} at (0,1) size 5x6 [padding: 0 1 0 0]
+                                          RenderMathMLRow {mrow} at (0,0) size 21x9
+                                            RenderMathMLToken {mi} at (0,2) size 5x5 [padding: 0 1 0 0]
                                               RenderBlock (anonymous) at (0,0) size 4x6
                                                 RenderText {#text} at (0,-2) size 4x9
                                                   text run at (0,-2) width 4: "x"
-                                            RenderMathMLOperator {mo} at (4,0) size 12x7
+                                            RenderMathMLOperator {mo} at (5,0) size 11x7
                                               RenderBlock (anonymous) at (2,0) size 7x7
                                                 RenderText {#text} at (0,-1) size 7x9
                                                   text run at (0,-1) width 7: "+"
-                                            RenderMathMLToken {mi} at (15,1) size 7x7 [padding: 0 1 0 0]
+                                            RenderMathMLToken {mi} at (16,2) size 5x7 [padding: 0 1 0 0]
                                               RenderBlock (anonymous) at (0,0) size 5x7
                                                 RenderText {#text} at (0,-2) size 5x9
                                                   text run at (0,-2) width 5: "y"
-                                          RenderMathMLToken {mi} at (8,10) size 6x7 [padding: 0 1 0 0]
+                                          RenderMathMLToken {mi} at (8,12) size 5x5 [padding: 0 1 0 0]
                                             RenderBlock (anonymous) at (0,0) size 4x6
                                               RenderText {#text} at (0,-2) size 4x9
                                                 text run at (0,-2) width 4: "z"
@@ -408,128 +408,128 @@
                 RenderText {#text} at (0,0) size 5x9
                   text run at (0,0) width 5: "3"
         RenderText {#text} at (0,0) size 0x0
-      RenderBlock {p} at (0,567) size 784x100
-        RenderText {#text} at (0,32) size 74x18
-          text run at (0,32) width 74: "RTL roots: "
-        RenderMathMLMath {math} at (74,0) size 323x101
-          RenderMathMLRoot {mroot} at (0,0) size 323x101
-            RenderMathMLRow {mrow} at (0,3) size 312x98
-              RenderMathMLToken {mn} at (302,32) size 10x12
+      RenderBlock {p} at (0,565) size 784x100
+        RenderText {#text} at (0,31) size 74x18
+          text run at (0,31) width 74: "RTL roots: "
+        RenderMathMLMath {math} at (74,0) size 320x101
+          RenderMathMLRoot {mroot} at (0,0) size 320x101
+            RenderMathMLRow {mrow} at (0,3) size 309x98
+              RenderMathMLToken {mn} at (299,31) size 10x12
                 RenderBlock (anonymous) at (0,0) size 9x12
                   RenderText {#text} at (0,-1) size 9x16
                     text run at (0,-1) width 9: "1"
-              RenderMathMLOperator {mo} at (283,33) size 20x11
+              RenderMathMLOperator {mo} at (280,32) size 20x11
                 RenderBlock (anonymous) at (3,0) size 13x11
                   RenderText {#text} at (0,-2) size 12x16
                     text run at (0,-2) width 12 RTL: "+"
-              RenderMathMLRoot {mroot} at (0,0) size 284x98
-                RenderMathMLRow {mrow} at (0,3) size 273x95
-                  RenderMathMLToken {mn} at (263,29) size 10x12
+              RenderMathMLRoot {mroot} at (0,0) size 281x98
+                RenderMathMLRow {mrow} at (0,3) size 270x95
+                  RenderMathMLToken {mn} at (260,28) size 10x12
                     RenderBlock (anonymous) at (0,0) size 9x12
                       RenderText {#text} at (0,-1) size 9x16
                         text run at (0,-1) width 9: "2"
-                  RenderMathMLOperator {mo} at (244,30) size 20x11
+                  RenderMathMLOperator {mo} at (241,29) size 20x11
                     RenderBlock (anonymous) at (3,0) size 13x11
                       RenderText {#text} at (0,-2) size 12x16
                         text run at (0,-2) width 12 RTL: "+"
-                  RenderMathMLRoot {mroot} at (0,0) size 245x94
-                    RenderMathMLRow {mrow} at (0,3) size 233x91
-                      RenderMathMLToken {mn} at (224,26) size 9x12
+                  RenderMathMLRoot {mroot} at (0,0) size 242x94
+                    RenderMathMLRow {mrow} at (0,3) size 231x91
+                      RenderMathMLToken {mn} at (221,25) size 10x12
                         RenderBlock (anonymous) at (0,0) size 9x12
                           RenderText {#text} at (0,-1) size 9x16
                             text run at (0,-1) width 9: "3"
-                      RenderMathMLOperator {mo} at (204,27) size 20x11
+                      RenderMathMLOperator {mo} at (202,26) size 20x11
                         RenderBlock (anonymous) at (3,0) size 13x11
                           RenderText {#text} at (0,-2) size 12x16
                             text run at (0,-2) width 12 RTL: "+"
-                      RenderMathMLRoot {mroot} at (0,0) size 205x91
-                        RenderMathMLRow {mrow} at (0,3) size 192x73
-                          RenderMathMLToken {mn} at (182,23) size 10x12
+                      RenderMathMLRoot {mroot} at (0,0) size 203x91
+                        RenderMathMLRow {mrow} at (0,3) size 190x73
+                          RenderMathMLToken {mn} at (180,22) size 10x12
                             RenderBlock (anonymous) at (0,0) size 9x12
                               RenderText {#text} at (0,-1) size 9x16
                                 text run at (0,-1) width 9: "4"
-                          RenderMathMLOperator {mo} at (163,24) size 20x11
+                          RenderMathMLOperator {mo} at (161,23) size 20x11
                             RenderBlock (anonymous) at (3,0) size 13x11
                               RenderText {#text} at (0,-2) size 12x16
                                 text run at (0,-2) width 12 RTL: "+"
-                          RenderMathMLRoot {mroot} at (0,0) size 164x73
-                            RenderMathMLRow {mrow} at (0,3) size 151x55
-                              RenderMathMLToken {mn} at (141,19) size 10x13
+                          RenderMathMLRoot {mroot} at (0,0) size 162x73
+                            RenderMathMLRow {mrow} at (0,3) size 149x55
+                              RenderMathMLToken {mn} at (139,18) size 10x13
                                 RenderBlock (anonymous) at (0,0) size 9x13
                                   RenderText {#text} at (0,0) size 9x16
                                     text run at (0,0) width 9: "5"
-                              RenderMathMLOperator {mo} at (122,21) size 20x11
+                              RenderMathMLOperator {mo} at (120,20) size 20x11
                                 RenderBlock (anonymous) at (3,0) size 13x11
                                   RenderText {#text} at (0,-2) size 12x16
                                     text run at (0,-2) width 12 RTL: "+"
-                              RenderMathMLRoot {mroot} at (0,0) size 123x55
-                                RenderMathMLRow {mrow} at (0,3) size 110x38
-                                  RenderMathMLToken {mn} at (100,17) size 10x12
+                              RenderMathMLRoot {mroot} at (0,0) size 121x55
+                                RenderMathMLRow {mrow} at (0,3) size 108x38
+                                  RenderMathMLToken {mn} at (98,16) size 10x12
                                     RenderBlock (anonymous) at (0,0) size 9x12
                                       RenderText {#text} at (0,-1) size 9x16
                                         text run at (0,-1) width 9: "6"
-                                  RenderMathMLOperator {mo} at (81,18) size 20x11
+                                  RenderMathMLOperator {mo} at (79,17) size 20x11
                                     RenderBlock (anonymous) at (3,0) size 13x11
                                       RenderText {#text} at (0,-2) size 12x16
                                         text run at (0,-2) width 12 RTL: "+"
-                                  RenderMathMLRoot {mroot} at (0,0) size 82x37
-                                    RenderMathMLRow {mrow} at (0,3) size 69x28
-                                      RenderMathMLToken {mn} at (59,14) size 10x12
+                                  RenderMathMLRoot {mroot} at (0,0) size 80x37
+                                    RenderMathMLRow {mrow} at (0,3) size 67x27
+                                      RenderMathMLToken {mn} at (57,13) size 10x12
                                         RenderBlock (anonymous) at (0,0) size 9x12
                                           RenderText {#text} at (0,-1) size 9x16
                                             text run at (0,-1) width 9: "7"
-                                      RenderMathMLOperator {mo} at (40,15) size 20x11
+                                      RenderMathMLOperator {mo} at (38,14) size 20x11
                                         RenderBlock (anonymous) at (3,0) size 13x11
                                           RenderText {#text} at (0,-2) size 12x16
                                             text run at (0,-2) width 12 RTL: "+"
-                                      RenderMathMLRoot {mroot} at (0,0) size 41x27
-                                        RenderMathMLToken {mi} at (0,13) size 12x13 [padding: 0 0 0 2]
-                                          RenderBlock (anonymous) at (1,0) size 11x12
+                                      RenderMathMLRoot {mroot} at (0,0) size 39x27
+                                        RenderMathMLToken {mi} at (0,13) size 10x12 [padding: 0 0 0 2]
+                                          RenderBlock (anonymous) at (0,0) size 10x12
                                             RenderText {#text} at (0,-1) size 10x16
                                               text run at (0,-1) width 10: "A"
-                                        RenderMathMLFraction {mfrac} at (17,0) size 23x17
-                                          RenderMathMLRow {mrow} at (0,0) size 22x8
-                                            RenderMathMLToken {mi} at (16,1) size 6x6 [padding: 0 0 0 1]
-                                              RenderBlock (anonymous) at (0,0) size 5x6
+                                        RenderMathMLFraction {mfrac} at (16,0) size 21x17
+                                          RenderMathMLRow {mrow} at (0,0) size 21x9
+                                            RenderMathMLToken {mi} at (16,2) size 5x5 [padding: 0 0 0 1]
+                                              RenderBlock (anonymous) at (0,0) size 4x6
                                                 RenderText {#text} at (0,-2) size 4x9
                                                   text run at (0,-2) width 4: "x"
-                                            RenderMathMLOperator {mo} at (5,0) size 12x7
+                                            RenderMathMLOperator {mo} at (5,0) size 11x7
                                               RenderBlock (anonymous) at (2,0) size 7x7
                                                 RenderText {#text} at (0,-1) size 7x9
                                                   text run at (0,-1) width 7 RTL: "+"
-                                            RenderMathMLToken {mi} at (0,1) size 6x7 [padding: 0 0 0 1]
-                                              RenderBlock (anonymous) at (0,0) size 6x7
+                                            RenderMathMLToken {mi} at (0,2) size 5x7 [padding: 0 0 0 1]
+                                              RenderBlock (anonymous) at (0,0) size 5x7
                                                 RenderText {#text} at (0,-2) size 5x9
                                                   text run at (0,-2) width 5: "y"
-                                          RenderMathMLToken {mi} at (8,10) size 6x7 [padding: 0 0 0 1]
-                                            RenderBlock (anonymous) at (0,0) size 5x6
+                                          RenderMathMLToken {mi} at (8,12) size 5x5 [padding: 0 0 0 1]
+                                            RenderBlock (anonymous) at (0,0) size 4x6
                                               RenderText {#text} at (0,-2) size 4x9
                                                 text run at (0,-2) width 4: "z"
-                                    RenderMathMLToken {mn} at (75,5) size 6x9
+                                    RenderMathMLToken {mn} at (73,5) size 6x9
                                       RenderBlock (anonymous) at (0,0) size 5x8
                                         RenderText {#text} at (0,0) size 5x9
                                           text run at (0,0) width 5: "9"
-                                RenderMathMLToken {mn} at (116,11) size 6x9
+                                RenderMathMLToken {mn} at (114,11) size 6x9
                                   RenderBlock (anonymous) at (0,0) size 5x8
                                     RenderText {#text} at (0,0) size 5x9
                                       text run at (0,0) width 5: "8"
-                            RenderMathMLToken {mn} at (157,19) size 6x7
+                            RenderMathMLToken {mn} at (155,19) size 6x7
                               RenderBlock (anonymous) at (0,0) size 5x7
                                 RenderText {#text} at (0,-1) size 5x9
                                   text run at (0,-1) width 5: "7"
-                        RenderMathMLToken {mn} at (198,24) size 6x9
+                        RenderMathMLToken {mn} at (196,24) size 6x9
                           RenderBlock (anonymous) at (0,0) size 5x8
                             RenderText {#text} at (0,0) size 5x9
                               text run at (0,0) width 5: "6"
-                    RenderMathMLToken {mn} at (238,25) size 5x9
+                    RenderMathMLToken {mn} at (235,25) size 6x9
                       RenderBlock (anonymous) at (0,0) size 5x8
                         RenderText {#text} at (0,0) size 5x9
                           text run at (0,0) width 5: "5"
-                RenderMathMLToken {mn} at (277,26) size 6x9
+                RenderMathMLToken {mn} at (274,26) size 6x9
                   RenderBlock (anonymous) at (0,0) size 5x8
                     RenderText {#text} at (0,0) size 5x9
                       text run at (0,0) width 5: "4"
-            RenderMathMLToken {mn} at (316,27) size 6x9
+            RenderMathMLToken {mn} at (313,27) size 6x9
               RenderBlock (anonymous) at (0,0) size 5x8
                 RenderText {#text} at (0,0) size 5x9
                   text run at (0,0) width 5: "3"

Modified: trunk/Source/WebCore/ChangeLog (267007 => 267008)


--- trunk/Source/WebCore/ChangeLog	2020-09-14 00:00:42 UTC (rev 267007)
+++ trunk/Source/WebCore/ChangeLog	2020-09-14 08:17:03 UTC (rev 267008)
@@ -1,3 +1,21 @@
+2020-09-14  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        [Apple Win] Migrate from CGFontGetGlyphsForUnichars() to CTFontGetGlyphsForCharacters()
+        https://bugs.webkit.org/show_bug.cgi?id=216446
+
+        Reviewed by Darin Adler.
+
+        This patch is one of the steps to moving the Apple Win port from CGFont to CTFont.
+        This patch removes the #if !PLATFORM(WIN) guard from GlyphPageCoreText.cpp and deletes
+        the old functions it used to be using.
+
+        Covered by existing tests.
+
+        * PlatformAppleWin.cmake:
+        * platform/graphics/coretext/GlyphPageCoreText.cpp:
+        * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: Removed. There's nothing left in the
+          file.
+
 2020-09-13  Sam Weinig  <wei...@apple.com>
 
         [WebIDL] Remove need for [MayThrowException] on constructors and legacy factory functions

Modified: trunk/Source/WebCore/PlatformAppleWin.cmake (267007 => 267008)


--- trunk/Source/WebCore/PlatformAppleWin.cmake	2020-09-14 00:00:42 UTC (rev 267007)
+++ trunk/Source/WebCore/PlatformAppleWin.cmake	2020-09-14 08:17:03 UTC (rev 267008)
@@ -159,7 +159,6 @@
 
         platform/graphics/win/FontCGWin.cpp
         platform/graphics/win/FontPlatformDataCGWin.cpp
-        platform/graphics/win/GlyphPageTreeNodeCGWin.cpp
         platform/graphics/win/GraphicsContextCGWin.cpp
         platform/graphics/win/ImageCGWin.cpp
         platform/graphics/win/SimpleFontDataCGWin.cpp

Modified: trunk/Source/WebCore/platform/graphics/coretext/GlyphPageCoreText.cpp (267007 => 267008)


--- trunk/Source/WebCore/platform/graphics/coretext/GlyphPageCoreText.cpp	2020-09-14 00:00:42 UTC (rev 267007)
+++ trunk/Source/WebCore/platform/graphics/coretext/GlyphPageCoreText.cpp	2020-09-14 08:17:03 UTC (rev 267008)
@@ -41,8 +41,6 @@
 
 namespace WebCore {
 
-#if !PLATFORM(WIN)
-
 static bool shouldFillWithVerticalGlyphs(const UChar* buffer, unsigned bufferLength, const Font& font)
 {
     if (!font.hasVerticalGlyphs())
@@ -80,6 +78,4 @@
     return haveGlyphs;
 }
 
-#endif
-
 } // namespace WebCore

Deleted: trunk/Source/WebCore/platform/graphics/win/GlyphPageTreeNodeCGWin.cpp (267007 => 267008)


--- trunk/Source/WebCore/platform/graphics/win/GlyphPageTreeNodeCGWin.cpp	2020-09-14 00:00:42 UTC (rev 267007)
+++ trunk/Source/WebCore/platform/graphics/win/GlyphPageTreeNodeCGWin.cpp	2020-09-14 08:17:03 UTC (rev 267008)
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "GlyphPage.h"
-
-#if USE(CG)
-
-#include "Font.h"
-#include <pal/spi/cg/CoreGraphicsSPI.h>
-
-namespace WebCore {
-
-bool GlyphPage::fill(UChar* buffer, unsigned bufferLength)
-{
-    // bufferLength will be greater than the requested number of glyphs if the buffer contains surrogate pairs.
-    // We won't support this for now.
-    if (bufferLength > GlyphPage::size)
-        return false;
-
-    const Font& font = this->font();
-    bool haveGlyphs = false;
-    CGGlyph localGlyphBuffer[GlyphPage::size];
-    CGFontGetGlyphsForUnichars(font.platformData().cgFont(), reinterpret_cast<const UniChar*>(buffer), localGlyphBuffer, bufferLength);
-    for (unsigned i = 0; i < GlyphPage::size; i++) {
-        Glyph glyph = localGlyphBuffer[i];
-        if (!glyph)
-            setGlyphForIndex(i, 0);
-        else {
-            setGlyphForIndex(i, glyph);
-            haveGlyphs = true;
-        }
-    }
-    return haveGlyphs;
-}
-
-}
-
-#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to