Title: [267930] trunk
Revision
267930
Author
[email protected]
Date
2020-10-03 10:31:30 -0700 (Sat, 03 Oct 2020)

Log Message

[GPU Process] Support drawing text in 2D canvas with font features
https://bugs.webkit.org/show_bug.cgi?id=206118

Reviewed by Wenson Hsieh.

Source/WebCore:

This patch simply serializes all the non-derived data in Font and FontPlatformData.

Serializing a CTFont involves serializing its font descriptor's attributes. However,
there's an extra step for web fonts, since the font descriptor's attributes don't include
the raw bytes of the font file. This was previously being saved in Font, but this patch
moves that into FontPlatformData because of layering, and adds the SharedBuffer to the
serialization routine for web fonts.

Test: fast/canvas/fill-text-with-font-features.html

* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::font): Fonts and FontPlatformDatas are supposed to be immutable, so
having a setter for the FontFaceData is incorrect. This object is moved into the constructor
instead.
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font): Deleting dead code.
* platform/graphics/Font.cpp:
(WebCore::Font::setFontFaceData): Deleted.
* platform/graphics/Font.h:
(WebCore::Font::fontFaceData const): Deleted. Moved to FontPlatformData
* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::creationData const): Moved from Font.
* platform/graphics/coretext/FontPlatformDataCoreText.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): FontCustomPlatformData is a struct, so
there's no need for the m_ prefixes.
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/FontCustomPlatformData.h:
(WebCore::FontCustomPlatformData::FontCustomPlatformData): Ditto.

Source/WebKit:

Simply serialize and deserialize all the non-derived data in Font and PlatformFontData.

* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<Ref<Font>>::encodePlatformData):
(IPC::ArgumentCoder<Ref<Font>>::decodePlatformData):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Ref<Font>>::encode):
(IPC::ArgumentCoder<Ref<Font>>::decode):
* Shared/WebCoreArgumentCoders.h:

LayoutTests:

* fast/canvas/fill-text-with-font-features-expected.html: Added.
* fast/canvas/fill-text-with-font-features.html: Added.
* fast/canvas/resources/FontWithFeatures.ttf: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (267929 => 267930)


--- trunk/LayoutTests/ChangeLog	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/LayoutTests/ChangeLog	2020-10-03 17:31:30 UTC (rev 267930)
@@ -1,3 +1,14 @@
+2020-10-03  Myles C. Maxfield  <[email protected]>
+
+        [GPU Process] Support drawing text in 2D canvas with font features
+        https://bugs.webkit.org/show_bug.cgi?id=206118
+
+        Reviewed by Wenson Hsieh.
+
+        * fast/canvas/fill-text-with-font-features-expected.html: Added.
+        * fast/canvas/fill-text-with-font-features.html: Added.
+        * fast/canvas/resources/FontWithFeatures.ttf: Added.
+
 2020-10-02  Lauro Moura  <[email protected]>
 
         [GLIB] Gardening some failures and flakies

Added: trunk/LayoutTests/fast/canvas/fill-text-with-font-features-expected.html (0 => 267930)


--- trunk/LayoutTests/fast/canvas/fill-text-with-font-features-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/canvas/fill-text-with-font-features-expected.html	2020-10-03 17:31:30 UTC (rev 267930)
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+    font-family: "SpecialFont";
+    src: url("resources/FontWithFeatures.ttf") format("truetype");
+}
+</style>
+</head>
+<body>
+<p>You should see a row of 3 check marks followed by a row of 3 crosses below.</p>
+<canvas width="400" height="400"></canvas>
+<script>
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+addEventListener("load", async function() {
+    document.fonts.load("80px SpecialFont").then(function() {
+        const context = document.querySelector("canvas").getContext("2d");
+        context.font = "80px SpecialFont";
+        context.fillText("AAA", 100, 100);
+        context.fillText("BBB", 100, 200);
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }, function() {
+        if (window.testRunner)
+            testRunner.notifyDone();
+    });
+});
+</script>
+</body>
+</html>

Added: trunk/LayoutTests/fast/canvas/fill-text-with-font-features.html (0 => 267930)


--- trunk/LayoutTests/fast/canvas/fill-text-with-font-features.html	                        (rev 0)
+++ trunk/LayoutTests/fast/canvas/fill-text-with-font-features.html	2020-10-03 17:31:30 UTC (rev 267930)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+    font-family: "SpecialFont";
+    src: url("resources/FontWithFeatures.ttf") format("truetype");
+    font-feature-settings: "titl" 1;
+}
+</style>
+</head>
+<body>
+<p>You should see a row of 3 check marks followed by a row of 3 crosses below.</p>
+<canvas width="400" height="400"></canvas>
+<script>
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+addEventListener("load", async function() {
+    document.fonts.load("80px SpecialFont").then(function() {
+        const context = document.querySelector("canvas").getContext("2d");
+        context.font = "80px SpecialFont";
+        context.fillText("aaa", 100, 100);
+        context.fillText("ccc", 100, 200);
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }, function() {
+        if (window.testRunner)
+            testRunner.notifyDone();
+    });
+});
+</script>
+</body>
+</html>

Added: trunk/LayoutTests/fast/canvas/fill-text-with-font-variations-expected-mismatch.html (0 => 267930)


--- trunk/LayoutTests/fast/canvas/fill-text-with-font-variations-expected-mismatch.html	                        (rev 0)
+++ trunk/LayoutTests/fast/canvas/fill-text-with-font-variations-expected-mismatch.html	2020-10-03 17:31:30 UTC (rev 267930)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+    font-family: "SpecialFont";
+    src: local("Skia");
+}
+</style>
+</head>
+<body>
+<canvas width="400" height="400"></canvas>
+<script>
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+addEventListener("load", async function() {
+    document.fonts.load("80px SpecialFont").then(function() {
+        const context = document.querySelector("canvas").getContext("2d");
+        context.font = "80px SpecialFont";
+        context.fillText("aaa", 100, 100);
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }, function() {
+        if (window.testRunner)
+            testRunner.notifyDone();
+    });
+});
+</script>
+</body>
+</html>

Added: trunk/LayoutTests/fast/canvas/fill-text-with-font-variations.html (0 => 267930)


--- trunk/LayoutTests/fast/canvas/fill-text-with-font-variations.html	                        (rev 0)
+++ trunk/LayoutTests/fast/canvas/fill-text-with-font-variations.html	2020-10-03 17:31:30 UTC (rev 267930)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+    font-family: "SpecialFont";
+    src: local("Skia");
+    font-weight: 700 800;
+}
+</style>
+</head>
+<body>
+<canvas width="400" height="400"></canvas>
+<script>
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+let canvas = document.querySelector("canvas")
+addEventListener("load", async function() {
+    document.fonts.load("80px SpecialFont").then(function() {
+        const context = canvas.getContext("2d");
+        context.font = "80px SpecialFont";
+        context.fillText("aaa", 100, 100);
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }, function() {
+        let textNode = document.createTextNode("Skia does not exist.");
+        document.body.insertBefore(textNode, canvas);
+        if (window.testRunner)
+            testRunner.notifyDone();
+    });
+});
+</script>
+</body>
+</html>

