Remove support for screen font substitution
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jan 2015 22:40:17 +0000 (22:40 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jan 2015 22:40:17 +0000 (22:40 +0000)
commit5804230c078f665554c9ea82f0574a97e87714e8
tree29bbd67badb1faebae97a80eeb53c81e7825bad7
parent233dc98dc7ff85edecce0b014272587d449ffb1d
Remove support for screen font substitution
https://bugs.webkit.org/show_bug.cgi?id=141038

Reviewed by Tim Horton.

Source/WebCore:

- Removes the screen font substitution setting (which was only on in Mountain Lion)
- Remove the concept of a printer font, from the family of Font related classes.

* WebCore.exp.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::initializeFontStyle):
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Deleted.
(WebCore::Settings::setScreenFontSubstitutionEnabled): Deleted.
* page/Settings.h:
(WebCore::Settings::screenFontSubstitutionEnabled): Deleted.
* page/mac/SettingsMac.mm:
(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Deleted.
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::FontCascade):
* platform/graphics/FontCascade.h:
(WebCore::FontCascade::isPrinterFont): Deleted.
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::setWeight):
(WebCore::FontDescription::equalForTextAutoSizing):
(WebCore::FontDescription::operator==):
(WebCore::FontDescription::usePrinterFont): Deleted.
(WebCore::FontDescription::setUsePrinterFont): Deleted.
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::isCompositeFontReference):
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::operator==):
(WebCore::FontPlatformData::isPrinterFont): Deleted.
* platform/graphics/WidthIterator.h:
(WebCore::WidthIterator::supportsTypesettingFeatures):
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawGlyphs):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::platformDataAssign):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::getSystemFontFallbackForCharacters):
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/ios/SimpleFontDataIOS.mm:
(WebCore::Font::platformCreateScaledFont):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::Font::compositeFontReferenceFont):
(WebCore::Font::platformCreateScaledFont):
* platform/mac/DragImageMac.mm:
(WebCore::fontFromNSFont):
(WebCore::widthWithFont):
(WebCore::drawAtPoint):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):

Source/WebKit/mac:

* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
(-[NSString _web_widthWithFont:]):
* Misc/WebStringTruncator.mm:
(fontFromNSFont):
Update for new signature of the FontPlatformData constructor, which no longer cares about
whether to use printer fonts.

* WebView/WebPreferenceKeysPrivate.h:
Remove the WebKitScreenFontSubstitutionEnabledKey key.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
Remove support for WebKitScreenFontSubstitutionEnabledKey.

(needsScreenFontsEnabledQuirk): Deleted.
Remove support for the Mountain Lion era 1-Password quirk.

(-[WebPreferences screenFontSubstitutionEnabled]): Deleted.
(-[WebPreferences setScreenFontSubstitutionEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView _preferencesChanged:]):
Remove support for the screen font substitution setting.

Source/WebKit/win:

* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::screenFontSubstitutionEnabled):
(WebPreferences::setScreenFontSubstitutionEnabled):
Remove implementations. Have this setting set on windows didn't have any effect before,
so this doesn't change behavior.

Source/WebKit2:

* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPreferencesSetScreenFontSubstitutionEnabled):
(WKPreferencesGetScreenFontSubstitutionEnabled):
Move now empty preferences SPI to WKDeprecatedFunctions.

* Shared/WebPreferencesDefinitions.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetScreenFontSubstitutionEnabled): Deleted.
(WKPreferencesGetScreenFontSubstitutionEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::presenterApplicationPid):
(WebKit::WebProcess::shouldForceScreenFontSubstitution): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Stop piping screen font substitution setting to the web process.

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
Remove call to now setScreenFontSubstitutionEnabled() which is a no-op.

LayoutTests:

* platform/mac/fast/text/international/hindi-spacing-expected.txt:
Update results now that buttons always use printer fonts. We were accidentally
allowing buttons to use screen fonts, which usually didn't make a difference,
but does with some fallback fonts.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
47 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/fast/text/international/hindi-spacing-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/page/mac/SettingsMac.mm
Source/WebCore/platform/graphics/FontCache.h
Source/WebCore/platform/graphics/FontCascade.cpp
Source/WebCore/platform/graphics/FontCascade.h
Source/WebCore/platform/graphics/FontDescription.h
Source/WebCore/platform/graphics/FontPlatformData.h
Source/WebCore/platform/graphics/WidthIterator.h
Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm
Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm
Source/WebCore/platform/graphics/ios/FontCacheIOS.mm
Source/WebCore/platform/graphics/ios/SimpleFontDataIOS.mm
Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
Source/WebCore/platform/graphics/mac/FontCacheMac.mm
Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
Source/WebCore/platform/mac/DragImageMac.mm
Source/WebCore/style/StyleResolveForDocument.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Misc/WebKitNSStringExtras.mm
Source/WebKit/mac/Misc/WebStringTruncator.mm
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebPreferenceKeysPrivate.h
Source/WebKit/win/WebPreferences.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/Shared/WebProcessCreationParameters.cpp
Source/WebKit2/Shared/WebProcessCreationParameters.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebProcess.h
Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm
Tools/ChangeLog
Tools/DumpRenderTree/win/DumpRenderTree.cpp