[Cocoa] Move ui-serif, ui-monospaced, and ui-rounded out from behind SPI
https://bugs.webkit.org/show_bug.cgi?id=203129

Reviewed by Tim Horton.

Source/WebCore:

https://github.com/w3c/csswg-drafts/issues/4107 resolved to name these new fonts
ui-serif, ui-monospaced, and ui-rounded. This patch renames them, and removes the SPI
to access these fonts.

Tests: fast/text/design-system-ui*.html

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::shouldAllowDesignSystemUIFonts const): Deleted.
* css/CSSFontFace.h:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::load):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::initializeFontStyle):
* page/Settings.yaml:
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::makeFlagsKey):
* platform/graphics/FontDescription.cpp:
(WebCore::m_shouldAllowUserInstalledFonts):
(WebCore::m_shouldAllowDesignSystemUIFonts): Deleted.
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::shouldAllowUserInstalledFonts const):
(WebCore::FontDescription::setShouldAllowUserInstalledFonts):
(WebCore::FontDescription::operator== const):
(WebCore::FontDescription::shouldAllowDesignSystemUIFonts const): Deleted.
(WebCore::FontDescription::setShouldAllowDesignSystemUIFonts): Deleted.
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::platformFontLookupWithFamily):
(WebCore::fontWithFamilySpecialCase):
* platform/graphics/cocoa/FontDescriptionCocoa.cpp:
(WebCore::matchSystemFontUse):
(WebCore::FontCascadeDescription::effectiveFamilyCount const):
(WebCore::FontCascadeDescription::effectiveFamilyAt const):
* platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
(WebCore::SystemFontDatabaseCoreText::systemFontParameters):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _shouldAllowDesignSystemUIFonts]): Deleted.
(-[WKPreferences _setShouldAllowDesignSystemUIFonts:]): Deleted.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

LayoutTests:

Update the tests to use the new names, and to not set the setting.

* fast/text/design-system-ui-10-expected-mismatch.html:
* fast/text/design-system-ui-10.html:
* fast/text/design-system-ui-11.html:
* fast/text/design-system-ui-12.html:
* fast/text/design-system-ui-13.html:
* fast/text/design-system-ui-14.html:
* fast/text/design-system-ui-15.html:
* fast/text/design-system-ui-16.html:
* fast/text/design-system-ui-2-expected.html:
* fast/text/design-system-ui-2.html:
* fast/text/design-system-ui-3-expected-mismatch.html:
* fast/text/design-system-ui-3.html:
* fast/text/design-system-ui-4-expected-mismatch.html:
* fast/text/design-system-ui-4.html:
* fast/text/design-system-ui-5-expected-mismatch.html:
* fast/text/design-system-ui-5.html:
* fast/text/design-system-ui-6-expected.html:
* fast/text/design-system-ui-6.html:
* fast/text/design-system-ui-7-expected.html:
* fast/text/design-system-ui-7.html:
* fast/text/design-system-ui-8-expected-mismatch.html:
* fast/text/design-system-ui-8.html:
* fast/text/design-system-ui-9-expected-mismatch.html:
* fast/text/design-system-ui-9.html:
* fast/text/design-system-ui-expected.html:
* fast/text/design-system-ui.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d91dd80..2ec1a7b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,39 @@
+2019-10-21  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        [Cocoa] Move ui-serif, ui-monospaced, and ui-rounded out from behind SPI
+        https://bugs.webkit.org/show_bug.cgi?id=203129
+
+        Reviewed by Tim Horton.
+
+        Update the tests to use the new names, and to not set the setting.
+
+        * fast/text/design-system-ui-10-expected-mismatch.html:
+        * fast/text/design-system-ui-10.html:
+        * fast/text/design-system-ui-11.html:
+        * fast/text/design-system-ui-12.html:
+        * fast/text/design-system-ui-13.html:
+        * fast/text/design-system-ui-14.html:
+        * fast/text/design-system-ui-15.html:
+        * fast/text/design-system-ui-16.html:
+        * fast/text/design-system-ui-2-expected.html:
+        * fast/text/design-system-ui-2.html:
+        * fast/text/design-system-ui-3-expected-mismatch.html:
+        * fast/text/design-system-ui-3.html:
+        * fast/text/design-system-ui-4-expected-mismatch.html:
+        * fast/text/design-system-ui-4.html:
+        * fast/text/design-system-ui-5-expected-mismatch.html:
+        * fast/text/design-system-ui-5.html:
+        * fast/text/design-system-ui-6-expected.html:
+        * fast/text/design-system-ui-6.html:
+        * fast/text/design-system-ui-7-expected.html:
+        * fast/text/design-system-ui-7.html:
+        * fast/text/design-system-ui-8-expected-mismatch.html:
+        * fast/text/design-system-ui-8.html:
+        * fast/text/design-system-ui-9-expected-mismatch.html:
+        * fast/text/design-system-ui-9.html:
+        * fast/text/design-system-ui-expected.html:
+        * fast/text/design-system-ui.html:
+
 2019-10-21  Simon Fraser  <simon.fraser@apple.com>
 
         [WK1] Layout Test legacy-animation-engine/compositing/backing/transform-transition-from-outside-view.html is a flaky failure
diff --git a/LayoutTests/fast/text/design-system-ui-10-expected-mismatch.html b/LayoutTests/fast/text/design-system-ui-10-expected-mismatch.html
index ad59bae..9b72b40 100644
--- a/LayoutTests/fast/text/design-system-ui-10-expected-mismatch.html
+++ b/LayoutTests/fast/text/design-system-ui-10-expected-mismatch.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUIRounded";
-    src: local("-apple-system-ui-rounded");
+    src: local("ui-rounded");
 }
 </style>
 </head>
diff --git a/LayoutTests/fast/text/design-system-ui-10.html b/LayoutTests/fast/text/design-system-ui-10.html
index 5f6a3eb..202e321 100644
--- a/LayoutTests/fast/text/design-system-ui-10.html
+++ b/LayoutTests/fast/text/design-system-ui-10.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUIRounded";
-    src: local("-apple-system-ui-rounded");
+    src: local("ui-rounded");
 }
 </style>
 </head>