Added: trunk/LayoutTests/fast/canvas/resources/FontWithFeatures.ttf (0 => 267930)


--- trunk/LayoutTests/fast/canvas/resources/FontWithFeatures.ttf	                        (rev 0)
+++ trunk/LayoutTests/fast/canvas/resources/FontWithFeatures.ttf	2020-10-03 17:31:30 UTC (rev 267930)
@@ -0,0 +1,24 @@
+true����\x80����@OS/2H\xE0Yb������\xCC������dcmap��\xD5\xAF����0������jfeat\xA7Rp����\x9C����lglyf\xC8(\xD5\xC3��������headeD\xF9���� ������6hheag��7����X������$hmtx\xD4��\x86����|������\xD4loca��\xAB9����P������\xD8maxp��k��������(������ morx\xC9B����H����@nameل/\xF4����!\x88����|post����������0������ ����\xF4������������������������������������������������������������������������������������������������������TKBW��������\xFF\xFF������f������\xFF\xFC����\xFF\xFF���������� ����\xFF\xFF����������������������������D����
+������������������(��������������������A������Z������������a������z����������&��������������Z��z\xFF\xFF������A��a\xFF\xFF\xFF\xDA\xFF\xA0��������������������������������������	������\xB4������$��������\xD8����
+��
+��������\xE0\x80��+��%��������\xF0\x80����&��������\xFC\x80����������\x80����������\x80����������\x80����������$\x80��#��������0\x80��'��������<����,��������@\x80��/��������\\x80��7��������h����;����������������	��.��������c������+��c������c������c����c����c ��!����"��c$��%����&��c(��)��*��-��c0��1��2��3��4��5����6��c8��9����:��<����\xC8��\xC8  ��������\xC8����X����\xFD\xA8��\xC8X����\xFD\xA8��������\xC8��\xC8\xB6\xBC��������\xC8��2��\xFA\x90��2\xFE>\xFE\xD4\xF4��2\xFF\x90\xFF\xCE\xFE>,����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\
 xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\
 xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFE
 p\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF
 \xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x9
 0\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFE
 p��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x9
 0&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90
 ��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\x
 FF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2
 \xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\
 xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6����
 ��\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xF
 Ep��2\x90\x90��2\xFEp����2��2\xB6\xB6������
 \xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x9
 0��2\xFEp����2��2\xB6\xB6������\xF4\x90��2
 \xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp����2��2\xB6\xB6������\xF4\x90��2\xFEp\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90&\x90\xFF\xCE\xFEp\xFEp\xFF\xCE\x90\xFEp��2\x90\x90��2\xFEp�����
 �������������\xE5\xD7з_<\xF5��������������������������������������������
 ����������������������������������f����������������������������������������������5����\xC8����\xC8����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2����2��������������'������X������\xA7������\xF6����E����\x94����\xE3����2����\x81����\xD0��������n����\xBD��������[����\xAA����\xF9����H����\x97����\xE6����5����\x84����\xD3����"����q����\xC0��������^����\xAD����\xFC����	K����	\x9A����	\xE9����
+8����
+\x87����
+\xD6����%����t����\xC3��������a����\xB0����\xFF����+N����+\x9D����+\xEC����;����\x8A����\xD9����(����w����\xC6������������5\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF����������������������������5����������������.��������������D����������������������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D����������������������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D����������������������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D����������������������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D����������������������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D����������������������\xFF\xFF\xFF\xFF���������������������������������������������������������������������
 �����D����������������������\xFF\xFF\xFF\xFF����������������������������������������������������������	����������������D����������������������\xFF\xFF\xFF\xFF����������������������������������������������������������
+����������������D����������������������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D��������������$����������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D��������������$��������\xFF\xFF\xFF\xFF����������������������������������������������������������+��������������D��������������
+��c������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D��������������
+��������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D��������������
+��������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D��������������
+��������\xFF\xFF\xFF\xFF������������������������������������������������������������������������D��������������%��c������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D��������������%��������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D��������������%��������\xFF\xFF\xFF\xFF������������������������������������������������������������������������D��������������&��c������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D��������������&��������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D��������������&��������\xFF\xFF\xFF\xFF������������������������������������������������������������������������D����������������c������\xFF\xFF\xFF\xFF����������������������������������������������������������
 ����������������D����������������������\xFF\xFF\xFF\xFF������������������������������������������������������������������������D����������������c������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D����������������������\xFF\xFF\xFF\xFF������������������������������������������������������������������������D����������������c������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D����������������������\xFF\xFF\xFF\xFF������
 ��������������������������������������������������������������������D������������������������\xFF\xFF\xFF\xFF������������������������������������������������������������������������D����������������c������\xFF\xFF\xFF\xFF��������������������������������������������������������������������������D����������������������\xFF\xFF\xFF\xFF���������������������������������������������������������� ����������������D������������������������\xFF\xFF\xFF\xFF����������������������������������������������������������!��������������D����������������c������\xFF\xFF\xFF\xFF����������������������������������������������������������"����������������D����������������������\xFF\xFF\xFF\xFF����������������������������������������������������������#����������������D����������������������\xFF\xFF\xFF\xFF����������������������������������������������������������$����������������D��������������
 ��������\xFF\xFF\xFF\xFF����������������������������������������������������������%��������������D����������������c������\xFF\xFF\xFF\xFF����������������������������������������������������������&����������������D����������������������\xFF\xFF\xFF\xFF����������������������������������������������������������'����������������D����������������������\xFF\xFF\xFF\xFF����������������������������������������������������������(����������������D����������������������\xFF\xFF\xFF\xFF������������������������������������������������
 ����������)����������������D����������������������\xFF\xFF\xFF\xFF����������������������������������������������������������*����������������D����������������������\xFF\xFF\xFF\xFF����������������������������������������������������������+����������������D������������������������\xFF\xFF\xFF\xFF����������������������������������������������������������,��������������D����������������c������\xFF\xFF\xFF\xFF����������������������������������������������������������-����������������D����������������������\xFF\xFF\xFF\xFF����������������������������������������������������������.����������������D������������������������\xFF\xFF\xFF\xFF����������������������������������������������������������/����������������D����������������������\xFF\xFF\xFF\xFF����������������������������������������������������������0��������B��������������&������������������&��&��������������&��
 L��������������&��r����������������\x98��������������&��\x9E��������������\xC4������������4��\xE0������������<������������6P������������>\x86������������0\xC4������������2\xF4������������<&����������	��>b����������.��<\xA0����������
+��2\xDC������������>������������@L����������+��*\x8C������������*\xB6������������$\xE0������������$����������+��"(������������J������������*f������������6\x90������������8\xC6������������\xFE������������*������������6D������������8z������������\xB2������������*\xD0������������\xFA������������"\xFE������������* ������������(J������������r���������� ��*\x90����������!��2\xBA����������"��2\xEC����������#��$����������$��*B����������%��8l����������&��4\xA4����������'��\xD8����������(��*\xF4����������)��4����������*��4R����������,��,\x86����������-��,\xB2����������/��&\xDE����������0��*	����������1��4	.����������2��4	b����������3��4	\x96����������4��4	\xCA����������5��:	\xFE����������6��<
+8����������7�� 
+t����������8��*
+\x94����������9��.
+\xBE����������:��2
+\xEC����������;������������<��&8��F��o��n��t��W��i��t��h��F��e��a��t��u��r��e��s��T��T��F��F��o��n��t��W��i��t��h��F��e��a��t��u��r��e��s��T��T��F��F��o��n��t��W��i��t��h��F��e��a��t��u��r��e��s��T��T��F��F��o��n��t��W��i��t��h��F��e��a��t��u��r��e��s��T��T��F��1��.��0��F��o��n��t��W��i��t��h��F��e��a��t��u��r��e��s��T��T��F��k��L��i��g��a��t��u��r��e��s��T��y��p��e��k��C��o��m��m��o��n��L��i��g��a��t��u��r��e��s��O��n��S��e��l��e��c��t��o��r��k��C��o��n��t��e��x��t��u��a��l��L��i��g��a��t��u��r��e��s��O��n��S��e��l��e��c��t��o��r��k��C��o��m��m��o��n��L��i��g��a��t��u��r��e��s��O��f��f��S��e��l��e��c��t��o��r��k��C��o��n��t��e��x��t��u��a��l��L��i��g��a��t��u��r��e��s��O��f��f��S��e��l��e��c��t��o��r��k��R��a��r��e��L��i��g��a��t��u��r��e��s��O��n��S��e��l��e��c��t��o��r��k��R��a��r��e��L��i��g��a��t��u��r��e��s��O��f��f��S��e��l��e��c��t��o��r��k��H��i��s��t��o��r��i��c��a��l��L��i��g��a��t��u��r��e��s��O��n��S��e��l��e��c��t��o��r��k��H��i��s��t��o��r��i��c��a��l��
 L��i��g��a��t��u��r��e��s��O��f��f��S��e��l��e��c��t��o��r��k��H��i��s��t��o��r��i��c��a��l��L��i��g��a��t��u��r��e��s��O��n��S��e��l��e��c��t��o��r��k��C��o��n��t��e��x��t��u��a��l��A��l��t��e��r��n��a��t��e��s��T��y��p��e��k��C��o��n��t��e��x��t��u��a��l��A��l��t��e��r��n��a��t��e��s��O��n��S��e��l��e��c��t��o��r��k��C��o��n��t��e��x��t��u��a��l��A��l��t��e��r��n��a��t��e��s��O��f��f��S��e��l��e��c��t��o��r��k��V��e��r��t��i��c��a��l��P��o��s��i��t��i��o��n��T��y��p��e��d��e��f��a��u��l
 ��t��U��n��u��s��e��d��S��e��l��e��c��t��o��r��k��I��n��f��e��r��i��o��r��s��S��e��l��e��c��t��o��r��k��S��u��p��e��r��i��o��r��s��S��e��l��e��c��t��o��r��k��O��r��d��i��n��a��l��s��S��e��l��e��c��t��o��r��k��L��o��w��e��r��C��a��s��e��T��y��p��e��d��e��f��a��u��l��t��U��n��u��s��e��d��S��e��l��e��c��t��o��r��k��L��o��w��e��r��C��a��s��e��S��m��a��l��l��C��a��p��s��S��e��l��e��c��t��o��r��k��L��o��w��e��r��C��a��s��e��P��e��t��i��t��e��C��a��p��s��S��e��l��e��c��t��o��r��k��U��p��p��e��r��C��a��s��e��T��y��p��e��d��e��f��a��u��l��t��U��n��u��s��e��d��S��e��l��e��c��t��o��r��k��U��p��p��e��r��C��a��s��e��S��m��a��l��l��C��a��p��s��S��e��l��e��c��t��o��r��k��U��p��p��e��r��C��a��s��e��P��e��t��i��t��e��C��a��p��s��S��e��l��e��c��t��o��r��k��L��e��t��t��e��r��C��a��s��e��T��y��p��e��d��e��f��a��u��l��t��U��n��u��s��e��d��S��e��l��e��c��t��o��r��1��4��k��S��t��y��l��e��O��p��t��i��o��n��s��T��y��p��e��d��e��f��a��u��l��t��U��n��u��s��e��d��S��e��l��e��c��t��o��r��k��T��i��t��l��i��n��g�
 �C��a��p��s��S��e��l��e��c��t��o��r��k��N��u��m��b��e��r��C��a��s��e��T��y��p��e��d��e��f��a��u��l��t��U��n��u��s��e��d��S��e��l��e��c��t��o��r��k��U��p��p��e��r��C��a��s��e��N��u��m��b��e��r��s��S��e��l��e��c��t��o��r��k��L��o��w��e��r��C��a��s��e��N��u��m��b��e��r��s��S��e��l��e��c��t��o��r��k��N��u��m��b��e��r��S��p��a��c��i��n��g��T��y��p��e��d��e��f��a��u��l��t��U��n��u��s��e��d��S��e��l��e��c��t��o��r��k��P��r��o��p��o��r��t��i��o��n��a��l��N��u��m��b��e��r��s��S��e��l��e��c��t��o��r��k��
 M��o��n��o��s��p��a��c��e��d��N��u��m��b��e��r��s��S��e��l��e��c��t��o��r��k��F��r��a��c��t��i��o��n��s��T��y��p��e��d��e��f��a��u��l��t��U��n��u��s��e��d��S��e��l��e��c��t��o��r��k��D��i��a��g��o��n��a��l��F��r��a��c��t��i��o��n��s��S��e��l��e��c��t��o��r��k��V��e��r��t��i��c��a��l��F��r��a��c��t��i��o��n��s��S��e��l��e��c��t��o��r��k��T��y��p��o��g��r��a��p��h��i��c��E��x��t��r��a��s��T��y��p��e��k��S��l��a��s��h��e��d��Z��e��r��o��O��n��S��e��l��e��c��t��o��r��k��C��h��a��r��a��c��t��e��r��S��h��a��p��e��T��y��p��e��d��e��f��a��u��l��t��U��n��u��s��e��d��S��e��l��e��c��t��o��r��k��J��I��S��1��9��7��8��C��h��a��r��a��c��t��e��r��s��S��e��l��e��c��t��o��r��k��J��I��S��1��9��8��3��C��h��a��r��a��c��t��e��r��s��S��e��l��e��c��t��o��r��k��J��I��S��1��9��9��0��C��h��a��r��a��c��t��e��r��s��S��e��l��e��c��t��o��r��k��J��I��S��2��0��0��4��C��h��a��r��a��c��t��e��r��s��S��e��l��e��c��t��o��r��k��S��i��m��p��l��i��f��i��e��d��C��h��a��r��a��c��t��e��r��s��S��e��l��e��c��t��o��r��k��T��r��a
 ��d��i��t��i��o��n��a��l��C��h��a��r��a��c��t��e��r��s��S��e��l��e��c��t��o��r��k��T��e��x��t��S��p��a��c��i��n��g��T��y��p��e��d��e��f��a��u��l��t��U��n��u��s��e��d��S��e��l��e��c��t��o��r��k��M��o��n��o��s��p��a��c��e��d��T��e��x��t��S��e��l��e��c��t��o��r��k��P��r��o��p��o��r��t��i��o��n��a��l��T��e��x��t��S��e��l��e��c��t��o��r��k��R��u��b��y��K��a��n��a��T��y��p��e��k��R��u��b��y��K��a��n��a��O��n��S��e��l��e��c��t��o��r��������������������������������������������������������������
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (267929 => 267930)


--- trunk/Source/WebCore/ChangeLog	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/ChangeLog	2020-10-03 17:31:30 UTC (rev 267930)
@@ -1,3 +1,44 @@
+2020-10-03  Myles C. Maxfield  <[email protected]>
+
+        [GPU Process] Support drawing text in 2D canvas with font features
+        https://bugs.webkit.org/show_bug.cgi?id=206118
+
+        Reviewed by Wenson Hsieh.
+
+        This patch simply serializes all the non-derived data in Font and FontPlatformData.
+
+        Serializing a CTFont involves serializing its font descriptor's attributes. However,
+        there's an extra step for web fonts, since the font descriptor's attributes don't include
+        the raw bytes of the font file. This was previously being saved in Font, but this patch
+        moves that into FontPlatformData because of layering, and adds the SharedBuffer to the
+        serialization routine for web fonts.
+
+        Test: fast/canvas/fill-text-with-font-features.html
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSFontFace.cpp:
+        (WebCore::CSSFontFace::font): Fonts and FontPlatformDatas are supposed to be immutable, so
+        having a setter for the FontFaceData is incorrect. This object is moved into the constructor
+        instead.
+        * css/CSSFontFaceSource.cpp:
+        (WebCore::CSSFontFaceSource::font): Deleting dead code.
+        * platform/graphics/Font.cpp:
+        (WebCore::Font::setFontFaceData): Deleted.
+        * platform/graphics/Font.h:
+        (WebCore::Font::fontFaceData const): Deleted. Moved to FontPlatformData
+        * platform/graphics/FontPlatformData.cpp:
+        (WebCore::FontPlatformData::FontPlatformData):
+        * platform/graphics/FontPlatformData.h:
+        (WebCore::FontPlatformData::creationData const): Moved from Font.
+        * platform/graphics/coretext/FontPlatformDataCoreText.cpp:
+        (WebCore::FontPlatformData::FontPlatformData):
+        * platform/graphics/mac/FontCustomPlatformData.cpp:
+        (WebCore::FontCustomPlatformData::fontPlatformData): FontCustomPlatformData is a struct, so
+        there's no need for the m_ prefixes.
+        (WebCore::createFontCustomPlatformData):
+        * platform/graphics/mac/FontCustomPlatformData.h:
+        (WebCore::FontCustomPlatformData::FontCustomPlatformData): Ditto.
+
 2020-10-03  Sam Weinig  <[email protected]>
 
         Simplify and harden idl_files.tmp generation

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (267929 => 267930)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-10-03 17:31:30 UTC (rev 267930)
@@ -3666,7 +3666,7 @@
 		B2A1F2AB0CEF0ABF00442F6A /* SVGFontElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A1F2A20CEF0ABF00442F6A /* SVGFontElement.h */; };
 		B2A1F2AE0CEF0ABF00442F6A /* SVGGlyphElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A1F2A50CEF0ABF00442F6A /* SVGGlyphElement.h */; };
 		B2A1F2B10CEF0ABF00442F6A /* SVGMissingGlyphElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A1F2A80CEF0ABF00442F6A /* SVGMissingGlyphElement.h */; };
-		B2AFFC7E0D00A5C10030074D /* FontCustomPlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2AFFC760D00A5C10030074D /* FontCustomPlatformData.h */; };
+		B2AFFC7E0D00A5C10030074D /* FontCustomPlatformData.h in Headers */ = {isa = PBXBuildFile; fileRef = B2AFFC760D00A5C10030074D /* FontCustomPlatformData.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B2B1F7170D00CAA8004AEA64 /* PointerEventsHitRules.h in Headers */ = {isa = PBXBuildFile; fileRef = B2B1F7150D00CAA8004AEA64 /* PointerEventsHitRules.h */; };
 		B2C3DA240D006C1D00EF6F26 /* BidiContext.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3D9F30D006C1D00EF6F26 /* BidiContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B2C3DA250D006C1D00EF6F26 /* BidiResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3D9F40D006C1D00EF6F26 /* BidiResolver.h */; settings = {ATTRIBUTES = (Private, ); }; };

