haikuwebkit/LayoutTests/fast/text/design-system-ui-expected.html

15 lines
513 B
HTML
Raw Permalink Normal View History

New York font erroneously gets synthetic bold https://bugs.webkit.org/show_bug.cgi?id=199653 <rdar://problem/51692592> Reviewed by Simon Fraser. Source/WebCore: This patch adds support for -apple-system-ui-serif, -apple-system-ui-monospaced, and -apple-system-ui-rounded, behind an SPI that is off-by-default. We don't want to expose these fonts to the web because we don't a standardization story for them yet, but we do want some apps to be able to use them. WebKit clients who want to use these fonts can set -[WKPreferences _shouldAllowDesignSystemUIFonts] = YES. The patch generalizes our existing system-ui infrastructure to handle these three additional fonts. It also explicitly disables the unsupported dot-prefixed names so they don't leak out into Web content. Tests: 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.html fast/text/design-system-ui-3.html fast/text/design-system-ui-4.html fast/text/design-system-ui-5.html fast/text/design-system-ui-6.html fast/text/design-system-ui-7.html fast/text/design-system-ui-8.html fast/text/design-system-ui-9.html fast/text/design-system-ui.html * css/CSSFontFace.cpp: (WebCore::CSSFontFace::shouldAllowDesignSystemUIFonts const): * css/CSSFontFace.h: * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::load): * css/StyleResolver.cpp: (WebCore::StyleResolver::initializeFontStyle): * page/Settings.yaml: * platform/graphics/FontDescription.cpp: (WebCore::m_shouldAllowDesignSystemUIFonts): (WebCore::m_shouldAllowUserInstalledFonts): Deleted. * platform/graphics/FontDescription.h: (WebCore::FontDescription::shouldAllowDesignSystemUIFonts const): (WebCore::FontDescription::setShouldAllowDesignSystemUIFonts): (WebCore::FontDescription::operator== const): * platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::platformFontLookupWithFamily): (WebCore::fontWithFamily): * platform/graphics/cocoa/FontCacheCoreText.h: * platform/graphics/cocoa/FontDescriptionCocoa.cpp: (WebCore::systemFontUse): (WebCore::systemFontCascadeList): (WebCore::FontCascadeDescription::effectiveFamilyCount const): (WebCore::FontCascadeDescription::effectiveFamilyAt const): (WebCore::isSystemFontString): Deleted. (WebCore::isUIFontTextStyle): Deleted. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::ctFont const): * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: (WebCore::SystemFontDatabaseCoreText::createSystemUI): (WebCore::SystemFontDatabaseCoreText::createDesignSystemUI): (WebCore::SystemFontDatabaseCoreText::createTextStyle): (WebCore::SystemFontDatabaseCoreText::cascadeList): (WebCore::SystemFontDatabaseCoreText::applyWeightItalicsAndFallbackBehavior): (WebCore::SystemFontDatabaseCoreText::systemFontParameters): * platform/graphics/cocoa/SystemFontDatabaseCoreText.h: * platform/graphics/ios/FontCacheIOS.mm: (WebCore::platformFontWithFamilySpecialCase): * platform/graphics/mac/FontCacheMac.mm: (WebCore::platformFontWithFamilySpecialCase): * style/StyleResolveForDocument.cpp: (WebCore::Style::resolveForDocument): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setShouldAllowDesignSystemUIFonts): * testing/InternalSettings.h: * testing/InternalSettings.idl: Source/WebCore/PAL: * pal/spi/cocoa/CoreTextSPI.h: Source/WebKit: Add the SPI to enable the new fonts. * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetShouldAllowDesignSystemUIFonts): (WKPreferencesGetShouldAllowDesignSystemUIFonts): * UIProcess/API/C/WKPreferencesRefPrivate.h: * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _shouldAllowDesignSystemUIFonts]): (-[WKPreferences _setShouldAllowDesignSystemUIFonts:]): * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Source/WTF: * wtf/Platform.h: LayoutTests: * TestExpectations: * fast/text/design-system-ui-10-expected-mismatch.html: Added. * fast/text/design-system-ui-10.html: Added. * fast/text/design-system-ui-11-expected-mismatch.html: Added. * fast/text/design-system-ui-11.html: Added. * fast/text/design-system-ui-12-expected-mismatch.html: Added. * fast/text/design-system-ui-12.html: Added. * fast/text/design-system-ui-13-expected-mismatch.html: Added. * fast/text/design-system-ui-13.html: Added. * fast/text/design-system-ui-14-expected-mismatch.html: Added. * fast/text/design-system-ui-14.html: Added. * fast/text/design-system-ui-15-expected-mismatch.html: Added. * fast/text/design-system-ui-15.html: Added. * fast/text/design-system-ui-16-expected-mismatch.html: Added. * fast/text/design-system-ui-16.html: Added. * fast/text/design-system-ui-2-expected.html: Added. * fast/text/design-system-ui-2.html: Added. * fast/text/design-system-ui-3-expected-mismatch.html: Added. * fast/text/design-system-ui-3.html: Added. * fast/text/design-system-ui-4-expected-mismatch.html: Added. * fast/text/design-system-ui-4.html: Added. * fast/text/design-system-ui-5-expected-mismatch.html: Added. * fast/text/design-system-ui-5.html: Added. * fast/text/design-system-ui-6-expected.html: Added. * fast/text/design-system-ui-6.html: Added. * fast/text/design-system-ui-7-expected.html: Added. * fast/text/design-system-ui-7.html: Added. * fast/text/design-system-ui-8-expected-mismatch.html: Added. * fast/text/design-system-ui-8.html: Added. * fast/text/design-system-ui-9-expected-mismatch.html: Added. * fast/text/design-system-ui-9.html: Added. * fast/text/design-system-ui-expected.html: Added. * fast/text/design-system-ui.html: Added. * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/213612@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-12 01:08:29 +00:00
<!DOCTYPE html>
<html>
<head>
</head>
<body>
[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: Canonical link: https://commits.webkit.org/216650@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-22 04:05:19 +00:00
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.
New York font erroneously gets synthetic bold https://bugs.webkit.org/show_bug.cgi?id=199653 <rdar://problem/51692592> Reviewed by Simon Fraser. Source/WebCore: This patch adds support for -apple-system-ui-serif, -apple-system-ui-monospaced, and -apple-system-ui-rounded, behind an SPI that is off-by-default. We don't want to expose these fonts to the web because we don't a standardization story for them yet, but we do want some apps to be able to use them. WebKit clients who want to use these fonts can set -[WKPreferences _shouldAllowDesignSystemUIFonts] = YES. The patch generalizes our existing system-ui infrastructure to handle these three additional fonts. It also explicitly disables the unsupported dot-prefixed names so they don't leak out into Web content. Tests: 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.html fast/text/design-system-ui-3.html fast/text/design-system-ui-4.html fast/text/design-system-ui-5.html fast/text/design-system-ui-6.html fast/text/design-system-ui-7.html fast/text/design-system-ui-8.html fast/text/design-system-ui-9.html fast/text/design-system-ui.html * css/CSSFontFace.cpp: (WebCore::CSSFontFace::shouldAllowDesignSystemUIFonts const): * css/CSSFontFace.h: * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::load): * css/StyleResolver.cpp: (WebCore::StyleResolver::initializeFontStyle): * page/Settings.yaml: * platform/graphics/FontDescription.cpp: (WebCore::m_shouldAllowDesignSystemUIFonts): (WebCore::m_shouldAllowUserInstalledFonts): Deleted. * platform/graphics/FontDescription.h: (WebCore::FontDescription::shouldAllowDesignSystemUIFonts const): (WebCore::FontDescription::setShouldAllowDesignSystemUIFonts): (WebCore::FontDescription::operator== const): * platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::platformFontLookupWithFamily): (WebCore::fontWithFamily): * platform/graphics/cocoa/FontCacheCoreText.h: * platform/graphics/cocoa/FontDescriptionCocoa.cpp: (WebCore::systemFontUse): (WebCore::systemFontCascadeList): (WebCore::FontCascadeDescription::effectiveFamilyCount const): (WebCore::FontCascadeDescription::effectiveFamilyAt const): (WebCore::isSystemFontString): Deleted. (WebCore::isUIFontTextStyle): Deleted. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::ctFont const): * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: (WebCore::SystemFontDatabaseCoreText::createSystemUI): (WebCore::SystemFontDatabaseCoreText::createDesignSystemUI): (WebCore::SystemFontDatabaseCoreText::createTextStyle): (WebCore::SystemFontDatabaseCoreText::cascadeList): (WebCore::SystemFontDatabaseCoreText::applyWeightItalicsAndFallbackBehavior): (WebCore::SystemFontDatabaseCoreText::systemFontParameters): * platform/graphics/cocoa/SystemFontDatabaseCoreText.h: * platform/graphics/ios/FontCacheIOS.mm: (WebCore::platformFontWithFamilySpecialCase): * platform/graphics/mac/FontCacheMac.mm: (WebCore::platformFontWithFamilySpecialCase): * style/StyleResolveForDocument.cpp: (WebCore::Style::resolveForDocument): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setShouldAllowDesignSystemUIFonts): * testing/InternalSettings.h: * testing/InternalSettings.idl: Source/WebCore/PAL: * pal/spi/cocoa/CoreTextSPI.h: Source/WebKit: Add the SPI to enable the new fonts. * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetShouldAllowDesignSystemUIFonts): (WKPreferencesGetShouldAllowDesignSystemUIFonts): * UIProcess/API/C/WKPreferencesRefPrivate.h: * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _shouldAllowDesignSystemUIFonts]): (-[WKPreferences _setShouldAllowDesignSystemUIFonts:]): * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Source/WTF: * wtf/Platform.h: LayoutTests: * TestExpectations: * fast/text/design-system-ui-10-expected-mismatch.html: Added. * fast/text/design-system-ui-10.html: Added. * fast/text/design-system-ui-11-expected-mismatch.html: Added. * fast/text/design-system-ui-11.html: Added. * fast/text/design-system-ui-12-expected-mismatch.html: Added. * fast/text/design-system-ui-12.html: Added. * fast/text/design-system-ui-13-expected-mismatch.html: Added. * fast/text/design-system-ui-13.html: Added. * fast/text/design-system-ui-14-expected-mismatch.html: Added. * fast/text/design-system-ui-14.html: Added. * fast/text/design-system-ui-15-expected-mismatch.html: Added. * fast/text/design-system-ui-15.html: Added. * fast/text/design-system-ui-16-expected-mismatch.html: Added. * fast/text/design-system-ui-16.html: Added. * fast/text/design-system-ui-2-expected.html: Added. * fast/text/design-system-ui-2.html: Added. * fast/text/design-system-ui-3-expected-mismatch.html: Added. * fast/text/design-system-ui-3.html: Added. * fast/text/design-system-ui-4-expected-mismatch.html: Added. * fast/text/design-system-ui-4.html: Added. * fast/text/design-system-ui-5-expected-mismatch.html: Added. * fast/text/design-system-ui-5.html: Added. * fast/text/design-system-ui-6-expected.html: Added. * fast/text/design-system-ui-6.html: Added. * fast/text/design-system-ui-7-expected.html: Added. * fast/text/design-system-ui-7.html: Added. * fast/text/design-system-ui-8-expected-mismatch.html: Added. * fast/text/design-system-ui-8.html: Added. * fast/text/design-system-ui-9-expected-mismatch.html: Added. * fast/text/design-system-ui-9.html: Added. * fast/text/design-system-ui-expected.html: Added. * fast/text/design-system-ui.html: Added. * platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/213612@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-12 01:08:29 +00:00
<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>