diff --git a/LayoutTests/fast/text/design-system-ui-11.html b/LayoutTests/fast/text/design-system-ui-11.html
index b403a7c..5e43908 100644
--- a/LayoutTests/fast/text/design-system-ui-11.html
+++ b/LayoutTests/fast/text/design-system-ui-11.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
 <div>
-<div style="display: inline-block; font: 72px '-apple-system-ui-serif';">HeJllo</div>
+<div style="display: inline-block; font: 72px 'ui-serif';">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui-12.html b/LayoutTests/fast/text/design-system-ui-12.html
index 2a39637..f51cf97 100644
--- a/LayoutTests/fast/text/design-system-ui-12.html
+++ b/LayoutTests/fast/text/design-system-ui-12.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
 <div>
-<div style="display: inline-block; font: 72px '-apple-system-ui-monospaced';">HeJllo</div>
+<div style="display: inline-block; font: 72px 'ui-monospaced';">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui-13.html b/LayoutTests/fast/text/design-system-ui-13.html
index c614391..bd23c84 100644
--- a/LayoutTests/fast/text/design-system-ui-13.html
+++ b/LayoutTests/fast/text/design-system-ui-13.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
 <div>
-<div style="display: inline-block; font: 72px '-apple-system-ui-rounded';">HeJllo</div>
+<div style="display: inline-block; font: 72px 'ui-rounded';">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui-14.html b/LayoutTests/fast/text/design-system-ui-14.html
index d5ca66b..62870da 100644
--- a/LayoutTests/fast/text/design-system-ui-14.html
+++ b/LayoutTests/fast/text/design-system-ui-14.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUISerif";
-    src: local("-apple-system-ui-serif");
+    src: local("ui-serif");
 }
 </style>
 </head>
diff --git a/LayoutTests/fast/text/design-system-ui-15.html b/LayoutTests/fast/text/design-system-ui-15.html
index 2a6fffa..f4454bf 100644
--- a/LayoutTests/fast/text/design-system-ui-15.html
+++ b/LayoutTests/fast/text/design-system-ui-15.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUIMonospaced";
-    src: local("-apple-system-ui-monospaced");
+    src: local("ui-monospaced");
 }
 </style>
 </head>
diff --git a/LayoutTests/fast/text/design-system-ui-16.html b/LayoutTests/fast/text/design-system-ui-16.html
index 771d38d..835d674 100644
--- a/LayoutTests/fast/text/design-system-ui-16.html
+++ b/LayoutTests/fast/text/design-system-ui-16.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUIRounded";
-    src: local("-apple-system-ui-rounded");
+    src: local("ui-rounded");
 }
 </style>
 </head>
diff --git a/LayoutTests/fast/text/design-system-ui-2-expected.html b/LayoutTests/fast/text/design-system-ui-2-expected.html
index 5adc362..32e81d5 100644
--- a/LayoutTests/fast/text/design-system-ui-2-expected.html
+++ b/LayoutTests/fast/text/design-system-ui-2-expected.html
@@ -1,17 +1,13 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
-This test makes sure that the design system UI fonts don't work unless the shouldAllowDesignSystemUIFonts preference is set. The test passes if all the text below is bold.
+This test makes sure that the bold versions of the design system UI fonts work. The test passes if all the text below is bold.
 <div>
-<div style="display: inline-block; font: bold 72px '-apple-system-ui-serif';">HeJllo</div>
-<div style="display: inline-block; font: bold 72px '-apple-system-ui-monospaced';">HeJllo</div>
-<div style="display: inline-block; font: bold 72px '-apple-system-ui-rounded';">HeJllo</div>
+<div style="display: inline-block; font: bold 72px 'ui-serif';">HeJllo</div>
+<div style="display: inline-block; font: bold 72px 'ui-monospaced';">HeJllo</div>
+<div style="display: inline-block; font: bold 72px 'ui-rounded';">HeJllo</div>
 <div style="display: inline-block; font: bold 72px '.AppleSystemUIFontSerif';">HeJllo</div>
 <div style="display: inline-block; font: bold 72px '.SF NS Mono';">HeJllo</div>
 <div style="display: inline-block; font: bold 72px '.SF UI Mono';">HeJllo</div>
diff --git a/LayoutTests/fast/text/design-system-ui-2.html b/LayoutTests/fast/text/design-system-ui-2.html
index 77f66cd..ac35eea 100644
--- a/LayoutTests/fast/text/design-system-ui-2.html
+++ b/LayoutTests/fast/text/design-system-ui-2.html
@@ -1,17 +1,13 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
-This test makes sure that the design system UI fonts don't work unless the shouldAllowDesignSystemUIFonts preference is set. The test passes if all the text below is bold.
+This test makes sure that the bold versions of the design system UI fonts work. The test passes if all the text below is bold.
 <div>
-<div style="display: inline-block; font: bold 72px '-apple-system-ui-serif'; font-synthesis: none;">HeJllo</div>
-<div style="display: inline-block; font: bold 72px '-apple-system-ui-monospaced'; font-synthesis: none;">HeJllo</div>
-<div style="display: inline-block; font: bold 72px '-apple-system-ui-rounded'; font-synthesis: none;">HeJllo</div>
+<div style="display: inline-block; font: bold 72px 'ui-serif'; font-synthesis: none;">HeJllo</div>
+<div style="display: inline-block; font: bold 72px 'ui-monospaced'; font-synthesis: none;">HeJllo</div>
+<div style="display: inline-block; font: bold 72px 'ui-rounded'; font-synthesis: none;">HeJllo</div>
 <div style="display: inline-block; font: bold 72px '.AppleSystemUIFontSerif'; font-synthesis: none;">HeJllo</div>
 <div style="display: inline-block; font: bold 72px '.SF NS Mono'; font-synthesis: none;">HeJllo</div>
 <div style="display: inline-block; font: bold 72px '.SF UI Mono'; font-synthesis: none;">HeJllo</div>