Modified: trunk/Source/WebCore/css/CSSFontFace.cpp (267929 => 267930)


--- trunk/Source/WebCore/css/CSSFontFace.cpp	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/css/CSSFontFace.cpp	2020-10-03 17:31:30 UTC (rev 267930)
@@ -678,11 +678,8 @@
             return Font::create(FontCache::singleton().lastResortFallbackFont(fontDescription)->platformData(), Font::Origin::Local, Font::Interstitial::Yes, visibility);
         }
         case CSSFontFaceSource::Status::Success:
-            if (auto result = source->font(fontDescription, syntheticBold, syntheticItalic, m_featureSettings, m_fontSelectionCapabilities)) {
-                auto* cachedFont = source->cachedFont();
-                result->setFontFaceData(cachedFont ? cachedFont->resourceBuffer() : nullptr);
+            if (auto result = source->font(fontDescription, syntheticBold, syntheticItalic, m_featureSettings, m_fontSelectionCapabilities))
                 return result;
-            }
             break;
         case CSSFontFaceSource::Status::Failure:
             break;

Modified: trunk/Source/WebCore/css/CSSFontFaceSource.cpp (267929 => 267930)


--- trunk/Source/WebCore/css/CSSFontFaceSource.cpp	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/css/CSSFontFaceSource.cpp	2020-10-03 17:31:30 UTC (rev 267930)
@@ -212,9 +212,6 @@
     if (!m_inDocumentCustomPlatformData)
         return nullptr;
     return Font::create(m_inDocumentCustomPlatformData->fontPlatformData(fontDescription, syntheticBold, syntheticItalic, fontFaceFeatures, fontFaceCapabilities), Font::Origin::Remote);
