Changeset 163702 in webkit


Ignore:
Timestamp:
Feb 8, 2014 12:42:07 AM (10 years ago)
Author:
mitz@apple.com
Message:

Font size-related preference values should be CGFloats backed by doubles
https://bugs.webkit.org/show_bug.cgi?id=128445

Reviewed by Filip Pizlo.

  • Shared/WebPreferencesStore.h: Changed minimumFontSize, minimumLogicalFontSize,

defaultFontSize, and defaultFixedFontSize into double-value preferences.

  • UIProcess/API/Cocoa/WKPreferences.h: Changed minimumFontSize into CGFloat.
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences minimumFontSize]): Changed return type.
(-[WKPreferences setMinimumFontSize:]): Changed parameter type.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences): Changed to use double getters.

Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r163698 r163702  
     12014-02-08  Dan Bernstein  <mitz@apple.com>
     2
     3        Font size-related preference values should be CGFloats backed by doubles
     4        https://bugs.webkit.org/show_bug.cgi?id=128445
     5
     6        Reviewed by Filip Pizlo.
     7
     8        * Shared/WebPreferencesStore.h: Changed minimumFontSize, minimumLogicalFontSize,
     9        defaultFontSize, and defaultFixedFontSize into double-value preferences.
     10        * UIProcess/API/Cocoa/WKPreferences.h: Changed minimumFontSize into CGFloat.
     11        * UIProcess/API/Cocoa/WKPreferences.mm:
     12        (-[WKPreferences minimumFontSize]): Changed return type.
     13        (-[WKPreferences setMinimumFontSize:]): Changed parameter type.
     14        * WebProcess/WebPage/WebPage.cpp:
     15        (WebKit::WebPage::updatePreferences): Changed to use double getters.
     16
    1172014-02-08  Adrian Perez de Castro  <aperez@igalia.com>
    218
  • trunk/Source/WebKit2/Shared/WebPreferencesStore.h

    r163643 r163702  
    196196    macro(PDFScaleFactor, pdfScaleFactor, Double, double, 0) \
    197197    macro(IncrementalRenderingSuppressionTimeout, incrementalRenderingSuppressionTimeout, Double, double, 5) \
     198    macro(MinimumFontSize, minimumFontSize, Double, double, 0) \
     199    macro(MinimumLogicalFontSize, minimumLogicalFontSize, Double, double, 9) \
     200    macro(DefaultFontSize, defaultFontSize, Double, double, 16) \
     201    macro(DefaultFixedFontSize, defaultFixedFontSize, Double, double, 13) \
    198202    \
    199203
     
    203207#define FOR_EACH_WEBKIT_UINT32_PREFERENCE(macro) \
    204208    macro(FontSmoothingLevel, fontSmoothingLevel, UInt32, uint32_t, FontSmoothingLevelMedium) \
    205     macro(MinimumFontSize, minimumFontSize, UInt32, uint32_t, 0) \
    206     macro(MinimumLogicalFontSize, minimumLogicalFontSize, UInt32, uint32_t, 9) \
    207     macro(DefaultFontSize, defaultFontSize, UInt32, uint32_t, 16) \
    208     macro(DefaultFixedFontSize, defaultFixedFontSize, UInt32, uint32_t, 13) \
    209209    macro(LayoutFallbackWidth, layoutFallbackWidth, UInt32, uint32_t, 980) \
    210210    macro(DeviceWidth, deviceWidth, UInt32, uint32_t, 0) \
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.h

    r163681 r163702  
    3636@interface WKPreferences : NSObject
    3737
    38 @property (nonatomic) unsigned minimumFontSize;
     38@property (nonatomic) CGFloat minimumFontSize;
    3939
    4040@end
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm

    r163681 r163702  
    4343}
    4444
    45 - (unsigned)minimumFontSize
     45- (CGFloat)minimumFontSize
    4646{
    4747    return _preferences->minimumFontSize();
    4848}
    4949
    50 - (void)setMinimumFontSize:(unsigned)minimumFontSize
     50- (void)setMinimumFontSize:(CGFloat)minimumFontSize
    5151{
    5252    _preferences->setMinimumFontSize(minimumFontSize);
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r163679 r163702  
    24382438    settings.setAllowFileAccessFromFileURLs(store.getBoolValueForKey(WebPreferencesKey::allowFileAccessFromFileURLsKey()));
    24392439
    2440     settings.setMinimumFontSize(store.getUInt32ValueForKey(WebPreferencesKey::minimumFontSizeKey()));
    2441     settings.setMinimumLogicalFontSize(store.getUInt32ValueForKey(WebPreferencesKey::minimumLogicalFontSizeKey()));
    2442     settings.setDefaultFontSize(store.getUInt32ValueForKey(WebPreferencesKey::defaultFontSizeKey()));
    2443     settings.setDefaultFixedFontSize(store.getUInt32ValueForKey(WebPreferencesKey::defaultFixedFontSizeKey()));
     2440    settings.setMinimumFontSize(store.getDoubleValueForKey(WebPreferencesKey::minimumFontSizeKey()));
     2441    settings.setMinimumLogicalFontSize(store.getDoubleValueForKey(WebPreferencesKey::minimumLogicalFontSizeKey()));
     2442    settings.setDefaultFontSize(store.getDoubleValueForKey(WebPreferencesKey::defaultFontSizeKey()));
     2443    settings.setDefaultFixedFontSize(store.getDoubleValueForKey(WebPreferencesKey::defaultFixedFontSizeKey()));
    24442444    settings.setScreenFontSubstitutionEnabled(store.getBoolValueForKey(WebPreferencesKey::screenFontSubstitutionEnabledKey())
    24452445#if PLATFORM(MAC)
Note: See TracChangeset for help on using the changeset viewer.