diff --git a/LayoutTests/fast/text/design-system-ui-3-expected-mismatch.html b/LayoutTests/fast/text/design-system-ui-3-expected-mismatch.html
index 616138f..0b1c44a 100644
--- a/LayoutTests/fast/text/design-system-ui-3-expected-mismatch.html
+++ b/LayoutTests/fast/text/design-system-ui-3-expected-mismatch.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
 <div>
-<div style="display: inline-block; font: 72px '-apple-system-ui-serif'; font-synthesis: none;">HeJllo</div>
+<div style="display: inline-block; font: 72px 'ui-serif'; font-synthesis: none;">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui-3.html b/LayoutTests/fast/text/design-system-ui-3.html
index c5334a6..e9152e0 100644
--- a/LayoutTests/fast/text/design-system-ui-3.html
+++ b/LayoutTests/fast/text/design-system-ui-3.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
 <div>
-<div style="display: inline-block; font: bold 72px '-apple-system-ui-serif'; font-synthesis: none;">HeJllo</div>
+<div style="display: inline-block; font: bold 72px 'ui-serif'; font-synthesis: none;">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui-4-expected-mismatch.html b/LayoutTests/fast/text/design-system-ui-4-expected-mismatch.html
index fc2e48a..bf16368 100644
--- a/LayoutTests/fast/text/design-system-ui-4-expected-mismatch.html
+++ b/LayoutTests/fast/text/design-system-ui-4-expected-mismatch.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
 <div>
-<div style="display: inline-block; font: 72px '-apple-system-ui-monospaced'; font-synthesis: none;">HeJllo</div>
+<div style="display: inline-block; font: 72px 'ui-monospaced'; font-synthesis: none;">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui-4.html b/LayoutTests/fast/text/design-system-ui-4.html
index 837f2ba..50483d5 100644
--- a/LayoutTests/fast/text/design-system-ui-4.html
+++ b/LayoutTests/fast/text/design-system-ui-4.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
 <div>
-<div style="display: inline-block; font: bold 72px '-apple-system-ui-monospaced'; font-synthesis: none;">HeJllo</div>
+<div style="display: inline-block; font: bold 72px 'ui-monospaced'; font-synthesis: none;">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui-5-expected-mismatch.html b/LayoutTests/fast/text/design-system-ui-5-expected-mismatch.html
index 2186ce6..3417e69 100644
--- a/LayoutTests/fast/text/design-system-ui-5-expected-mismatch.html
+++ b/LayoutTests/fast/text/design-system-ui-5-expected-mismatch.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
 <div>
-<div style="display: inline-block; font: 72px '-apple-system-ui-rounded'; font-synthesis: none;">HeJllo</div>
+<div style="display: inline-block; font: 72px 'ui-rounded'; font-synthesis: none;">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui-5.html b/LayoutTests/fast/text/design-system-ui-5.html
index cfa6fae..7548c90 100644
--- a/LayoutTests/fast/text/design-system-ui-5.html
+++ b/LayoutTests/fast/text/design-system-ui-5.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 </head>
 <body>
 <div>
-<div style="display: inline-block; font: bold 72px '-apple-system-ui-rounded'; font-synthesis: none;">HeJllo</div>
+<div style="display: inline-block; font: bold 72px 'ui-rounded'; font-synthesis: none;">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui-6-expected.html b/LayoutTests/fast/text/design-system-ui-6-expected.html
index b6cdaed..04ae5a7 100644
--- a/LayoutTests/fast/text/design-system-ui-6-expected.html
+++ b/LayoutTests/fast/text/design-system-ui-6-expected.html
@@ -3,15 +3,12 @@
 <head>
 </head>
 <body>
-This test makes sure that the design system UI fonts don't work unless the shouldAllowDesignSystemUIFonts preference is set. The test passes if all the text below is rendered in Times.
+This test makes sure that the design system UI fonts don't work unless they are accessed from their correct names. The test passes if all the text below is rendered in Times.
 <div>
 <div style="display: inline-block; font-size: 72px;">HeJllo</div>
 <div style="display: inline-block; font-size: 72px;">HeJllo</div>
 <div style="display: inline-block; font-size: 72px;">HeJllo</div>
 <div style="display: inline-block; font-size: 72px;">HeJllo</div>
-<div style="display: inline-block; font-size: 72px;">HeJllo</div>
-<div style="display: inline-block; font-size: 72px;">HeJllo</div>
-<div style="display: inline-block; font-size: 72px;">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui-6.html b/LayoutTests/fast/text/design-system-ui-6.html
index 12dabb6..9c32dca 100644
--- a/LayoutTests/fast/text/design-system-ui-6.html
+++ b/LayoutTests/fast/text/design-system-ui-6.html
@@ -3,18 +3,6 @@
 <head>
 <style>
 @font-face {
-    font-family: "AppleSystemUISerif";
-    src: local("-apple-system-ui-serif");
-}
-@font-face {
-    font-family: "AppleSystemUIMonospaced";
-    src: local("-apple-system-ui-monospaced");
-}
-@font-face {
-    font-family: "AppleSystemUIRounded";
-    src: local("-apple-system-ui-rounded");
-}
-@font-face {
     font-family: "DotAppleSystemUIFontSerif";
     src: local(".AppleSystemUIFontSerif");
 }
@@ -33,11 +21,8 @@
 </style>
 </head>
 <body>
-This test makes sure that the design system UI fonts don't work unless the shouldAllowDesignSystemUIFonts preference is set. The test passes if all the text below is rendered in Times.
+This test makes sure that the design system UI fonts don't work unless they are accessed from their correct names. The test passes if all the text below is rendered in Times.
 <div>