-
-    ASSERT_NOT_REACHED();
-    return nullptr;
 }
 
 bool CSSFontFaceSource::isSVGFontFaceSource() const

Modified: trunk/Source/WebCore/platform/graphics/Font.cpp (267929 => 267930)


--- trunk/Source/WebCore/platform/graphics/Font.cpp	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/platform/graphics/Font.cpp	2020-10-03 17:31:30 UTC (rev 267930)
@@ -715,9 +715,4 @@
     return *m_glyphPathMap.existingMetricsForGlyph(glyph);
 }
 
-void Font::setFontFaceData(RefPtr<SharedBuffer>&& fontFaceData)
-{
-    m_fontFaceData = WTFMove(fontFaceData);
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/graphics/Font.h (267929 => 267930)


--- trunk/Source/WebCore/platform/graphics/Font.h	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/platform/graphics/Font.h	2020-10-03 17:31:30 UTC (rev 267930)
@@ -223,9 +223,6 @@
     static float ascentConsideringMacAscentHack(const WCHAR*, float ascent, float descent);
 #endif
 
-    SharedBuffer* fontFaceData() const { return m_fontFaceData.get(); }
-    void setFontFaceData(RefPtr<SharedBuffer>&&);
-
 private:
     WEBCORE_EXPORT Font(const FontPlatformData&, Origin, Interstitial, Visibility, OrientationFallback);
 
@@ -297,8 +294,6 @@
     mutable SCRIPT_FONTPROPERTIES* m_scriptFontProperties;
 #endif
 
-    RefPtr<SharedBuffer> m_fontFaceData;
-
     Glyph m_spaceGlyph { 0 };
     Glyph m_zeroGlyph { 0 };
     Glyph m_zeroWidthSpaceGlyph { 0 };
@@ -327,6 +322,8 @@
 #if PLATFORM(IOS_FAMILY)
     unsigned m_shouldNotBeUsedForArabic : 1;
 #endif
+
+    // Adding any non-derived information to Font needs a parallel change in WebCoreArgumentCoders.cpp.
 };
 
 #if PLATFORM(IOS_FAMILY)
