Changeset 129097 in webkit
- Timestamp:
- Sep 19, 2012 11:55:54 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r129095 r129097 1 2012-09-19 Dan Bernstein <mitz@apple.com> 2 3 WebCore part of adding a setting and API for disabling screen font substitution 4 https://bugs.webkit.org/show_bug.cgi?id=97168 5 6 Reviewed by Tim Horton. 7 8 * WebCore.exp.in: Added an entry for Settings::setScreenFontSubstitutionEnabled. 9 * css/StyleResolver.cpp: 10 (WebCore::StyleResolver::collectMatchingRulesForList): Changed to use printer fonts if 11 screen font substitution is not enabled. 12 * page/Settings.cpp: 13 (WebCore::Settings::Settings): Added initializer for new m_screenFontSubstitutionEnabled 14 member variable. The initial value is true, matching existing behavior. 15 (WebCore::Settings::setScreenFontSubstitutionEnabled): Added this setter, which updated the 16 member variable and forces a style recalc in all pages using this Settings. 17 * page/Settings.h: 18 (Settings): Added m_screenFontSubstitutionEnabled boolean member variable. 19 (WebCore::Settings::screenFontSubstitutionEnabled): Added this getter. 20 1 21 2012-09-19 Yoshifumi Inoue <yosin@chromium.org> 2 22 -
trunk/Source/WebCore/WebCore.exp.in
r128989 r129097 915 915 __ZN7WebCore8Settings32setAcceleratedCompositingEnabledEb 916 916 __ZN7WebCore8Settings32setNeedsAdobeFrameReloadingQuirkEb 917 __ZN7WebCore8Settings32setScreenFontSubstitutionEnabledEb 917 918 __ZN7WebCore8Settings32setShowsToolTipOverTruncatedTextEb 918 919 __ZN7WebCore8Settings33setDownloadableBinaryFontsEnabledEb -
trunk/Source/WebCore/css/StyleResolver.cpp
r128762 r129097 1713 1713 1714 1714 FontDescription fontDescription; 1715 fontDescription.setUsePrinterFont(document->printing());1716 1715 fontDescription.setScript(localeToScriptCodeForFontSelection(documentStyle->locale())); 1717 1716 if (Settings* settings = document->settings()) { 1717 fontDescription.setUsePrinterFont(document->printing() || !settings->screenFontSubstitutionEnabled()); 1718 1718 fontDescription.setRenderingMode(settings->fontRenderingMode()); 1719 1719 const AtomicString& standardFont = settings->standardFontFamily(fontDescription.script()); … … 1728 1728 bool useSVGZoomRules = document->isSVGDocument(); 1729 1729 fontDescription.setComputedSize(StyleResolver::getComputedSizeFromSpecifiedSize(document, documentStyle.get(), fontDescription.isAbsoluteSize(), size, useSVGZoomRules)); 1730 } 1730 } else 1731 fontDescription.setUsePrinterFont(document->printing()); 1731 1732 1732 1733 documentStyle->setFontDescription(fontDescription); … … 3729 3730 return; 3730 3731 fontDescription.setRenderingMode(settings->fontRenderingMode()); 3731 fontDescription.setUsePrinterFont(m_checker.document()->printing() );3732 fontDescription.setUsePrinterFont(m_checker.document()->printing() || !settings->screenFontSubstitutionEnabled()); 3732 3733 3733 3734 // Handle the zoom factor. … … 4610 4611 fontDescription.setGenericFamily(FontDescription::StandardFamily); 4611 4612 fontDescription.setRenderingMode(settings->fontRenderingMode()); 4612 fontDescription.setUsePrinterFont(m_checker.document()->printing() );4613 fontDescription.setUsePrinterFont(m_checker.document()->printing() || !settings->screenFontSubstitutionEnabled()); 4613 4614 const AtomicString& standardFontFamily = documentSettings()->standardFontFamily(); 4614 4615 if (!standardFontFamily.isEmpty()) { -
trunk/Source/WebCore/page/Settings.cpp
r128963 r129097 131 131 , m_defaultFontSize(0) 132 132 , m_defaultFixedFontSize(0) 133 , m_screenFontSubstitutionEnabled(true) 133 134 , m_validationMessageTimerMagnification(50) 134 135 , m_minimumAccelerated2dCanvasSize(257 * 256) … … 419 420 } 420 421 422 void Settings::setScreenFontSubstitutionEnabled(bool screenFontSubstitutionEnabled) 423 { 424 if (m_screenFontSubstitutionEnabled == screenFontSubstitutionEnabled) 425 return; 426 427 m_screenFontSubstitutionEnabled = screenFontSubstitutionEnabled; 428 m_page->setNeedsRecalcStyleInAllFrames(); 429 } 430 421 431 #if ENABLE(TEXT_AUTOSIZING) 422 432 void Settings::setTextAutosizingEnabled(bool textAutosizingEnabled) -
trunk/Source/WebCore/page/Settings.h
r128963 r129097 109 109 int defaultFixedFontSize() const { return m_defaultFixedFontSize; } 110 110 111 void setScreenFontSubstitutionEnabled(bool); 112 bool screenFontSubstitutionEnabled() const { return m_screenFontSubstitutionEnabled; } 113 111 114 #if ENABLE(TEXT_AUTOSIZING) 112 115 void setTextAutosizingEnabled(bool); … … 656 659 int m_defaultFontSize; 657 660 int m_defaultFixedFontSize; 661 bool m_screenFontSubstitutionEnabled; 658 662 int m_validationMessageTimerMagnification; 659 663 int m_minimumAccelerated2dCanvasSize; -
trunk/Source/WebKit/mac/ChangeLog
r128839 r129097 1 2012-09-19 Dan Bernstein <mitz@apple.com> 2 3 WebKit/mac part of adding a setting and API for disabling screen font substitution 4 https://bugs.webkit.org/show_bug.cgi?id=97168 5 6 Reviewed by Tim Horton. 7 8 * WebView/WebPreferenceKeysPrivate.h: Defined WebKitScreenFontSubstitutionEnabledKey. 9 * WebView/WebPreferences.mm: 10 (+[WebPreferences initialize]): Added a default value of YES for the new preference key. 11 (-[WebPreferences setScreenFontSubstitutionEnabled:]): Added this setter. 12 * WebView/WebPreferencesPrivate.h: 13 * WebView/WebView.mm: 14 (-[WebView _preferencesChanged:]): Added a call to Settings::setScreenFontSubstitutionEnabled 15 to push the preference down to Settings. 16 1 17 2012-09-17 Dan Bernstein <mitz@apple.com> 2 18 -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r123775 r129097 126 126 #define WebKitRequestAnimationFrameEnabledPreferenceKey @"WebKitRequestAnimationFrameEnabled" 127 127 #define WebKitDiagnosticLoggingEnabledKey @"WebKitDiagnosticLoggingEnabled" 128 #define WebKitScreenFontSubstitutionEnabledKey @"WebKitScreenFontSubstitutionEnabled" 128 129 129 130 // These are private both because callers should be using the cover methods and because the -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r123775 r129097 400 400 [NSNumber numberWithBool:NO], WebKitWantsBalancedSetDefersLoadingBehaviorKey, 401 401 [NSNumber numberWithBool:NO], WebKitDiagnosticLoggingEnabledKey, 402 [NSNumber numberWithBool:YES], WebKitScreenFontSubstitutionEnabledKey, 402 403 403 404 [NSNumber numberWithLongLong:ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota, … … 1740 1741 } 1741 1742 1743 - (BOOL)screenFontSubstitutionEnabled 1744 { 1745 return [self _boolValueForKey:WebKitScreenFontSubstitutionEnabledKey]; 1746 } 1747 1748 - (void)setScreenFontSubstitutionEnabled:(BOOL)enabled 1749 { 1750 [self _setBoolValue:enabled forKey:WebKitScreenFontSubstitutionEnabledKey]; 1751 } 1752 1742 1753 @end 1743 1754 -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r123775 r129097 306 306 - (void)setDiagnosticLoggingEnabled:(BOOL)enabled; 307 307 308 - (BOOL)screenFontSubstitutionEnabled; 309 - (void)setScreenFontSubstitutionEnabled:(BOOL)enabled; 310 308 311 @end -
trunk/Source/WebKit/mac/WebView/WebView.mm
r128839 r129097 1431 1431 settings->setFantasyFontFamily([preferences fantasyFontFamily]); 1432 1432 settings->setFixedFontFamily([preferences fixedFontFamily]); 1433 settings->setScreenFontSubstitutionEnabled([preferences screenFontSubstitutionEnabled]); 1433 1434 settings->setForceFTPDirectoryListings([preferences _forceFTPDirectoryListings]); 1434 1435 settings->setFTPDirectoryTemplatePath([preferences _ftpDirectoryTemplatePath]); -
trunk/Source/WebKit2/ChangeLog
r129096 r129097 1 2012-09-19 Dan Bernstein <mitz@apple.com> 2 3 WebKit2 part of adding a setting and API for disabling screen font substitution 4 https://bugs.webkit.org/show_bug.cgi?id=97168 5 6 Reviewed by Tim Horton. 7 8 * Shared/WebPreferencesStore.h: 9 (WebKit): Defined ScreenFontSubstitutionEnabled key with a default value of true. 10 * UIProcess/API/C/WKPreferences.cpp: 11 (WKPreferencesSetScreenFontSubstitutionEnabled): Added this setter. 12 (WKPreferencesGetScreenFontSubstitutionEnabled): Added this getter. 13 * UIProcess/API/C/WKPreferencesPrivate.h: 14 * WebProcess/WebPage/WebPage.cpp: 15 (WebKit::WebPage::updatePreferences): Added a call to Settings::setScreenFontSubstitutionEnabled 16 to push the preference into Settings. 17 1 18 2012-09-19 Jinwoo Song <jinwoo7.song@samsung.com> 2 19 -
trunk/Source/WebKit2/Shared/WebPreferencesStore.h
r128030 r129097 129 129 macro(StorageBlockingPolicy, storageBlockingPolicy, UInt32, uint32_t, 0) \ 130 130 macro(ScrollAnimatorEnabled, scrollAnimatorEnabled, Bool, bool, DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED) \ 131 macro(ScreenFontSubstitutionEnabled, screenFontSubstitutionEnabled, Bool, bool, true) \ 131 132 \ 132 133 -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
r129096 r129097 289 289 } 290 290 291 void WKPreferencesSetScreenFontSubstitutionEnabled(WKPreferencesRef preferencesRef, bool enabled) 292 { 293 toImpl(preferencesRef)->setScreenFontSubstitutionEnabled(enabled); 294 } 295 296 bool WKPreferencesGetScreenFontSubstitutionEnabled(WKPreferencesRef preferencesRef) 297 { 298 return toImpl(preferencesRef)->screenFontSubstitutionEnabled(); 299 } 300 291 301 void WKPreferencesSetEditableLinkBehavior(WKPreferencesRef preferencesRef, WKEditableLinkBehavior wkBehavior) 292 302 { -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h
r128030 r129097 216 216 WK_EXPORT bool WKPreferencesGetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef); 217 217 218 // Defaults to true 219 WK_EXPORT void WKPreferencesSetScreenFontSubstitutionEnabled(WKPreferencesRef preferences, bool enabled); 220 WK_EXPORT bool WKPreferencesGetScreenFontSubstitutionEnabled(WKPreferencesRef preferences); 221 218 222 WK_EXPORT void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef); 219 223 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r129096 r129097 2057 2057 settings->setDefaultFontSize(store.getUInt32ValueForKey(WebPreferencesKey::defaultFontSizeKey())); 2058 2058 settings->setDefaultFixedFontSize(store.getUInt32ValueForKey(WebPreferencesKey::defaultFixedFontSizeKey())); 2059 settings->setScreenFontSubstitutionEnabled(store.getBoolValueForKey(WebPreferencesKey::screenFontSubstitutionEnabledKey())); 2059 2060 settings->setLayoutFallbackWidth(store.getUInt32ValueForKey(WebPreferencesKey::layoutFallbackWidthKey())); 2060 2061 settings->setDeviceWidth(store.getUInt32ValueForKey(WebPreferencesKey::deviceWidthKey()));
Note: See TracChangeset
for help on using the changeset viewer.