-<div style="display: inline-block; font: 72px 'AppleSystemUISerif';">HeJllo</div>
-<div style="display: inline-block; font: 72px 'AppleSystemUIMonospaced';">HeJllo</div>
-<div style="display: inline-block; font: 72px 'AppleSystemUIRounded';">HeJllo</div>
 <div style="display: inline-block; font: 72px 'DotAppleSystemUIFontSerif';">HeJllo</div>
 <div style="display: inline-block; font: 72px 'DotSFNSMono';">HeJllo</div>
 <div style="display: inline-block; font: 72px 'DotSFUIMono';">HeJllo</div>
diff --git a/LayoutTests/fast/text/design-system-ui-7-expected.html b/LayoutTests/fast/text/design-system-ui-7-expected.html
index 4753870..a6127cb 100644
--- a/LayoutTests/fast/text/design-system-ui-7-expected.html
+++ b/LayoutTests/fast/text/design-system-ui-7-expected.html
@@ -1,22 +1,18 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUISerif";
-    src: local("-apple-system-ui-serif");
+    src: local("ui-serif");
 }
 @font-face {
     font-family: "AppleSystemUIMonospaced";
-    src: local("-apple-system-ui-monospaced");
+    src: local("ui-monospaced");
 }
 @font-face {
     font-family: "AppleSystemUIRounded";
-    src: local("-apple-system-ui-rounded");
+    src: local("ui-rounded");
 }
 @font-face {
     font-family: "DotAppleSystemUIFontSerif";
@@ -37,7 +33,7 @@
 </style>
 </head>
 <body>
-This test makes sure that the design system UI fonts don't work unless the shouldAllowDesignSystemUIFonts preference is set. The test passes if all the text below is bold.
+This test makes sure that the bold versions of the design system UI fonts work in @font-face. The test passes if all the text below is bold.
 <div>
 <div style="display: inline-block; font: bold 72px 'AppleSystemUISerif';">HeJllo</div>
 <div style="display: inline-block; font: bold 72px 'AppleSystemUIMonospaced';">HeJllo</div>
diff --git a/LayoutTests/fast/text/design-system-ui-7.html b/LayoutTests/fast/text/design-system-ui-7.html
index 616d87d..2bf90d1 100644
--- a/LayoutTests/fast/text/design-system-ui-7.html
+++ b/LayoutTests/fast/text/design-system-ui-7.html
@@ -1,22 +1,18 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUISerif";
-    src: local("-apple-system-ui-serif");
+    src: local("ui-serif");
 }
 @font-face {
     font-family: "AppleSystemUIMonospaced";
-    src: local("-apple-system-ui-monospaced");
+    src: local("ui-monospaced");
 }
 @font-face {
     font-family: "AppleSystemUIRounded";
-    src: local("-apple-system-ui-rounded");
+    src: local("ui-rounded");
 }
 @font-face {
     font-family: "DotAppleSystemUIFontSerif";
@@ -37,7 +33,7 @@
 </style>
 </head>
 <body>
-This test makes sure that the design system UI fonts don't work unless the shouldAllowDesignSystemUIFonts preference is set. The test passes if all the text below is bold.
+This test makes sure that the bold versions of the design system UI fonts work in @font-face. The test passes if all the text below is bold.
 <div>
 <div style="display: inline-block; font: bold 72px 'AppleSystemUISerif'; font-synthesis: none;">HeJllo</div>
 <div style="display: inline-block; font: bold 72px 'AppleSystemUIMonospaced'; font-synthesis: none;">HeJllo</div>
diff --git a/LayoutTests/fast/text/design-system-ui-8-expected-mismatch.html b/LayoutTests/fast/text/design-system-ui-8-expected-mismatch.html
index 9e98049..437b426 100644
--- a/LayoutTests/fast/text/design-system-ui-8-expected-mismatch.html
+++ b/LayoutTests/fast/text/design-system-ui-8-expected-mismatch.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUISerif";
-    src: local("-apple-system-ui-serif");
+    src: local("ui-serif");
 }
 </style>
 </head>
diff --git a/LayoutTests/fast/text/design-system-ui-8.html b/LayoutTests/fast/text/design-system-ui-8.html
index 49a1d1d..e235c04 100644
--- a/LayoutTests/fast/text/design-system-ui-8.html
+++ b/LayoutTests/fast/text/design-system-ui-8.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUISerif";
-    src: local("-apple-system-ui-serif");
+    src: local("ui-serif");
 }
 </style>
 </head>
diff --git a/LayoutTests/fast/text/design-system-ui-9-expected-mismatch.html b/LayoutTests/fast/text/design-system-ui-9-expected-mismatch.html
index e0fbf78..17247b5 100644
--- a/LayoutTests/fast/text/design-system-ui-9-expected-mismatch.html
+++ b/LayoutTests/fast/text/design-system-ui-9-expected-mismatch.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUIMonospaced";
-    src: local("-apple-system-ui-monospaced");
+    src: local("ui-monospaced");
 }
 </style>
 </head>
diff --git a/LayoutTests/fast/text/design-system-ui-9.html b/LayoutTests/fast/text/design-system-ui-9.html
index 469eeb4..d0a90d6 100644
--- a/LayoutTests/fast/text/design-system-ui-9.html
+++ b/LayoutTests/fast/text/design-system-ui-9.html
@@ -1,14 +1,10 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script>
-if (window.internals)
-    window.internals.settings.setShouldAllowDesignSystemUIFonts(true);
-</script>
 <style>
 @font-face {
     font-family: "AppleSystemUIMonospaced";
-    src: local("-apple-system-ui-monospaced");
+    src: local("ui-monospaced");
 }
 </style>
 </head>
diff --git a/LayoutTests/fast/text/design-system-ui-expected.html b/LayoutTests/fast/text/design-system-ui-expected.html
index b6cdaed..04ae5a7 100644
--- a/LayoutTests/fast/text/design-system-ui-expected.html
+++ b/LayoutTests/fast/text/design-system-ui-expected.html
@@ -3,15 +3,12 @@
 <head>
 </head>
 <body>