@@ -382,4 +379,37 @@
 
 } // namespace WebCore
 
+namespace WTF {
+
+template<> struct EnumTraits<WebCore::Font::Origin> {
+    using values = EnumValues<
+        WebCore::Font::Origin,
+        WebCore::Font::Origin::Remote,
+        WebCore::Font::Origin::Local
+    >;
+};
+template<> struct EnumTraits<WebCore::Font::Interstitial> {
+    using values = EnumValues<
+        WebCore::Font::Interstitial,
+        WebCore::Font::Interstitial::Yes,
+        WebCore::Font::Interstitial::No
+    >;
+};
+template<> struct EnumTraits<WebCore::Font::Visibility> {
+    using values = EnumValues<
+        WebCore::Font::Visibility,
+        WebCore::Font::Visibility::Visible,
+        WebCore::Font::Visibility::Invisible
+    >;
+};
+template<> struct EnumTraits<WebCore::Font::OrientationFallback> {
+    using values = EnumValues<
+        WebCore::Font::OrientationFallback,
+        WebCore::Font::OrientationFallback::Yes,
+        WebCore::Font::OrientationFallback::No
+    >;
+};
+
+}
+
 #endif // Font_h

Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp (267929 => 267930)


--- trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp	2020-10-03 17:31:30 UTC (rev 267930)
@@ -46,7 +46,7 @@
 {
 }
 
-FontPlatformData::FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant, TextRenderingMode textRenderingMode)
+FontPlatformData::FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant, TextRenderingMode textRenderingMode, CreationData* creationData)
     : m_size(size)
     , m_orientation(orientation)
     , m_widthVariant(widthVariant)
@@ -54,6 +54,8 @@
     , m_syntheticBold(syntheticBold)
     , m_syntheticOblique(syntheticOblique)
 {
+    if (creationData)
+        m_creationData = *creationData;
 }
 
 #if !USE(FREETYPE)

Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.h (267929 => 267930)


--- trunk/Source/WebCore/platform/graphics/FontPlatformData.h	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.h	2020-10-03 17:31:30 UTC (rev 267930)
@@ -24,11 +24,11 @@
 
 #pragma once
 
+#include "SharedBuffer.h"
 #include "TextFlags.h"
 #include <wtf/Forward.h>
 #include <wtf/RetainPtr.h>
 
-
 #if PLATFORM(WIN)
 #include "COMPtr.h"
 #include "SharedGDIObject.h"
@@ -77,13 +77,15 @@
 class FontPlatformData {
     WTF_MAKE_FAST_ALLOCATED;
 public:
+    struct CreationData;
+
     FontPlatformData(WTF::HashTableDeletedValueType);
     FontPlatformData();
 
-    FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation = FontOrientation::Horizontal, FontWidthVariant = FontWidthVariant::RegularWidth, TextRenderingMode = TextRenderingMode::AutoTextRendering);
+    FontPlatformData(float size, bool syntheticBold, bool syntheticOblique, FontOrientation = FontOrientation::Horizontal, FontWidthVariant = FontWidthVariant::RegularWidth, TextRenderingMode = TextRenderingMode::AutoTextRendering, CreationData* = nullptr);
 
 #if USE(CORE_TEXT)
-    WEBCORE_EXPORT FontPlatformData(CTFontRef, float size, bool syntheticBold = false, bool syntheticOblique = false, FontOrientation = FontOrientation::Horizontal, FontWidthVariant = FontWidthVariant::RegularWidth, TextRenderingMode = TextRenderingMode::AutoTextRendering);
+    WEBCORE_EXPORT FontPlatformData(CTFontRef, float size, bool syntheticBold = false, bool syntheticOblique = false, FontOrientation = FontOrientation::Horizontal, FontWidthVariant = FontWidthVariant::RegularWidth, TextRenderingMode = TextRenderingMode::AutoTextRendering, CreationData* = nullptr);
 #endif
 
 #if PLATFORM(WIN)
@@ -199,6 +201,16 @@
 
     String description() const;
 
+    struct CreationData {
+        Ref<SharedBuffer> fontFaceData;
+        String itemInCollection;
+    };
+
+    const Optional<CreationData>& creationData() const
+    {
+        return m_creationData;
+    }
+
 private:
     bool platformIsEqual(const FontPlatformData&) const;
 
@@ -245,6 +257,8 @@
     FontWidthVariant m_widthVariant { FontWidthVariant::RegularWidth };
     TextRenderingMode m_textRenderingMode { TextRenderingMode::AutoTextRendering };
 
+    Optional<CreationData> m_creationData;
+
     bool m_syntheticBold { false };
     bool m_syntheticOblique { false };
     bool m_isColorBitmapFont { false };
@@ -264,6 +278,8 @@
 #if USE(FREETYPE)
     bool m_fixedWidth { false };
 #endif
