Changeset 251413 in webkit
- Timestamp:
- Oct 21, 2019 9:05:19 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 45 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r251412 r251413 1 2019-10-21 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] Move ui-serif, ui-monospaced, and ui-rounded out from behind SPI 4 https://bugs.webkit.org/show_bug.cgi?id=203129 5 6 Reviewed by Tim Horton. 7 8 Update the tests to use the new names, and to not set the setting. 9 10 * fast/text/design-system-ui-10-expected-mismatch.html: 11 * fast/text/design-system-ui-10.html: 12 * fast/text/design-system-ui-11.html: 13 * fast/text/design-system-ui-12.html: 14 * fast/text/design-system-ui-13.html: 15 * fast/text/design-system-ui-14.html: 16 * fast/text/design-system-ui-15.html: 17 * fast/text/design-system-ui-16.html: 18 * fast/text/design-system-ui-2-expected.html: 19 * fast/text/design-system-ui-2.html: 20 * fast/text/design-system-ui-3-expected-mismatch.html: 21 * fast/text/design-system-ui-3.html: 22 * fast/text/design-system-ui-4-expected-mismatch.html: 23 * fast/text/design-system-ui-4.html: 24 * fast/text/design-system-ui-5-expected-mismatch.html: 25 * fast/text/design-system-ui-5.html: 26 * fast/text/design-system-ui-6-expected.html: 27 * fast/text/design-system-ui-6.html: 28 * fast/text/design-system-ui-7-expected.html: 29 * fast/text/design-system-ui-7.html: 30 * fast/text/design-system-ui-8-expected-mismatch.html: 31 * fast/text/design-system-ui-8.html: 32 * fast/text/design-system-ui-9-expected-mismatch.html: 33 * fast/text/design-system-ui-9.html: 34 * fast/text/design-system-ui-expected.html: 35 * fast/text/design-system-ui.html: 36 1 37 2019-10-21 Simon Fraser <simon.fraser@apple.com> 2 38 -
trunk/LayoutTests/fast/text/design-system-ui-10-expected-mismatch.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUIRounded"; 11 src: local(" -apple-system-ui-rounded");7 src: local("ui-rounded"); 12 8 } 13 9 </style> -
trunk/LayoutTests/fast/text/design-system-ui-10.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUIRounded"; 11 src: local(" -apple-system-ui-rounded");7 src: local("ui-rounded"); 12 8 } 13 9 </style> -
trunk/LayoutTests/fast/text/design-system-ui-11.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 6 <div> 11 <div style="display: inline-block; font: 72px ' -apple-system-ui-serif';">HeJllo</div>7 <div style="display: inline-block; font: 72px 'ui-serif';">HeJllo</div> 12 8 </div> 13 9 </body> -
trunk/LayoutTests/fast/text/design-system-ui-12.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 6 <div> 11 <div style="display: inline-block; font: 72px ' -apple-system-ui-monospaced';">HeJllo</div>7 <div style="display: inline-block; font: 72px 'ui-monospaced';">HeJllo</div> 12 8 </div> 13 9 </body> -
trunk/LayoutTests/fast/text/design-system-ui-13.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 6 <div> 11 <div style="display: inline-block; font: 72px ' -apple-system-ui-rounded';">HeJllo</div>7 <div style="display: inline-block; font: 72px 'ui-rounded';">HeJllo</div> 12 8 </div> 13 9 </body> -
trunk/LayoutTests/fast/text/design-system-ui-14.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUISerif"; 11 src: local(" -apple-system-ui-serif");7 src: local("ui-serif"); 12 8 } 13 9 </style> -
trunk/LayoutTests/fast/text/design-system-ui-15.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUIMonospaced"; 11 src: local(" -apple-system-ui-monospaced");7 src: local("ui-monospaced"); 12 8 } 13 9 </style> -
trunk/LayoutTests/fast/text/design-system-ui-16.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUIRounded"; 11 src: local(" -apple-system-ui-rounded");7 src: local("ui-rounded"); 12 8 } 13 9 </style> -
trunk/LayoutTests/fast/text/design-system-ui-2-expected.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 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.6 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. 11 7 <div> 12 <div style="display: inline-block; font: bold 72px ' -apple-system-ui-serif';">HeJllo</div>13 <div style="display: inline-block; font: bold 72px ' -apple-system-ui-monospaced';">HeJllo</div>14 <div style="display: inline-block; font: bold 72px ' -apple-system-ui-rounded';">HeJllo</div>8 <div style="display: inline-block; font: bold 72px 'ui-serif';">HeJllo</div> 9 <div style="display: inline-block; font: bold 72px 'ui-monospaced';">HeJllo</div> 10 <div style="display: inline-block; font: bold 72px 'ui-rounded';">HeJllo</div> 15 11 <div style="display: inline-block; font: bold 72px '.AppleSystemUIFontSerif';">HeJllo</div> 16 12 <div style="display: inline-block; font: bold 72px '.SF NS Mono';">HeJllo</div> -
trunk/LayoutTests/fast/text/design-system-ui-2.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 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.6 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. 11 7 <div> 12 <div style="display: inline-block; font: bold 72px ' -apple-system-ui-serif'; font-synthesis: none;">HeJllo</div>13 <div style="display: inline-block; font: bold 72px ' -apple-system-ui-monospaced'; font-synthesis: none;">HeJllo</div>14 <div style="display: inline-block; font: bold 72px ' -apple-system-ui-rounded'; font-synthesis: none;">HeJllo</div>8 <div style="display: inline-block; font: bold 72px 'ui-serif'; font-synthesis: none;">HeJllo</div> 9 <div style="display: inline-block; font: bold 72px 'ui-monospaced'; font-synthesis: none;">HeJllo</div> 10 <div style="display: inline-block; font: bold 72px 'ui-rounded'; font-synthesis: none;">HeJllo</div> 15 11 <div style="display: inline-block; font: bold 72px '.AppleSystemUIFontSerif'; font-synthesis: none;">HeJllo</div> 16 12 <div style="display: inline-block; font: bold 72px '.SF NS Mono'; font-synthesis: none;">HeJllo</div> -
trunk/LayoutTests/fast/text/design-system-ui-3-expected-mismatch.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 6 <div> 11 <div style="display: inline-block; font: 72px ' -apple-system-ui-serif'; font-synthesis: none;">HeJllo</div>7 <div style="display: inline-block; font: 72px 'ui-serif'; font-synthesis: none;">HeJllo</div> 12 8 </div> 13 9 </body> -
trunk/LayoutTests/fast/text/design-system-ui-3.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 6 <div> 11 <div style="display: inline-block; font: bold 72px ' -apple-system-ui-serif'; font-synthesis: none;">HeJllo</div>7 <div style="display: inline-block; font: bold 72px 'ui-serif'; font-synthesis: none;">HeJllo</div> 12 8 </div> 13 9 </body> -
trunk/LayoutTests/fast/text/design-system-ui-4-expected-mismatch.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 6 <div> 11 <div style="display: inline-block; font: 72px ' -apple-system-ui-monospaced'; font-synthesis: none;">HeJllo</div>7 <div style="display: inline-block; font: 72px 'ui-monospaced'; font-synthesis: none;">HeJllo</div> 12 8 </div> 13 9 </body> -
trunk/LayoutTests/fast/text/design-system-ui-4.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 6 <div> 11 <div style="display: inline-block; font: bold 72px ' -apple-system-ui-monospaced'; font-synthesis: none;">HeJllo</div>7 <div style="display: inline-block; font: bold 72px 'ui-monospaced'; font-synthesis: none;">HeJllo</div> 12 8 </div> 13 9 </body> -
trunk/LayoutTests/fast/text/design-system-ui-5-expected-mismatch.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 6 <div> 11 <div style="display: inline-block; font: 72px ' -apple-system-ui-rounded'; font-synthesis: none;">HeJllo</div>7 <div style="display: inline-block; font: 72px 'ui-rounded'; font-synthesis: none;">HeJllo</div> 12 8 </div> 13 9 </body> -
trunk/LayoutTests/fast/text/design-system-ui-5.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 </head> 9 5 <body> 10 6 <div> 11 <div style="display: inline-block; font: bold 72px ' -apple-system-ui-rounded'; font-synthesis: none;">HeJllo</div>7 <div style="display: inline-block; font: bold 72px 'ui-rounded'; font-synthesis: none;">HeJllo</div> 12 8 </div> 13 9 </body> -
trunk/LayoutTests/fast/text/design-system-ui-6-expected.html
r247377 r251413 4 4 </head> 5 5 <body> 6 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.6 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. 7 7 <div> 8 <div style="display: inline-block; font-size: 72px;">HeJllo</div>9 <div style="display: inline-block; font-size: 72px;">HeJllo</div>10 <div style="display: inline-block; font-size: 72px;">HeJllo</div>11 8 <div style="display: inline-block; font-size: 72px;">HeJllo</div> 12 9 <div style="display: inline-block; font-size: 72px;">HeJllo</div> -
trunk/LayoutTests/fast/text/design-system-ui-6.html
r247377 r251413 3 3 <head> 4 4 <style> 5 @font-face {6 font-family: "AppleSystemUISerif";7 src: local("-apple-system-ui-serif");8 }9 @font-face {10 font-family: "AppleSystemUIMonospaced";11 src: local("-apple-system-ui-monospaced");12 }13 @font-face {14 font-family: "AppleSystemUIRounded";15 src: local("-apple-system-ui-rounded");16 }17 5 @font-face { 18 6 font-family: "DotAppleSystemUIFontSerif"; … … 34 22 </head> 35 23 <body> 36 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.24 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. 37 25 <div> 38 <div style="display: inline-block; font: 72px 'AppleSystemUISerif';">HeJllo</div>39 <div style="display: inline-block; font: 72px 'AppleSystemUIMonospaced';">HeJllo</div>40 <div style="display: inline-block; font: 72px 'AppleSystemUIRounded';">HeJllo</div>41 26 <div style="display: inline-block; font: 72px 'DotAppleSystemUIFontSerif';">HeJllo</div> 42 27 <div style="display: inline-block; font: 72px 'DotSFNSMono';">HeJllo</div> -
trunk/LayoutTests/fast/text/design-system-ui-7-expected.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUISerif"; 11 src: local(" -apple-system-ui-serif");7 src: local("ui-serif"); 12 8 } 13 9 @font-face { 14 10 font-family: "AppleSystemUIMonospaced"; 15 src: local(" -apple-system-ui-monospaced");11 src: local("ui-monospaced"); 16 12 } 17 13 @font-face { 18 14 font-family: "AppleSystemUIRounded"; 19 src: local(" -apple-system-ui-rounded");15 src: local("ui-rounded"); 20 16 } 21 17 @font-face { … … 38 34 </head> 39 35 <body> 40 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.36 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. 41 37 <div> 42 38 <div style="display: inline-block; font: bold 72px 'AppleSystemUISerif';">HeJllo</div> -
trunk/LayoutTests/fast/text/design-system-ui-7.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUISerif"; 11 src: local(" -apple-system-ui-serif");7 src: local("ui-serif"); 12 8 } 13 9 @font-face { 14 10 font-family: "AppleSystemUIMonospaced"; 15 src: local(" -apple-system-ui-monospaced");11 src: local("ui-monospaced"); 16 12 } 17 13 @font-face { 18 14 font-family: "AppleSystemUIRounded"; 19 src: local(" -apple-system-ui-rounded");15 src: local("ui-rounded"); 20 16 } 21 17 @font-face { … … 38 34 </head> 39 35 <body> 40 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.36 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. 41 37 <div> 42 38 <div style="display: inline-block; font: bold 72px 'AppleSystemUISerif'; font-synthesis: none;">HeJllo</div> -
trunk/LayoutTests/fast/text/design-system-ui-8-expected-mismatch.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUISerif"; 11 src: local(" -apple-system-ui-serif");7 src: local("ui-serif"); 12 8 } 13 9 </style> -
trunk/LayoutTests/fast/text/design-system-ui-8.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUISerif"; 11 src: local(" -apple-system-ui-serif");7 src: local("ui-serif"); 12 8 } 13 9 </style> -
trunk/LayoutTests/fast/text/design-system-ui-9-expected-mismatch.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUIMonospaced"; 11 src: local(" -apple-system-ui-monospaced");7 src: local("ui-monospaced"); 12 8 } 13 9 </style> -
trunk/LayoutTests/fast/text/design-system-ui-9.html
r247377 r251413 2 2 <html> 3 3 <head> 4 <script>5 if (window.internals)6 window.internals.settings.setShouldAllowDesignSystemUIFonts(true);7 </script>8 4 <style> 9 5 @font-face { 10 6 font-family: "AppleSystemUIMonospaced"; 11 src: local(" -apple-system-ui-monospaced");7 src: local("ui-monospaced"); 12 8 } 13 9 </style> -
trunk/LayoutTests/fast/text/design-system-ui-expected.html
r247377 r251413 4 4 </head> 5 5 <body> 6 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.6 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. 7 7 <div> 8 <div style="display: inline-block; font-size: 72px;">HeJllo</div>9 <div style="display: inline-block; font-size: 72px;">HeJllo</div>10 <div style="display: inline-block; font-size: 72px;">HeJllo</div>11 8 <div style="display: inline-block; font-size: 72px;">HeJllo</div> 12 9 <div style="display: inline-block; font-size: 72px;">HeJllo</div> -
trunk/LayoutTests/fast/text/design-system-ui.html
r247377 r251413 4 4 </head> 5 5 <body> 6 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.6 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. 7 7 <div> 8 <div style="display: inline-block; font: 72px '-apple-system-ui-serif';">HeJllo</div>9 <div style="display: inline-block; font: 72px '-apple-system-ui-monospaced';">HeJllo</div>10 <div style="display: inline-block; font: 72px '-apple-system-ui-rounded';">HeJllo</div>11 8 <div style="display: inline-block; font: 72px '.AppleSystemUIFontSerif';">HeJllo</div> 12 9 <div style="display: inline-block; font: 72px '.SF NS Mono';">HeJllo</div> -
trunk/Source/WebCore/ChangeLog
r251409 r251413 1 2019-10-21 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] Move ui-serif, ui-monospaced, and ui-rounded out from behind SPI 4 https://bugs.webkit.org/show_bug.cgi?id=203129 5 6 Reviewed by Tim Horton. 7 8 https://github.com/w3c/csswg-drafts/issues/4107 resolved to name these new fonts 9 ui-serif, ui-monospaced, and ui-rounded. This patch renames them, and removes the SPI 10 to access these fonts. 11 12 Tests: fast/text/design-system-ui*.html 13 14 * css/CSSFontFace.cpp: 15 (WebCore::CSSFontFace::shouldAllowDesignSystemUIFonts const): Deleted. 16 * css/CSSFontFace.h: 17 * css/CSSFontFaceSource.cpp: 18 (WebCore::CSSFontFaceSource::load): 19 * css/StyleResolver.cpp: 20 (WebCore::StyleResolver::initializeFontStyle): 21 * page/Settings.yaml: 22 * platform/graphics/FontCache.h: 23 (WebCore::FontDescriptionKey::makeFlagsKey): 24 * platform/graphics/FontDescription.cpp: 25 (WebCore::m_shouldAllowUserInstalledFonts): 26 (WebCore::m_shouldAllowDesignSystemUIFonts): Deleted. 27 * platform/graphics/FontDescription.h: 28 (WebCore::FontDescription::shouldAllowUserInstalledFonts const): 29 (WebCore::FontDescription::setShouldAllowUserInstalledFonts): 30 (WebCore::FontDescription::operator== const): 31 (WebCore::FontDescription::shouldAllowDesignSystemUIFonts const): Deleted. 32 (WebCore::FontDescription::setShouldAllowDesignSystemUIFonts): Deleted. 33 * platform/graphics/cocoa/FontCacheCoreText.cpp: 34 (WebCore::platformFontLookupWithFamily): 35 (WebCore::fontWithFamilySpecialCase): 36 * platform/graphics/cocoa/FontDescriptionCocoa.cpp: 37 (WebCore::matchSystemFontUse): 38 (WebCore::FontCascadeDescription::effectiveFamilyCount const): 39 (WebCore::FontCascadeDescription::effectiveFamilyAt const): 40 * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: 41 (WebCore::SystemFontDatabaseCoreText::systemFontParameters): 42 * style/StyleResolveForDocument.cpp: 43 (WebCore::Style::resolveForDocument): 44 * svg/graphics/SVGImage.cpp: 45 (WebCore::SVGImage::dataChanged): 46 1 47 2019-10-21 youenn fablet <youenn@apple.com> 2 48 -
trunk/Source/WebCore/css/CSSFontFace.cpp
r250983 r251413 595 595 } 596 596 597 bool CSSFontFace::shouldAllowDesignSystemUIFonts() const598 {599 if (m_fontSelector && m_fontSelector->document())600 return m_fontSelector->document()->settings().shouldAllowDesignSystemUIFonts();601 return false;602 }603 604 597 static Settings::FontLoadTimingOverride fontLoadTimingOverride(CSSFontSelector* fontSelector) 605 598 { -
trunk/Source/WebCore/css/CSSFontFace.h
r250803 r251413 164 164 165 165 AllowUserInstalledFonts allowUserInstalledFonts() const; 166 bool shouldAllowDesignSystemUIFonts() const;167 166 168 167 void updateStyleIfNeeded(); -
trunk/Source/WebCore/css/CSSFontFaceSource.cpp
r248748 r251413 180 180 fontDescription.setComputedSize(1); 181 181 fontDescription.setShouldAllowUserInstalledFonts(m_face.allowUserInstalledFonts()); 182 fontDescription.setShouldAllowDesignSystemUIFonts(m_face.shouldAllowDesignSystemUIFonts());183 182 success = FontCache::singleton().fontForFamily(fontDescription, m_familyNameOrURI, nullptr, nullptr, FontSelectionSpecifiedCapabilities(), true); 184 183 if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled()) { -
trunk/Source/WebCore/css/StyleResolver.cpp
r251289 r251413 1952 1952 setFontSize(fontDescription, Style::fontSizeForKeyword(CSSValueMedium, false, document())); 1953 1953 fontDescription.setShouldAllowUserInstalledFonts(settings().shouldAllowUserInstalledFonts() ? AllowUserInstalledFonts::Yes : AllowUserInstalledFonts::No); 1954 fontDescription.setShouldAllowDesignSystemUIFonts(settings().shouldAllowDesignSystemUIFonts());1955 1954 setFontDescription(WTFMove(fontDescription)); 1956 1955 } -
trunk/Source/WebCore/page/Settings.yaml
r251298 r251413 752 752 onChange: setNeedsRecalcStyleInAllFrames 753 753 754 shouldAllowDesignSystemUIFonts:755 initial: false756 onChange: setNeedsRecalcStyleInAllFrames757 758 754 resizeObserverEnabled: 759 755 initial: false -
trunk/Source/WebCore/platform/graphics/FontCache.h
r247720 r251413 129 129 static std::array<unsigned, 2> makeFlagsKey(const FontDescription& description) 130 130 { 131 unsigned first = static_cast<unsigned>(description.script()) << 15 132 | static_cast<unsigned>(description.shouldAllowDesignSystemUIFonts()) << 14 131 unsigned first = static_cast<unsigned>(description.script()) << 14 133 132 | static_cast<unsigned>(description.shouldAllowUserInstalledFonts()) << 13 134 133 | static_cast<unsigned>(description.fontStyleAxis() == FontStyleAxis::slnt) << 12 -
trunk/Source/WebCore/platform/graphics/FontDescription.cpp
r247377 r251413 63 63 , m_fontStyleAxis(FontCascadeDescription::initialFontStyleAxis() == FontStyleAxis::ital) 64 64 , m_shouldAllowUserInstalledFonts(static_cast<unsigned>(AllowUserInstalledFonts::No)) 65 , m_shouldAllowDesignSystemUIFonts(false)66 65 { 67 66 } -
trunk/Source/WebCore/platform/graphics/FontDescription.h
r247465 r251413 96 96 FontStyleAxis fontStyleAxis() const { return m_fontStyleAxis ? FontStyleAxis::ital : FontStyleAxis::slnt; } 97 97 AllowUserInstalledFonts shouldAllowUserInstalledFonts() const { return static_cast<AllowUserInstalledFonts>(m_shouldAllowUserInstalledFonts); } 98 bool shouldAllowDesignSystemUIFonts() const { return m_shouldAllowDesignSystemUIFonts; }99 98 100 99 void setComputedSize(float s) { m_computedSize = clampToFloat(s); } … … 132 131 void setFontStyleAxis(FontStyleAxis axis) { m_fontStyleAxis = axis == FontStyleAxis::ital; } 133 132 void setShouldAllowUserInstalledFonts(AllowUserInstalledFonts shouldAllowUserInstalledFonts) { m_shouldAllowUserInstalledFonts = static_cast<unsigned>(shouldAllowUserInstalledFonts); } 134 void setShouldAllowDesignSystemUIFonts(bool allow) { m_shouldAllowDesignSystemUIFonts = allow; }135 133 136 134 static AtomString platformResolveGenericFamily(UScriptCode, const AtomString& locale, const AtomString& familyName); … … 169 167 unsigned m_fontStyleAxis : 1; // Whether "font-style: italic" or "font-style: oblique 20deg" was specified 170 168 unsigned m_shouldAllowUserInstalledFonts : 1; // AllowUserInstalledFonts: If this description is allowed to match a user-installed font 171 unsigned m_shouldAllowDesignSystemUIFonts : 1; // Whether -apple-system-ui-serif, -apple-system-ui-monospaced, and -apple-system-ui-rounded are supported172 169 }; 173 170 … … 204 201 && m_opticalSizing == other.m_opticalSizing 205 202 && m_fontStyleAxis == other.m_fontStyleAxis 206 && m_shouldAllowUserInstalledFonts == other.m_shouldAllowUserInstalledFonts 207 && m_shouldAllowDesignSystemUIFonts == other.m_shouldAllowDesignSystemUIFonts; 203 && m_shouldAllowUserInstalledFonts == other.m_shouldAllowUserInstalledFonts; 208 204 } 209 205 -
trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
r250031 r251413 1207 1207 || equalLettersIgnoringASCIICase(family, ".sf ui mono") 1208 1208 || equalLettersIgnoringASCIICase(family, ".applesystemuifontrounded")) { 1209 // If you want to use these fonts, set the shouldAllowDesignSystemUIFonts Setting and use 1210 // -apple-system-ui-serif, -apple-system-ui-monospaced, and -apple-system-ui-rounded. 1209 // If you want to use these fonts, use ui-serif, ui-monospaced, and ui-rounded. 1211 1210 return { nullptr }; 1212 1211 } … … 1272 1271 { 1273 1272 #if HAVE(DESIGN_SYSTEM_UI_FONTS) 1274 if (!fontDescription.shouldAllowDesignSystemUIFonts())1275 return nullptr;1276 1277 1273 Optional<SystemFontDatabaseCoreText::ClientUse> designSystemUI; 1278 if (equalLettersIgnoringASCIICase(family, " -apple-system-ui-serif"))1274 if (equalLettersIgnoringASCIICase(family, "ui-serif")) 1279 1275 designSystemUI = SystemFontDatabaseCoreText::ClientUse::ForSystemUISerif; 1280 else if (equalLettersIgnoringASCIICase(family, " -apple-system-ui-monospaced"))1276 else if (equalLettersIgnoringASCIICase(family, "ui-monospaced")) 1281 1277 designSystemUI = SystemFontDatabaseCoreText::ClientUse::ForSystemUIMonospaced; 1282 else if (equalLettersIgnoringASCIICase(family, " -apple-system-ui-rounded"))1278 else if (equalLettersIgnoringASCIICase(family, "ui-rounded")) 1283 1279 designSystemUI = SystemFontDatabaseCoreText::ClientUse::ForSystemUIRounded; 1284 1280 -
trunk/Source/WebCore/platform/graphics/cocoa/FontDescriptionCocoa.cpp
r247465 r251413 48 48 #endif 49 49 50 static inline Optional<SystemFontDatabaseCoreText::ClientUse> matchSystemFontUse(const AtomString& string , bool shouldAllowDesignSystemUIFonts)50 static inline Optional<SystemFontDatabaseCoreText::ClientUse> matchSystemFontUse(const AtomString& string) 51 51 { 52 52 if (equalLettersIgnoringASCIICase(string, "-webkit-system-font") … … 57 57 58 58 #if HAVE(DESIGN_SYSTEM_UI_FONTS) 59 if (shouldAllowDesignSystemUIFonts) { 60 if (equalLettersIgnoringASCIICase(string, "-apple-system-ui-serif")) 61 return SystemFontDatabaseCoreText::ClientUse::ForSystemUISerif; 62 if (equalLettersIgnoringASCIICase(string, "-apple-system-ui-monospaced")) 63 return SystemFontDatabaseCoreText::ClientUse::ForSystemUIMonospaced; 64 if (equalLettersIgnoringASCIICase(string, "-apple-system-ui-rounded")) 65 return SystemFontDatabaseCoreText::ClientUse::ForSystemUIRounded; 66 } 67 #else 68 UNUSED_PARAM(shouldAllowDesignSystemUIFonts); 59 if (equalLettersIgnoringASCIICase(string, "ui-serif")) 60 return SystemFontDatabaseCoreText::ClientUse::ForSystemUISerif; 61 if (equalLettersIgnoringASCIICase(string, "ui-monospaced")) 62 return SystemFontDatabaseCoreText::ClientUse::ForSystemUIMonospaced; 63 if (equalLettersIgnoringASCIICase(string, "ui-rounded")) 64 return SystemFontDatabaseCoreText::ClientUse::ForSystemUIRounded; 69 65 #endif 70 66 … … 111 107 for (unsigned i = 0; i < familyCount(); ++i) { 112 108 const auto& cssFamily = familyAt(i); 113 if (auto use = matchSystemFontUse(cssFamily , shouldAllowDesignSystemUIFonts()))109 if (auto use = matchSystemFontUse(cssFamily)) 114 110 result += systemFontCascadeList(*this, cssFamily, *use, shouldAllowUserInstalledFonts()).size(); 115 111 else … … 130 126 for (unsigned i = 0; i < familyCount(); ++i) { 131 127 const auto& cssFamily = familyAt(i); 132 if (auto use = matchSystemFontUse(cssFamily , shouldAllowDesignSystemUIFonts())) {128 if (auto use = matchSystemFontUse(cssFamily)) { 133 129 auto cascadeList = systemFontCascadeList(*this, cssFamily, *use, shouldAllowUserInstalledFonts()); 134 130 if (index < cascadeList.size()) -
trunk/Source/WebCore/platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp
r251093 r251413 218 218 } 219 219 case ClientUse::ForSystemUISerif: { 220 static NeverDestroyed<AtomString> systemUISerif = AtomString(" system-ui-serif", AtomString::ConstructFromLiteral);220 static NeverDestroyed<AtomString> systemUISerif = AtomString("ui-serif", AtomString::ConstructFromLiteral); 221 221 result.fontName = systemUISerif.get(); 222 222 break; 223 223 } 224 224 case ClientUse::ForSystemUIMonospaced: { 225 static NeverDestroyed<AtomString> systemUIMonospaced = AtomString(" system-ui-monospaced", AtomString::ConstructFromLiteral);225 static NeverDestroyed<AtomString> systemUIMonospaced = AtomString("ui-monospaced", AtomString::ConstructFromLiteral); 226 226 result.fontName = systemUIMonospaced.get(); 227 227 break; 228 228 } 229 229 case ClientUse::ForSystemUIRounded: { 230 static NeverDestroyed<AtomString> systemUIRounded = AtomString(" system-ui-rounded", AtomString::ConstructFromLiteral);230 static NeverDestroyed<AtomString> systemUIRounded = AtomString("ui-rounded", AtomString::ConstructFromLiteral); 231 231 result.fontName = systemUIRounded.get(); 232 232 break; -
trunk/Source/WebCore/style/StyleResolveForDocument.cpp
r247377 r251413 111 111 fontDescription.setOneFamily(standardFamily); 112 112 fontDescription.setShouldAllowUserInstalledFonts(settings.shouldAllowUserInstalledFonts() ? AllowUserInstalledFonts::Yes : AllowUserInstalledFonts::No); 113 fontDescription.setShouldAllowDesignSystemUIFonts(settings.shouldAllowDesignSystemUIFonts());114 113 115 114 fontDescription.setKeywordSizeFromIdentifier(CSSValueMedium); -
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
r250006 r251413 484 484 m_page->settings().setAcceleratedCompositingEnabled(false); 485 485 m_page->settings().setShouldAllowUserInstalledFonts(false); 486 m_page->settings().setShouldAllowDesignSystemUIFonts(false);487 486 488 487 Frame& frame = m_page->mainFrame(); -
trunk/Source/WebKit/ChangeLog
r251409 r251413 1 2019-10-21 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] Move ui-serif, ui-monospaced, and ui-rounded out from behind SPI 4 https://bugs.webkit.org/show_bug.cgi?id=203129 5 6 Reviewed by Tim Horton. 7 8 * Shared/WebPreferences.yaml: 9 * UIProcess/API/Cocoa/WKPreferences.mm: 10 (-[WKPreferences _shouldAllowDesignSystemUIFonts]): Deleted. 11 (-[WKPreferences _setShouldAllowDesignSystemUIFonts:]): Deleted. 12 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: 13 1 14 2019-10-21 youenn fablet <youenn@apple.com> 2 15 -
trunk/Source/WebKit/Shared/WebPreferences.yaml
r251298 r251413 1132 1132 defaultValue: true 1133 1133 1134 ShouldAllowDesignSystemUIFonts:1135 type: bool1136 defaultValue: false1137 1138 1134 MediaCapabilitiesEnabled: 1139 1135 type: bool -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
r251220 r251413 714 714 } 715 715 716 - (BOOL)_shouldAllowDesignSystemUIFonts717 {718 return _preferences->shouldAllowDesignSystemUIFonts();719 }720 721 - (void)_setShouldAllowDesignSystemUIFonts:(BOOL)_shouldAllowDesignSystemUIFonts722 {723 _preferences->setShouldAllowDesignSystemUIFonts(_shouldAllowDesignSystemUIFonts);724 }725 726 716 static _WKEditableLinkBehavior toAPI(WebCore::EditableLinkBehavior behavior) 727 717 { -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
r248957 r251413 127 127 128 128 @property (nonatomic, setter=_setShouldAllowUserInstalledFonts:) BOOL _shouldAllowUserInstalledFonts WK_API_AVAILABLE(macos(10.13.4), ios(11.3)); 129 @property (nonatomic, setter=_setShouldAllowDesignSystemUIFonts:) BOOL _shouldAllowDesignSystemUIFonts WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));130 129 131 130 @property (nonatomic, setter=_setEditableLinkBehavior:) _WKEditableLinkBehavior _editableLinkBehavior WK_API_AVAILABLE(macos(10.13.4), ios(11.3));
Note: See TracChangeset
for help on using the changeset viewer.