-This test makes sure that the design system UI fonts don't work unless the shouldAllowDesignSystemUIFonts preference is set. The test passes if all the text below is rendered in Times.
+This test makes sure that the design system UI fonts don't work unless they are accessed from their correct names. The test passes if all the text below is rendered in Times.
 <div>
 <div style="display: inline-block; font-size: 72px;">HeJllo</div>
 <div style="display: inline-block; font-size: 72px;">HeJllo</div>
 <div style="display: inline-block; font-size: 72px;">HeJllo</div>
 <div style="display: inline-block; font-size: 72px;">HeJllo</div>
-<div style="display: inline-block; font-size: 72px;">HeJllo</div>
-<div style="display: inline-block; font-size: 72px;">HeJllo</div>
-<div style="display: inline-block; font-size: 72px;">HeJllo</div>
 </div>
 </body>
 </html>
diff --git a/LayoutTests/fast/text/design-system-ui.html b/LayoutTests/fast/text/design-system-ui.html
index 40470c0..cdec8bf 100644
--- a/LayoutTests/fast/text/design-system-ui.html
+++ b/LayoutTests/fast/text/design-system-ui.html
@@ -3,11 +3,8 @@
 <head>
 </head>
 <body>
-This test makes sure that the design system UI fonts don't work unless the shouldAllowDesignSystemUIFonts preference is set. The test passes if all the text below is rendered in Times.
+This test makes sure that the design system UI fonts don't work unless they are accessed from their correct names. The test passes if all the text below is rendered in Times.
 <div>
-<div style="display: inline-block; font: 72px '-apple-system-ui-serif';">HeJllo</div>
-<div style="display: inline-block; font: 72px '-apple-system-ui-monospaced';">HeJllo</div>
-<div style="display: inline-block; font: 72px '-apple-system-ui-rounded';">HeJllo</div>
 <div style="display: inline-block; font: 72px '.AppleSystemUIFontSerif';">HeJllo</div>
 <div style="display: inline-block; font: 72px '.SF NS Mono';">HeJllo</div>
 <div style="display: inline-block; font: 72px '.SF UI Mono';">HeJllo</div>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 5c33d49..da6e573 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,49 @@
+2019-10-21  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        [Cocoa] Move ui-serif, ui-monospaced, and ui-rounded out from behind SPI
+        https://bugs.webkit.org/show_bug.cgi?id=203129
+
+        Reviewed by Tim Horton.
+
+        https://github.com/w3c/csswg-drafts/issues/4107 resolved to name these new fonts
+        ui-serif, ui-monospaced, and ui-rounded. This patch renames them, and removes the SPI
+        to access these fonts.
+
+        Tests: fast/text/design-system-ui*.html
+
+        * css/CSSFontFace.cpp:
+        (WebCore::CSSFontFace::shouldAllowDesignSystemUIFonts const): Deleted.
+        * css/CSSFontFace.h:
+        * css/CSSFontFaceSource.cpp:
+        (WebCore::CSSFontFaceSource::load):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::initializeFontStyle):
+        * page/Settings.yaml:
+        * platform/graphics/FontCache.h:
+        (WebCore::FontDescriptionKey::makeFlagsKey):
+        * platform/graphics/FontDescription.cpp:
+        (WebCore::m_shouldAllowUserInstalledFonts):
+        (WebCore::m_shouldAllowDesignSystemUIFonts): Deleted.
+        * platform/graphics/FontDescription.h:
+        (WebCore::FontDescription::shouldAllowUserInstalledFonts const):
+        (WebCore::FontDescription::setShouldAllowUserInstalledFonts):
+        (WebCore::FontDescription::operator== const):
+        (WebCore::FontDescription::shouldAllowDesignSystemUIFonts const): Deleted.
+        (WebCore::FontDescription::setShouldAllowDesignSystemUIFonts): Deleted.
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::platformFontLookupWithFamily):
+        (WebCore::fontWithFamilySpecialCase):
+        * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
+        (WebCore::matchSystemFontUse):
+        (WebCore::FontCascadeDescription::effectiveFamilyCount const):
+        (WebCore::FontCascadeDescription::effectiveFamilyAt const):
+        * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:
+        (WebCore::SystemFontDatabaseCoreText::systemFontParameters):
+        * style/StyleResolveForDocument.cpp:
+        (WebCore::Style::resolveForDocument):
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::dataChanged):
+
 2019-10-21  youenn fablet  <youenn@apple.com>
 
         Move service worker registration matching for navigation loads to network process
diff --git a/Source/WebCore/css/CSSFontFace.cpp b/Source/WebCore/css/CSSFontFace.cpp
index 8d21b3ab..f1bce07 100644
--- a/Source/WebCore/css/CSSFontFace.cpp
+++ b/Source/WebCore/css/CSSFontFace.cpp
@@ -594,13 +594,6 @@
     return AllowUserInstalledFonts::Yes;
 }
 