+
+    // Adding any non-derived information to FontPlatformData needs a parallel change in WebCoreArgumentCodersCocoa.cpp.
 };
 
 #if USE(CORE_TEXT)

Modified: trunk/Source/WebCore/platform/graphics/coretext/FontPlatformDataCoreText.cpp (267929 => 267930)


--- trunk/Source/WebCore/platform/graphics/coretext/FontPlatformDataCoreText.cpp	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/platform/graphics/coretext/FontPlatformDataCoreText.cpp	2020-10-03 17:31:30 UTC (rev 267930)
@@ -35,8 +35,8 @@
 
 namespace WebCore {
 
-FontPlatformData::FontPlatformData(CTFontRef font, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant, TextRenderingMode textRenderingMode)
-    : FontPlatformData(size, syntheticBold, syntheticOblique, orientation, widthVariant, textRenderingMode)
+FontPlatformData::FontPlatformData(CTFontRef font, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation, FontWidthVariant widthVariant, TextRenderingMode textRenderingMode, CreationData* creationData)
+    : FontPlatformData(size, syntheticBold, syntheticOblique, orientation, widthVariant, textRenderingMode, creationData)
 {
     ASSERT_ARG(font, font);
 #if PLATFORM(WIN)

Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp (267929 => 267930)


--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp	2020-10-03 17:31:30 UTC (rev 267930)
@@ -39,7 +39,7 @@
 {
     auto attributes = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
     addAttributesForWebFonts(attributes.get(), fontDescription.shouldAllowUserInstalledFonts());
-    auto modifiedFontDescriptor = adoptCF(CTFontDescriptorCreateCopyWithAttributes(m_fontDescriptor.get(), attributes.get()));
+    auto modifiedFontDescriptor = adoptCF(CTFontDescriptorCreateCopyWithAttributes(fontDescriptor.get(), attributes.get()));
     ASSERT(modifiedFontDescriptor);
 
     int size = fontDescription.computedPixelSize();
@@ -48,7 +48,7 @@
     auto font = adoptCF(CTFontCreateWithFontDescriptor(modifiedFontDescriptor.get(), size, nullptr));
     font = preparePlatformFont(font.get(), fontDescription, &fontFaceFeatures, fontFaceCapabilities);
     ASSERT(font);
-    return FontPlatformData(font.get(), size, bold, italic, orientation, widthVariant, fontDescription.textRenderingMode());
+    return FontPlatformData(font.get(), size, bold, italic, orientation, widthVariant, fontDescription.textRenderingMode(), &creationData);
 }
 
 std::unique_ptr<FontCustomPlatformData> createFontCustomPlatformData(SharedBuffer& buffer, const String& itemInCollection)
@@ -85,7 +85,8 @@
         return nullptr;
 #endif
 
-    return makeUnique<FontCustomPlatformData>(fontDescriptor.get());
+    FontPlatformData::CreationData creationData = { buffer, itemInCollection };
+    return makeUnique<FontCustomPlatformData>(fontDescriptor.get(), WTFMove(creationData));
 }
 
 bool FontCustomPlatformData::supportsFormat(const String& format)

Modified: trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h (267929 => 267930)


--- trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h	2020-10-03 17:31:30 UTC (rev 267930)
@@ -21,6 +21,7 @@
 #ifndef FontCustomPlatformData_h
 #define FontCustomPlatformData_h
 
+#include "FontPlatformData.h"
 #include "TextFlags.h"
 #include <CoreFoundation/CFBase.h>
 #include <wtf/Forward.h>
@@ -33,7 +34,6 @@
 namespace WebCore {
 
 class FontDescription;
-class FontPlatformData;
 struct FontSelectionSpecifiedCapabilities;
 class SharedBuffer;
 
@@ -43,21 +43,23 @@
 struct FontCustomPlatformData {
     WTF_MAKE_NONCOPYABLE(FontCustomPlatformData); WTF_MAKE_FAST_ALLOCATED;
 public:
-    explicit FontCustomPlatformData(CTFontDescriptorRef fontDescriptor)
-        : m_fontDescriptor(fontDescriptor)
+    explicit FontCustomPlatformData(CTFontDescriptorRef fontDescriptor, FontPlatformData::CreationData&& creationData)
+        : fontDescriptor(fontDescriptor)
+        , creationData(WTFMove(creationData))
     {
     }
 
-    ~FontCustomPlatformData();
+    WEBCORE_EXPORT ~FontCustomPlatformData();
 
     FontPlatformData fontPlatformData(const FontDescription&, bool bold, bool italic, const FontFeatureSettings& fontFaceFeatures, FontSelectionSpecifiedCapabilities fontFaceCapabilities);
 
     static bool supportsFormat(const String&);
 
-    RetainPtr<CTFontDescriptorRef> m_fontDescriptor;
+    RetainPtr<CTFontDescriptorRef> fontDescriptor;
+    FontPlatformData::CreationData creationData;
 };
 
-std::unique_ptr<FontCustomPlatformData> createFontCustomPlatformData(SharedBuffer&, const String&);
+WEBCORE_EXPORT std::unique_ptr<FontCustomPlatformData> createFontCustomPlatformData(SharedBuffer&, const String&);
 
 }
 

Modified: trunk/Source/WebKit/ChangeLog (267929 => 267930)


--- trunk/Source/WebKit/ChangeLog	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebKit/ChangeLog	2020-10-03 17:31:30 UTC (rev 267930)
@@ -1,3 +1,20 @@
+2020-10-03  Myles C. Maxfield  <[email protected]>
+
+        [GPU Process] Support drawing text in 2D canvas with font features
+        https://bugs.webkit.org/show_bug.cgi?id=206118
+
+        Reviewed by Wenson Hsieh.
+
+        Simply serialize and deserialize all the non-derived data in Font and PlatformFontData.
+
+        * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
+        (IPC::ArgumentCoder<Ref<Font>>::encodePlatformData):
+        (IPC::ArgumentCoder<Ref<Font>>::decodePlatformData):
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder<Ref<Font>>::encode):
+        (IPC::ArgumentCoder<Ref<Font>>::decode):
+        * Shared/WebCoreArgumentCoders.h:
+
 2020-10-03  Peng Liu  <[email protected]>
 
         [Media in GPU Process] Web process is not allowed to set the AudioSession category

Modified: trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm (267929 => 267930)


--- trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm	2020-10-03 17:31:30 UTC (rev 267930)
@@ -26,13 +26,20 @@
 #import "config.h"
 #import "WebCoreArgumentCoders.h"
 
+#import "ArgumentCodersCF.h"
 #import "ArgumentCodersCocoa.h"
-#import "CocoaFont.h"
+#import <CoreText/CoreText.h>
 #import <WebCore/AttributedString.h>
 #import <WebCore/DictionaryPopupInfo.h>
 #import <WebCore/Font.h>
 #import <WebCore/FontAttributes.h>