-bool CSSFontFace::shouldAllowDesignSystemUIFonts() const
-{
-    if (m_fontSelector && m_fontSelector->document())
-        return m_fontSelector->document()->settings().shouldAllowDesignSystemUIFonts();
-    return false;
-}
-
 static Settings::FontLoadTimingOverride fontLoadTimingOverride(CSSFontSelector* fontSelector)
 {
     auto overrideValue = Settings::FontLoadTimingOverride::None;
diff --git a/Source/WebCore/css/CSSFontFace.h b/Source/WebCore/css/CSSFontFace.h
index f522df4..340661c 100644
--- a/Source/WebCore/css/CSSFontFace.h
+++ b/Source/WebCore/css/CSSFontFace.h
@@ -163,7 +163,6 @@
     bool purgeable() const;
 
     AllowUserInstalledFonts allowUserInstalledFonts() const;
-    bool shouldAllowDesignSystemUIFonts() const;
 
     void updateStyleIfNeeded();
 
diff --git a/Source/WebCore/css/CSSFontFaceSource.cpp b/Source/WebCore/css/CSSFontFaceSource.cpp
index 6747a23..8802606 100644
--- a/Source/WebCore/css/CSSFontFaceSource.cpp
+++ b/Source/WebCore/css/CSSFontFaceSource.cpp
@@ -179,7 +179,6 @@
             fontDescription.setOneFamily(m_familyNameOrURI);
             fontDescription.setComputedSize(1);
             fontDescription.setShouldAllowUserInstalledFonts(m_face.allowUserInstalledFonts());
-            fontDescription.setShouldAllowDesignSystemUIFonts(m_face.shouldAllowDesignSystemUIFonts());
             success = FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, nullptr, nullptr, FontSelectionSpecifiedCapabilities(), true);
             if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled()) {
                 if (auto* document = fontSelector->document())
diff --git a/Source/WebCore/css/StyleResolver.cpp b/Source/WebCore/css/StyleResolver.cpp
index e4f14db..c5f1bc3 100644
--- a/Source/WebCore/css/StyleResolver.cpp
+++ b/Source/WebCore/css/StyleResolver.cpp
@@ -1951,7 +1951,6 @@
     fontDescription.setKeywordSizeFromIdentifier(CSSValueMedium);
     setFontSize(fontDescription, Style::fontSizeForKeyword(CSSValueMedium, false, document()));
     fontDescription.setShouldAllowUserInstalledFonts(settings().shouldAllowUserInstalledFonts() ? AllowUserInstalledFonts::Yes : AllowUserInstalledFonts::No);
-    fontDescription.setShouldAllowDesignSystemUIFonts(settings().shouldAllowDesignSystemUIFonts());
     setFontDescription(WTFMove(fontDescription));
 }
 
diff --git a/Source/WebCore/page/Settings.yaml b/Source/WebCore/page/Settings.yaml
index dbb3d84..f04dfa6 100644
--- a/Source/WebCore/page/Settings.yaml
+++ b/Source/WebCore/page/Settings.yaml
@@ -751,10 +751,6 @@
   initial: true
   onChange: setNeedsRecalcStyleInAllFrames
 
-shouldAllowDesignSystemUIFonts:
-  initial: false
-  onChange: setNeedsRecalcStyleInAllFrames
-
 resizeObserverEnabled:
   initial: false
   conditional: RESIZE_OBSERVER
diff --git a/Source/WebCore/platform/graphics/FontCache.h b/Source/WebCore/platform/graphics/FontCache.h
index 0a3a33f..17d3257 100644
--- a/Source/WebCore/platform/graphics/FontCache.h
+++ b/Source/WebCore/platform/graphics/FontCache.h
@@ -128,8 +128,7 @@
 private:
     static std::array<unsigned, 2> makeFlagsKey(const FontDescription& description)
     {
-        unsigned first = static_cast<unsigned>(description.script()) << 15
-            | static_cast<unsigned>(description.shouldAllowDesignSystemUIFonts()) << 14
+        unsigned first = static_cast<unsigned>(description.script()) << 14
             | static_cast<unsigned>(description.shouldAllowUserInstalledFonts()) << 13
             | static_cast<unsigned>(description.fontStyleAxis() == FontStyleAxis::slnt) << 12
             | static_cast<unsigned>(description.opticalSizing()) << 11
diff --git a/Source/WebCore/platform/graphics/FontDescription.cpp b/Source/WebCore/platform/graphics/FontDescription.cpp
index 132162c..8a924f9 100644
--- a/Source/WebCore/platform/graphics/FontDescription.cpp
+++ b/Source/WebCore/platform/graphics/FontDescription.cpp
@@ -62,7 +62,6 @@
     , m_opticalSizing(static_cast<unsigned>(FontOpticalSizing::Enabled))
     , m_fontStyleAxis(FontCascadeDescription::initialFontStyleAxis() == FontStyleAxis::ital)
     , m_shouldAllowUserInstalledFonts(static_cast<unsigned>(AllowUserInstalledFonts::No))
-    , m_shouldAllowDesignSystemUIFonts(false)
 {
 }
 
diff --git a/Source/WebCore/platform/graphics/FontDescription.h b/Source/WebCore/platform/graphics/FontDescription.h
index c8d4a85..102a158 100644
--- a/Source/WebCore/platform/graphics/FontDescription.h
+++ b/Source/WebCore/platform/graphics/FontDescription.h
@@ -95,7 +95,6 @@
     FontOpticalSizing opticalSizing() const { return static_cast<FontOpticalSizing>(m_opticalSizing); }
     FontStyleAxis fontStyleAxis() const { return m_fontStyleAxis ? FontStyleAxis::ital : FontStyleAxis::slnt; }
     AllowUserInstalledFonts shouldAllowUserInstalledFonts() const { return static_cast<AllowUserInstalledFonts>(m_shouldAllowUserInstalledFonts); }
-    bool shouldAllowDesignSystemUIFonts() const { return m_shouldAllowDesignSystemUIFonts; }
 
     void setComputedSize(float s) { m_computedSize = clampToFloat(s); }
     void setItalic(Optional<FontSelectionValue> italic) { m_fontSelectionRequest.slope = italic; }
@@ -131,7 +130,6 @@
     void setOpticalSizing(FontOpticalSizing sizing) { m_opticalSizing = static_cast<unsigned>(sizing); }
     void setFontStyleAxis(FontStyleAxis axis) { m_fontStyleAxis = axis == FontStyleAxis::ital; }
     void setShouldAllowUserInstalledFonts(AllowUserInstalledFonts shouldAllowUserInstalledFonts) { m_shouldAllowUserInstalledFonts = static_cast<unsigned>(shouldAllowUserInstalledFonts); }
-    void setShouldAllowDesignSystemUIFonts(bool allow) { m_shouldAllowDesignSystemUIFonts = allow; }
 
     static AtomString platformResolveGenericFamily(UScriptCode, const AtomString& locale, const AtomString& familyName);
 
@@ -168,7 +166,6 @@
     unsigned m_opticalSizing : 1; // FontOpticalSizing
     unsigned m_fontStyleAxis : 1; // Whether "font-style: italic" or "font-style: oblique 20deg" was specified
     unsigned m_shouldAllowUserInstalledFonts : 1; // AllowUserInstalledFonts: If this description is allowed to match a user-installed font
-    unsigned m_shouldAllowDesignSystemUIFonts : 1; // Whether -apple-system-ui-serif, -apple-system-ui-monospaced, and -apple-system-ui-rounded are supported
 };
 
 inline bool FontDescription::operator==(const FontDescription& other) const