+#import <WebCore/FontCustomPlatformData.h>
+#import <pal/spi/cocoa/CoreTextSPI.h>
 
+#if PLATFORM(IOS_FAMILY)
+#import <UIKit/UIFont.h>
+#endif
+
 #if ENABLE(APPLE_PAY)
 #import "DataReference.h"
 #import <WebCore/PaymentAuthorizationStatus.h>
@@ -39,10 +46,6 @@
 #import <pal/cocoa/PassKitSoftLink.h>
 #endif
 
-#if PLATFORM(IOS_FAMILY)
-#import <UIKit/UIFont.h>
-#endif
-
 namespace IPC {
 using namespace WebCore;
 
@@ -509,26 +512,135 @@
 
 void ArgumentCoder<Ref<Font>>::encodePlatformData(Encoder& encoder, const Ref<WebCore::Font>& font)
 {
-    auto ctFont = !font->fontFaceData() ? font->getCTFont() : nil;
-    encoder << static_cast<bool>(ctFont);
-    if (ctFont)
-        encoder << (__bridge CocoaFont *)ctFont;
+    const auto& platformData = font->platformData();
+    encoder << platformData.orientation();
+    encoder << platformData.widthVariant();
+    encoder << platformData.textRenderingMode();
+    encoder << platformData.size();
+    encoder << platformData.syntheticBold();
+    encoder << platformData.syntheticOblique();
+
+    auto ctFont = platformData.font();
+    auto fontDescriptor = adoptCF(CTFontCopyFontDescriptor(ctFont));
+    auto attributes = adoptCF(CTFontDescriptorCopyAttributes(fontDescriptor.get()));
+    IPC::encode(encoder, attributes.get());
+
+    const auto& creationData = platformData.creationData();
+    encoder << static_cast<bool>(creationData);
+    if (creationData) {
+        encoder << creationData->fontFaceData;
+        encoder << creationData->itemInCollection;
+    } else {
+        auto referenceURL = adoptCF(static_cast<CFURLRef>(CTFontCopyAttribute(ctFont, kCTFontReferenceURLAttribute)));
+        auto string = CFURLGetString(referenceURL.get());
+        encoder << String(string);
+        encoder << String(adoptCF(CTFontCopyPostScriptName(ctFont)).get());
+    }
 }
 
-Optional<Ref<Font>> ArgumentCoder<Ref<Font>>::decodePlatformData(Decoder& decoder, Optional<Ref<WebCore::Font>>&& existingFont)
+static RetainPtr<CTFontDescriptorRef> findFontDescriptor(const String& referenceURL, const String& postScriptName)
 {
-    bool hasPlatformFont;
-    if (!decoder.decode(hasPlatformFont))
+    auto url = "" referenceURL.createCFString().get(), nullptr));
+    if (!url)
+        return nullptr;
+    auto fontDescriptors = adoptCF(CTFontManagerCreateFontDescriptorsFromURL(url.get()));
+    if (!fontDescriptors || !CFArrayGetCount(fontDescriptors.get()))
+        return nullptr;
+    if (CFArrayGetCount(fontDescriptors.get()) == 1)
+        return static_cast<CTFontDescriptorRef>(CFArrayGetValueAtIndex(fontDescriptors.get(), 0));
+
+    // There's supposed to only be a single item in the array, but we can be defensive here.
+    for (CFIndex i = 0; i < CFArrayGetCount(fontDescriptors.get()); ++i) {
+        auto fontDescriptor = static_cast<CTFontDescriptorRef>(CFArrayGetValueAtIndex(fontDescriptors.get(), i));
+        auto currentPostScriptName = adoptCF(static_cast<CFStringRef>(CTFontDescriptorCopyAttribute(fontDescriptor, kCTFontNameAttribute)));
+        if (String(currentPostScriptName.get()) == postScriptName)
+            return fontDescriptor;
+    }
+    return nullptr;
+}
+
+Optional<FontPlatformData> ArgumentCoder<Ref<Font>>::decodePlatformData(Decoder& decoder)
+{
+    Optional<FontOrientation> orientation;
+    decoder >> orientation;
+    if (!orientation.hasValue())
         return WTF::nullopt;
 
-    if (!hasPlatformFont)
-        return WTFMove(existingFont);
+    Optional<FontWidthVariant> widthVariant;
+    decoder >> widthVariant;
+    if (!widthVariant.hasValue())
+        return WTF::nullopt;
 
-    RetainPtr<CocoaFont> font;
-    if (!IPC::decode(decoder, font))
+    Optional<TextRenderingMode> textRenderingMode;
+    decoder >> textRenderingMode;
+    if (!textRenderingMode.hasValue())
         return WTF::nullopt;
 
-    return Font::create({ (__bridge CTFontRef)font.get(), static_cast<float>([font pointSize]) });
+    Optional<float> size;
+    decoder >> size;
+    if (!size.hasValue())
+        return WTF::nullopt;
+
+    Optional<bool> syntheticBold;
+    decoder >> syntheticBold;
+    if (!syntheticBold.hasValue())
+        return WTF::nullopt;
+
+    Optional<bool> syntheticOblique;
+    decoder >> syntheticOblique;
+    if (!syntheticOblique.hasValue())
+        return WTF::nullopt;
+
+    RetainPtr<CFDictionaryRef> attributes;
+    if (!IPC::decode(decoder, attributes))
+        return WTF::nullopt;
+
+    Optional<bool> includesCreationData;
+    decoder >> includesCreationData;
+    if (!includesCreationData.hasValue())
+        return WTF::nullopt;
+
+    if (includesCreationData.value()) {
+        Optional<Ref<SharedBuffer>> fontFaceData;
+        decoder >> fontFaceData;
+        if (!fontFaceData.hasValue())
+            return WTF::nullopt;
+
+        Optional<String> itemInCollection;
+        decoder >> itemInCollection;
+        if (!itemInCollection.hasValue())
+            return WTF::nullopt;
+
+        auto fontCustomPlatformData = createFontCustomPlatformData(fontFaceData.value(), itemInCollection.value());
+        if (!fontCustomPlatformData)
+            return WTF::nullopt;
+        auto baseFontDescriptor = fontCustomPlatformData->fontDescriptor.get();
+        if (!baseFontDescriptor)
+            return WTF::nullopt;
+        auto fontDescriptor = adoptCF(CTFontDescriptorCreateCopyWithAttributes(baseFontDescriptor, attributes.get()));
+        auto ctFont = adoptCF(CTFontCreateWithFontDescriptor(fontDescriptor.get(), size.value(), nullptr));
+
+        auto creationData = FontPlatformData::CreationData { fontFaceData.value(), itemInCollection.value() };
+        return FontPlatformData(ctFont.get(), size.value(), syntheticBold.value(), syntheticOblique.value(), orientation.value(), widthVariant.value(), textRenderingMode.value(), &creationData);
+    }
+
+    Optional<String> referenceURL;
+    decoder >> referenceURL;
+    if (!referenceURL.hasValue())
+        return WTF::nullopt;
+
+    Optional<String> postScriptName;
+    decoder >> postScriptName;
+    if (!postScriptName.hasValue())
+        return WTF::nullopt;
+
+    RetainPtr<CTFontDescriptorRef> fontDescriptor = findFontDescriptor(referenceURL.value(), postScriptName.value());
+    if (!fontDescriptor)
+        return WTF::nullopt;
+    fontDescriptor = adoptCF(CTFontDescriptorCreateCopyWithAttributes(fontDescriptor.get(), attributes.get()));
+    auto ctFont = adoptCF(CTFontCreateWithFontDescriptor(fontDescriptor.get(), size.value(), nullptr));
+
+    return FontPlatformData(ctFont.get(), size.value(), syntheticBold.value(), syntheticOblique.value(), orientation.value(), widthVariant.value(), textRenderingMode.value());
 }
 
 } // namespace IPC