@@ -203,8 +200,7 @@
         && m_variantEastAsianRuby == other.m_variantEastAsianRuby
         && m_opticalSizing == other.m_opticalSizing
         && m_fontStyleAxis == other.m_fontStyleAxis
-        && m_shouldAllowUserInstalledFonts == other.m_shouldAllowUserInstalledFonts
-        && m_shouldAllowDesignSystemUIFonts == other.m_shouldAllowDesignSystemUIFonts;
+        && m_shouldAllowUserInstalledFonts == other.m_shouldAllowUserInstalledFonts;
 }
 
 }
diff --git a/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp b/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
index 55bb6ba..16cb518 100644
--- a/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
+++ b/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
@@ -1206,8 +1206,7 @@
         || equalLettersIgnoringASCIICase(family, ".sf ns mono")
         || equalLettersIgnoringASCIICase(family, ".sf ui mono")
         || equalLettersIgnoringASCIICase(family, ".applesystemuifontrounded")) {
-        // If you want to use these fonts, set the shouldAllowDesignSystemUIFonts Setting and use
-        // -apple-system-ui-serif, -apple-system-ui-monospaced, and -apple-system-ui-rounded.
+        // If you want to use these fonts, use ui-serif, ui-monospaced, and ui-rounded.
         return { nullptr };
     }
 