Modified: trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp (267929 => 267930)


--- trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp	2020-10-03 17:31:30 UTC (rev 267930)
@@ -1178,15 +1178,11 @@
 
 void ArgumentCoder<Ref<Font>>::encode(Encoder& encoder, const Ref<WebCore::Font>& font)
 {
-    auto* fontFaceData = font->fontFaceData();
-    encoder << static_cast<bool>(fontFaceData);
-    if (fontFaceData) {
-        encodeSharedBuffer(encoder, fontFaceData);
-        auto& data = ""
-        encoder << data.size();
-        encoder << data.syntheticBold();
-        encoder << data.syntheticOblique();
-    }
+    encoder << font->origin();
+    encoder << (font->isInterstitial() ? Font::Interstitial::Yes : Font::Interstitial::No);
+    encoder << font->visibility();
+    encoder << (font->isTextOrientationFallback() ? Font::OrientationFallback::Yes : Font::OrientationFallback::No);
+    // Intentionally don't encode m_isBrokenIdeographFallback because it doesn't affect drawGlyphs().
 
     encodePlatformData(encoder, font);
 }
@@ -1193,41 +1189,31 @@
 
 Optional<Ref<Font>> ArgumentCoder<Ref<Font>>::decode(Decoder& decoder)
 {
-    Optional<bool> hasFontFaceData;
-    decoder >> hasFontFaceData;
-    if (!hasFontFaceData.hasValue())
+    Optional<Font::Origin> origin;
+    decoder >> origin;
+    if (!origin.hasValue())
         return WTF::nullopt;
 
-    Optional<Ref<WebCore::Font>> result;
-    if (hasFontFaceData.value()) {
-        RefPtr<SharedBuffer> fontFaceData;
-        if (!decodeSharedBuffer(decoder, fontFaceData))
-            return WTF::nullopt;
+    Optional<Font::Interstitial> isInterstitial;
+    decoder >> isInterstitial;
+    if (!isInterstitial.hasValue())
+        return WTF::nullopt;
 
-        if (!fontFaceData)
-            return WTF::nullopt;
+    Optional<Font::Visibility> visibility;
+    decoder >> visibility;
+    if (!visibility.hasValue())
+        return WTF::nullopt;
 
-        Optional<float> fontSize;
-        decoder >> fontSize;
-        if (!fontSize)
-            return WTF::nullopt;
+    Optional<Font::OrientationFallback> isTextOrientationFallback;
+    decoder >> isTextOrientationFallback;
+    if (!isTextOrientationFallback.hasValue())
+        return WTF::nullopt;
 
-        Optional<bool> syntheticBold;
-        decoder >> syntheticBold;
-        if (!syntheticBold)
-            return WTF::nullopt;
+    auto platformData = decodePlatformData(decoder);
+    if (!platformData.hasValue())
+        return WTF::nullopt;
 
-        Optional<bool> syntheticItalic;
-        decoder >> syntheticItalic;
-        if (!syntheticItalic)
-            return WTF::nullopt;
-
-        FontDescription description;
-        description.setComputedSize(*fontSize);
-        result = Font::create(fontFaceData.releaseNonNull(), Font::Origin::Remote, *fontSize, *syntheticBold, *syntheticItalic);
-    }
-
-    return decodePlatformData(decoder, WTFMove(result));
+    return Font::create(platformData.value(), origin.value(), isInterstitial.value(), visibility.value(), isTextOrientationFallback.value());
 }
 
 void ArgumentCoder<Cursor>::encode(Encoder& encoder, const Cursor& cursor)

Modified: trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h (267929 => 267930)


--- trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h	2020-10-03 17:31:30 UTC (rev 267930)
@@ -95,6 +95,7 @@
 class FloatSize;
 class FixedPositionViewportConstraints;
 class Font;
+class FontPlatformData;
 class HTTPHeaderMap;
 class ImageHandle;
 class IntPoint;
@@ -407,7 +408,7 @@
     static void encode(Encoder&, const Ref<WebCore::Font>&);
     static Optional<Ref<WebCore::Font>> decode(Decoder&);
     static void encodePlatformData(Encoder&, const Ref<WebCore::Font>&);
-    static Optional<Ref<WebCore::Font>> decodePlatformData(Decoder&, Optional<Ref<WebCore::Font>>&&);
+    static Optional<WebCore::FontPlatformData> decodePlatformData(Decoder&);
 };
 
 template<> struct ArgumentCoder<WebCore::ImageHandle> {

Modified: trunk/Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp (267929 => 267930)


--- trunk/Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp	2020-10-03 17:31:30 UTC (rev 267930)
@@ -240,7 +240,7 @@
     ASSERT_NOT_REACHED();
 }
 
-Optional<Ref<Font>> ArgumentCoder<Ref<Font>>::decodePlatformData(Decoder&, Optional<Ref<WebCore::Font>>&&)
+Optional<FontPlatformData> ArgumentCoder<Ref<Font>>::decodePlatformData(Decoder&)
 {
     ASSERT_NOT_REACHED();
     return WTF::nullopt;

Modified: trunk/Source/WebKit/Shared/soup/WebCoreArgumentCodersSoup.cpp (267929 => 267930)


--- trunk/Source/WebKit/Shared/soup/WebCoreArgumentCodersSoup.cpp	2020-10-03 17:26:55 UTC (rev 267929)
+++ trunk/Source/WebKit/Shared/soup/WebCoreArgumentCodersSoup.cpp	2020-10-03 17:31:30 UTC (rev 267930)
@@ -257,7 +257,7 @@
     ASSERT_NOT_REACHED();
 }
 
-Optional<Ref<Font>> ArgumentCoder<Ref<Font>>::decodePlatformData(Decoder&, Optional<Ref<WebCore::Font>>&&)
+Optional<FontPlatformData> ArgumentCoder<Ref<Font>>::decodePlatformData(Decoder&)
 {
     ASSERT_NOT_REACHED();
     return WTF::nullopt;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to