@@ -1271,15 +1270,12 @@
 static RetainPtr<CTFontRef> fontWithFamilySpecialCase(const AtomString& family, const FontDescription& fontDescription, float size, AllowUserInstalledFonts allowUserInstalledFonts)
 {
 #if HAVE(DESIGN_SYSTEM_UI_FONTS)
-    if (!fontDescription.shouldAllowDesignSystemUIFonts())
-        return nullptr;
-
     Optional<SystemFontDatabaseCoreText::ClientUse> designSystemUI;
-    if (equalLettersIgnoringASCIICase(family, "-apple-system-ui-serif"))
+    if (equalLettersIgnoringASCIICase(family, "ui-serif"))
         designSystemUI = SystemFontDatabaseCoreText::ClientUse::ForSystemUISerif;
-    else if (equalLettersIgnoringASCIICase(family, "-apple-system-ui-monospaced"))
+    else if (equalLettersIgnoringASCIICase(family, "ui-monospaced"))
         designSystemUI = SystemFontDatabaseCoreText::ClientUse::ForSystemUIMonospaced;
-    else if (equalLettersIgnoringASCIICase(family, "-apple-system-ui-rounded"))
+    else if (equalLettersIgnoringASCIICase(family, "ui-rounded"))
         designSystemUI = SystemFontDatabaseCoreText::ClientUse::ForSystemUIRounded;
 
     if (designSystemUI) {
diff --git a/Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp b/Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp
index 95577c2..c0c1294 100644
--- a/Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp
+++ b/Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp
@@ -47,7 +47,7 @@
 }
 #endif
 
-static inline Optional<SystemFontDatabaseCoreText::ClientUse> matchSystemFontUse(const AtomString& string, bool shouldAllowDesignSystemUIFonts)
+static inline Optional<SystemFontDatabaseCoreText::ClientUse> matchSystemFontUse(const AtomString& string)
 {
     if (equalLettersIgnoringASCIICase(string, "-webkit-system-font")
         || equalLettersIgnoringASCIICase(string, "-apple-system")
@@ -56,16 +56,12 @@
         return SystemFontDatabaseCoreText::ClientUse::ForSystemUI;
 
 #if HAVE(DESIGN_SYSTEM_UI_FONTS)
-    if (shouldAllowDesignSystemUIFonts) {
-        if (equalLettersIgnoringASCIICase(string, "-apple-system-ui-serif"))
-            return SystemFontDatabaseCoreText::ClientUse::ForSystemUISerif;
-        if (equalLettersIgnoringASCIICase(string, "-apple-system-ui-monospaced"))
-            return SystemFontDatabaseCoreText::ClientUse::ForSystemUIMonospaced;
-        if (equalLettersIgnoringASCIICase(string, "-apple-system-ui-rounded"))
-            return SystemFontDatabaseCoreText::ClientUse::ForSystemUIRounded;
-    }
-#else
-    UNUSED_PARAM(shouldAllowDesignSystemUIFonts);
+    if (equalLettersIgnoringASCIICase(string, "ui-serif"))
+        return SystemFontDatabaseCoreText::ClientUse::ForSystemUISerif;
+    if (equalLettersIgnoringASCIICase(string, "ui-monospaced"))
+        return SystemFontDatabaseCoreText::ClientUse::ForSystemUIMonospaced;
+    if (equalLettersIgnoringASCIICase(string, "ui-rounded"))
+        return SystemFontDatabaseCoreText::ClientUse::ForSystemUIRounded;
 #endif
 
 #if PLATFORM(IOS_FAMILY)
@@ -110,7 +106,7 @@
     unsigned result = 0;
     for (unsigned i = 0; i < familyCount(); ++i) {
         const auto& cssFamily = familyAt(i);
-        if (auto use = matchSystemFontUse(cssFamily, shouldAllowDesignSystemUIFonts()))
+        if (auto use = matchSystemFontUse(cssFamily))
             result += systemFontCascadeList(*this, cssFamily, *use, shouldAllowUserInstalledFonts()).size();
         else
             ++result;
@@ -129,7 +125,7 @@
     // These two behaviors should be unified, which would hopefully allow us to delete this duplicate code.
     for (unsigned i = 0; i < familyCount(); ++i) {
         const auto& cssFamily = familyAt(i);
-        if (auto use = matchSystemFontUse(cssFamily, shouldAllowDesignSystemUIFonts())) {
+        if (auto use = matchSystemFontUse(cssFamily)) {
             auto cascadeList = systemFontCascadeList(*this, cssFamily, *use, shouldAllowUserInstalledFonts());
             if (index < cascadeList.size())
                 return FontFamilySpecification(cascadeList[index].get());
diff --git a/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp b/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
index 7b86ce0..3039561 100644
--- a/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
+++ b/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
@@ -217,17 +217,17 @@
         break;
     }
     case ClientUse::ForSystemUISerif: {
-        static NeverDestroyed<AtomString> systemUISerif = AtomString("system-ui-serif", AtomString::ConstructFromLiteral);
+        static NeverDestroyed<AtomString> systemUISerif = AtomString("ui-serif", AtomString::ConstructFromLiteral);
         result.fontName = systemUISerif.get();
         break;
     }
     case ClientUse::ForSystemUIMonospaced: {
-        static NeverDestroyed<AtomString> systemUIMonospaced = AtomString("system-ui-monospaced", AtomString::ConstructFromLiteral);
+        static NeverDestroyed<AtomString> systemUIMonospaced = AtomString("ui-monospaced", AtomString::ConstructFromLiteral);
         result.fontName = systemUIMonospaced.get();
         break;
     }
     case ClientUse::ForSystemUIRounded: {
-        static NeverDestroyed<AtomString> systemUIRounded = AtomString("system-ui-rounded", AtomString::ConstructFromLiteral);
+        static NeverDestroyed<AtomString> systemUIRounded = AtomString("ui-rounded", AtomString::ConstructFromLiteral);
         result.fontName = systemUIRounded.get();
         break;
     }
diff --git a/Source/WebCore/style/StyleResolveForDocument.cpp b/Source/WebCore/style/StyleResolveForDocument.cpp
index dde8818..0e43d41 100644
--- a/Source/WebCore/style/StyleResolveForDocument.cpp
+++ b/Source/WebCore/style/StyleResolveForDocument.cpp
@@ -110,7 +110,6 @@
     fontDescription.setRenderingMode(settings.fontRenderingMode());
     fontDescription.setOneFamily(standardFamily);
     fontDescription.setShouldAllowUserInstalledFonts(settings.shouldAllowUserInstalledFonts() ? AllowUserInstalledFonts::Yes : AllowUserInstalledFonts::No);
-    fontDescription.setShouldAllowDesignSystemUIFonts(settings.shouldAllowDesignSystemUIFonts());
 
     fontDescription.setKeywordSizeFromIdentifier(CSSValueMedium);
     int size = fontSizeForKeyword(CSSValueMedium, false, document);
diff --git a/Source/WebCore/svg/graphics/SVGImage.cpp b/Source/WebCore/svg/graphics/SVGImage.cpp
index 693cb34..1df4000 100644
--- a/Source/WebCore/svg/graphics/SVGImage.cpp
+++ b/Source/WebCore/svg/graphics/SVGImage.cpp
@@ -483,7 +483,6 @@
         m_page->settings().setPluginsEnabled(false);
         m_page->settings().setAcceleratedCompositingEnabled(false);
         m_page->settings().setShouldAllowUserInstalledFonts(false);
-        m_page->settings().setShouldAllowDesignSystemUIFonts(false);
 
         Frame& frame = m_page->mainFrame();
         frame.setView(FrameView::create(frame));
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index ad2a45f..14a1f09 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2019-10-21  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        [Cocoa] Move ui-serif, ui-monospaced, and ui-rounded out from behind SPI
+        https://bugs.webkit.org/show_bug.cgi?id=203129
+
+        Reviewed by Tim Horton.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _shouldAllowDesignSystemUIFonts]): Deleted.
+        (-[WKPreferences _setShouldAllowDesignSystemUIFonts:]): Deleted.
+        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+
 2019-10-21  youenn fablet  <youenn@apple.com>
 
         Move service worker registration matching for navigation loads to network process
diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml
index ef16776..3622549 100644
--- a/Source/WebKit/Shared/WebPreferences.yaml
+++ b/Source/WebKit/Shared/WebPreferences.yaml
@@ -1131,10 +1131,6 @@
   type: bool
   defaultValue: true
 
-ShouldAllowDesignSystemUIFonts:
-  type: bool
-  defaultValue: false
-
 MediaCapabilitiesEnabled:
   type: bool
   defaultValue: true
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
index c1a7308..ea1073b 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
@@ -713,16 +713,6 @@
     _preferences->setShouldAllowUserInstalledFonts(_shouldAllowUserInstalledFonts);
 }
 
-- (BOOL)_shouldAllowDesignSystemUIFonts
-{
-    return _preferences->shouldAllowDesignSystemUIFonts();
-}
-
-- (void)_setShouldAllowDesignSystemUIFonts:(BOOL)_shouldAllowDesignSystemUIFonts
-{
-    _preferences->setShouldAllowDesignSystemUIFonts(_shouldAllowDesignSystemUIFonts);
-}
-
 static _WKEditableLinkBehavior toAPI(WebCore::EditableLinkBehavior behavior)
 {
     switch (behavior) {
diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
index 26fca7f..567fc35 100644
--- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
+++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
@@ -126,7 +126,6 @@
 @property (nonatomic, setter=_setDOMPasteAllowed:) BOOL _domPasteAllowed WK_API_AVAILABLE(macos(10.13), ios(11.0));
 
 @property (nonatomic, setter=_setShouldAllowUserInstalledFonts:) BOOL _shouldAllowUserInstalledFonts WK_API_AVAILABLE(macos(10.13.4), ios(11.3));
-@property (nonatomic, setter=_setShouldAllowDesignSystemUIFonts:) BOOL _shouldAllowDesignSystemUIFonts WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
 
 @property (nonatomic, setter=_setEditableLinkBehavior:) _WKEditableLinkBehavior _editableLinkBehavior WK_API_AVAILABLE(macos(10.13.4), ios(11.3));