Changeset 91777 in webkit
- Timestamp:
- Jul 26, 2011, 1:23:50 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r91775 r91777 1 2011-07-26 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/9842889> Add a generic pictograph font family Add a generic pictograph font family 4 https://bugs.webkit.org/show_bug.cgi?id=65197 5 6 Reviewed by Anders Carlsson. 7 8 * fast/css/font-family-pictograph.html: Added. 9 * platform/mac/fast/css/font-family-pictograph-expected.png: Added. 10 * platform/mac/fast/css/font-family-pictograph-expected.txt: Added. 11 1 12 2011-07-26 Adrienne Walker <enne@google.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r91774 r91777 1 2011-07-26 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/9842889> Add a generic pictograph font family Add a generic pictograph font family 4 https://bugs.webkit.org/show_bug.cgi?id=65197 5 6 Reviewed by Anders Carlsson. 7 8 Test: fast/css/font-family-pictograph.html 9 10 * WebCore.exp.in: Export Settings::setPictographFontFamily(). 11 * css/CSSComputedStyleDeclaration.cpp: 12 (WebCore::identifierForFamily): Added -webkit-pictograph. 13 * css/CSSFontSelector.cpp: 14 (WebCore::CSSFontSelector::addFontFaceRule): Ditto. 15 (WebCore::fontDataForGenericFamily): Ditto. 16 * css/CSSStyleSelector.cpp: 17 (WebCore::CSSStyleSelector::applyProperty): Ditto. 18 * css/CSSValueKeywords.in: 19 * inspector/front-end/CSSKeywordCompletions.js: Ditto. 20 * inspector/front-end/SourceCSSTokenizer.js: Ditto. 21 (WebInspector.SourceCSSTokenizer): 22 * inspector/front-end/SourceCSSTokenizer.re2js: Ditto. 23 * page/Settings.cpp: 24 (WebCore::Settings::pictographFontFamily): Added this getter. 25 (WebCore::Settings::setPictographFontFamily): Added this setter. 26 * page/Settings.h: 27 * platform/graphics/FontDescription.h: Added PictographFamily to the GenericFamilyType enum. 28 1 29 2011-07-26 Viet-Trung Luu <viettrungluu@chromium.org> 2 30 -
trunk/Source/WebCore/WebCore.exp.in
r91616 r91777 885 885 __ZN7WebCore8Settings23setLoadDeferringEnabledEb 886 886 __ZN7WebCore8Settings23setNeedsTigerMailQuirksEb 887 __ZN7WebCore8Settings23setPictographFontFamilyERKN3WTF12AtomicStringE11UScriptCode 887 888 __ZN7WebCore8Settings23setPluginAllowedRunTimeEj 888 889 __ZN7WebCore8Settings23setUsesEncodingDetectorEb -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r91286 r91777 682 682 static int identifierForFamily(const AtomicString& family) 683 683 { 684 DEFINE_STATIC_LOCAL(AtomicString, cursiveFamily, ("-webkit-cursive")); 685 DEFINE_STATIC_LOCAL(AtomicString, fantasyFamily, ("-webkit-fantasy")); 686 DEFINE_STATIC_LOCAL(AtomicString, monospaceFamily, ("-webkit-monospace")); 687 DEFINE_STATIC_LOCAL(AtomicString, sansSerifFamily, ("-webkit-sans-serif")); 688 DEFINE_STATIC_LOCAL(AtomicString, serifFamily, ("-webkit-serif")); 684 DEFINE_STATIC_LOCAL(AtomicString, cursiveFamily, ("-webkit-cursive")); 685 DEFINE_STATIC_LOCAL(AtomicString, fantasyFamily, ("-webkit-fantasy")); 686 DEFINE_STATIC_LOCAL(AtomicString, monospaceFamily, ("-webkit-monospace")); 687 DEFINE_STATIC_LOCAL(AtomicString, pictographFamily, ("-webkit-pictograph")); 688 DEFINE_STATIC_LOCAL(AtomicString, sansSerifFamily, ("-webkit-sans-serif")); 689 DEFINE_STATIC_LOCAL(AtomicString, serifFamily, ("-webkit-serif")); 689 690 if (family == cursiveFamily) 690 691 return CSSValueCursive; … … 693 694 if (family == monospaceFamily) 694 695 return CSSValueMonospace; 696 if (family == pictographFamily) 697 return CSSValueWebkitPictograph; 695 698 if (family == sansSerifFamily) 696 699 return CSSValueSansSerif; -
trunk/Source/WebCore/css/CSSFontSelector.cpp
r87239 r91777 311 311 familyName = "-webkit-monospace"; 312 312 break; 313 case CSSValueWebkitPictograph: 314 familyName = "-webkit-pictograph"; 315 break; 313 316 default: 314 317 break; … … 400 403 else if (familyName == "-webkit-monospace") 401 404 genericFamily = settings->fixedFontFamily(); 405 else if (familyName == "-webkit-pictograph") 406 genericFamily = settings->pictographFontFamily(); 402 407 else if (familyName == "-webkit-standard") 403 408 genericFamily = settings->standardFontFamily(); -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r91702 r91777 4213 4213 face = "-webkit-monospace"; 4214 4214 fontDescription.setGenericFamily(FontDescription::MonospaceFamily); 4215 break; 4216 case CSSValueWebkitPictograph: 4217 face = "-webkit-pictograph"; 4218 fontDescription.setGenericFamily(FontDescription::PictographFamily); 4215 4219 break; 4216 4220 } -
trunk/Source/WebCore/css/CSSValueKeywords.in
r91702 r91777 105 105 monospace 106 106 -webkit-body 107 -webkit-pictograph 107 108 // 108 109 // -
trunk/Source/WebCore/inspector/front-end/CSSKeywordCompletions.js
r87894 r91777 290 290 "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", 291 291 "large", "x-large", "xx-large", "-webkit-xxx-large", "smaller", "larger", "serif", "sans-serif", "cursive", 292 "fantasy", "monospace", "-webkit-body" 292 "fantasy", "monospace", "-webkit-body", "-webkit-pictograph" 293 293 ], 294 294 "dominant-baseline": [ … … 354 354 ], 355 355 "font-family": [ 356 "serif", "sans-serif", "cursive", "fantasy", "monospace", "-webkit-body" 356 "serif", "sans-serif", "cursive", "fantasy", "monospace", "-webkit-body", "-webkit-pictograph" 357 357 ], 358 358 "text-overflow-mode": [ -
trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.js
r86430 r91777 94 94 "x-large", "x-small", "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle", 95 95 "-webkit-body", "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing", 96 "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit- right",97 "-webkit- small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",96 "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-pictograph", 97 "-webkit-right", "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out", 98 98 ].keySet(); 99 99 -
trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js
r86430 r91777 93 93 "x-large", "x-small", "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle", 94 94 "-webkit-body", "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing", 95 "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit- right",96 "-webkit- small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",95 "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-pictograph", 96 "-webkit-right", "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out", 97 97 ].keySet(); 98 98 -
trunk/Source/WebCore/page/Settings.cpp
r91638 r91777 276 276 } 277 277 278 const AtomicString& Settings::pictographFontFamily(UScriptCode script) const 279 { 280 return getGenericFontFamilyForScript(m_pictographFontFamilyMap, script); 281 } 282 283 void Settings::setPictographFontFamily(const AtomicString& family, UScriptCode script) 284 { 285 setGenericFontFamilyMap(m_pictographFontFamilyMap, family, script, m_page); 286 } 287 278 288 void Settings::setMinimumFontSize(int minimumFontSize) 279 289 { -
trunk/Source/WebCore/page/Settings.h
r91638 r91777 89 89 const AtomicString& fantasyFontFamily(UScriptCode = USCRIPT_COMMON) const; 90 90 91 void setPictographFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON); 92 const AtomicString& pictographFontFamily(UScriptCode = USCRIPT_COMMON) const; 93 91 94 void setMinimumFontSize(int); 92 95 int minimumFontSize() const { return m_minimumFontSize; } … … 463 466 ScriptFontFamilyMap m_cursiveFontFamilyMap; 464 467 ScriptFontFamilyMap m_fantasyFontFamilyMap; 468 ScriptFontFamilyMap m_pictographFontFamilyMap; 465 469 EditableLinkBehavior m_editableLinkBehavior; 466 470 TextDirectionSubmenuInclusionBehavior m_textDirectionSubmenuInclusionBehavior; -
trunk/Source/WebCore/platform/graphics/FontDescription.h
r89705 r91777 65 65 public: 66 66 enum GenericFamilyType { NoFamily, StandardFamily, SerifFamily, SansSerifFamily, 67 MonospaceFamily, CursiveFamily, FantasyFamily };67 MonospaceFamily, CursiveFamily, FantasyFamily, PictographFamily }; 68 68 69 69 FontDescription() -
trunk/Source/WebKit/mac/ChangeLog
r91727 r91777 1 2011-07-26 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/9842889> Add a generic pictograph font family 4 https://bugs.webkit.org/show_bug.cgi?id=65197 5 6 Reviewed by Anders Carlsson. 7 8 * WebView/WebPreferenceKeysPrivate.h: Added WebKitPictographFontPreferenceKey. 9 * WebView/WebPreferences.mm: 10 (+[WebPreferences initialize]): Set the default pictograph font family to 11 "Apple Color Emoji". 12 (-[WebPreferences pictographFontFamily]): Added this getter. 13 (-[WebPreferences setPictographFontFamily:]): Added this setter. 14 * WebView/WebPreferencesPrivate.h: 15 * WebView/WebView.mm: 16 (-[WebView _preferencesChanged:]): Pass the preference through to WebCore. 17 1 18 2011-07-25 Ian Henderson <ianh@apple.com> 2 19 -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r91232 r91777 37 37 #define WebKitCursiveFontPreferenceKey @"WebKitCursiveFont" 38 38 #define WebKitFantasyFontPreferenceKey @"WebKitFantasyFont" 39 #define WebKitPictographFontPreferenceKey @"WebKitPictographFont" 39 40 #define WebKitMinimumFontSizePreferenceKey @"WebKitMinimumFontSize" 40 41 #define WebKitMinimumLogicalFontSizePreferenceKey @"WebKitMinimumLogicalFontSize" -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r91232 r91777 307 307 @"Apple Chancery", WebKitCursiveFontPreferenceKey, 308 308 @"Papyrus", WebKitFantasyFontPreferenceKey, 309 @"Apple Color Emoji", WebKitPictographFontPreferenceKey, 309 310 @"0", WebKitMinimumFontSizePreferenceKey, 310 311 @"9", WebKitMinimumLogicalFontSizePreferenceKey, … … 1507 1508 [self _setBoolValue:flag forKey:WebKitMediaPlaybackAllowsInlinePreferenceKey]; 1508 1509 } 1510 1511 - (NSString *)pictographFontFamily 1512 { 1513 return [self _stringValueForKey: WebKitPictographFontPreferenceKey]; 1514 } 1515 1516 - (void)setPictographFontFamily:(NSString *)family 1517 { 1518 [self _setStringValue: family forKey: WebKitPictographFontPreferenceKey]; 1519 } 1520 1509 1521 @end 1510 1522 -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r91232 r91777 217 217 - (BOOL)mediaPlaybackAllowsInline; 218 218 219 - (NSString *)pictographFontFamily; 220 - (void)setPictographFontFamily:(NSString *)family; 221 219 222 // Other private methods 220 223 - (void)_postPreferencesChangedNotification; -
trunk/Source/WebKit/mac/WebView/WebView.mm
r91232 r91777 1510 1510 settings->setMinimumFontSize([preferences minimumFontSize]); 1511 1511 settings->setMinimumLogicalFontSize([preferences minimumLogicalFontSize]); 1512 settings->setPictographFontFamily([preferences pictographFontFamily]); 1512 1513 settings->setPluginsEnabled([preferences arePlugInsEnabled]); 1513 1514 #if ENABLE(DATABASE) -
trunk/Source/WebKit/win/ChangeLog
r91232 r91777 1 2011-07-26 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/9842889> Add a generic pictograph font family 4 https://bugs.webkit.org/show_bug.cgi?id=65197 5 6 Reviewed by Anders Carlsson. 7 8 * Interfaces/IWebPreferences.idl: Added pictographFontFamily() and 9 setPictographFontFamily(). 10 * WebPreferenceKeysPrivate.h: Added WebKitPictographFontPreferenceKey. 11 * WebPreferences.cpp: 12 (WebPreferences::initializeDefaultSettings): Initialize the pictograph font 13 preference to "Times New Roman". 14 (WebPreferences::pictographFontFamily): Added this getter. 15 (WebPreferences::setPictographFontFamily): Added this setter. 16 * WebPreferences.h: 17 * WebView.cpp: 18 (WebView::notifyPreferencesChanged): Pass the preference value through to 19 WebCore. 20 1 21 2011-07-18 Dean Jackson <dino@apple.com> 2 22 -
trunk/Source/WebKit/win/Interfaces/IWebPreferences.idl
r70975 r91777 99 99 HRESULT setFantasyFontFamily([in] BSTR family); 100 100 101 HRESULT pictographFontFamily([out, retval] BSTR* family); 102 HRESULT setPictographFontFamily([in] BSTR family); 103 101 104 HRESULT defaultFontSize([out, retval] int* fontSize); 102 105 HRESULT setDefaultFontSize([in] int fontSize); -
trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h
r91232 r91777 37 37 #define WebKitCursiveFontPreferenceKey "WebKitCursiveFont" 38 38 #define WebKitFantasyFontPreferenceKey "WebKitFantasyFont" 39 #define WebKitPictographFontPreferenceKey "WebKitPictographFont" 39 40 #define WebKitMinimumFontSizePreferenceKey "WebKitMinimumFontSize" 40 41 #define WebKitMinimumLogicalFontSizePreferenceKey "WebKitMinimumLogicalFontSize" -
trunk/Source/WebKit/win/WebPreferences.cpp
r91232 r91777 190 190 CFDictionaryAddValue(defaults, CFSTR(WebKitCursiveFontPreferenceKey), CFSTR("Comic Sans MS")); 191 191 CFDictionaryAddValue(defaults, CFSTR(WebKitFantasyFontPreferenceKey), CFSTR("Comic Sans MS")); 192 CFDictionaryAddValue(defaults, CFSTR(WebKitPictographFontPreferenceKey), CFSTR("Times New Roman")); 192 193 CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumFontSizePreferenceKey), CFSTR("0")); 193 194 CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumLogicalFontSizePreferenceKey), CFSTR("9")); … … 653 654 } 654 655 656 HRESULT STDMETHODCALLTYPE WebPreferences::pictographFontFamily( 657 /* [retval][out] */ BSTR* family) 658 { 659 *family = stringValueForKey(CFSTR(WebKitPictographFontPreferenceKey)); 660 return (*family) ? S_OK : E_FAIL; 661 } 662 663 HRESULT STDMETHODCALLTYPE WebPreferences::setPictographFontFamily( 664 /* [in] */ BSTR family) 665 { 666 setStringValue(CFSTR(WebKitPictographFontPreferenceKey), family); 667 return S_OK; 668 } 669 655 670 HRESULT STDMETHODCALLTYPE WebPreferences::defaultFontSize( 656 671 /* [retval][out] */ int* fontSize) -
trunk/Source/WebKit/win/WebPreferences.h
r91232 r91777 92 92 /* [in] */ BSTR family); 93 93 94 virtual HRESULT STDMETHODCALLTYPE pictographFontFamily( 95 /* [retval][out] */ BSTR* family); 96 97 virtual HRESULT STDMETHODCALLTYPE setPictographFontFamily( 98 /* [in] */ BSTR family); 99 94 100 virtual HRESULT STDMETHODCALLTYPE defaultFontSize( 95 101 /* [retval][out] */ int* fontSize); -
trunk/Source/WebKit/win/WebView.cpp
r91232 r91777 4578 4578 SysFreeString(str); 4579 4579 4580 hr = preferences->pictographFontFamily(&str); 4581 if (FAILED(hr)) 4582 return hr; 4583 settings->setPictographFontFamily(AtomicString(str, SysStringLen(str))); 4584 SysFreeString(str); 4585 4580 4586 hr = preferences->isJavaEnabled(&enabled); 4581 4587 if (FAILED(hr)) -
trunk/Source/WebKit2/ChangeLog
r91766 r91777 1 2011-07-26 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/9842889> Add a generic pictograph font family 4 https://bugs.webkit.org/show_bug.cgi?id=65197 5 6 Reviewed by Anders Carlsson. 7 8 * Shared/WebPreferencesStore.h: 9 * UIProcess/API/C/WKPreferences.cpp: 10 (WKPreferencesSetPictographFontFamily): Added. 11 (WKPreferencesCopyPictographFontFamily): Added. 12 * UIProcess/API/C/WKPreferences.h: 13 1 14 2011-07-26 Andras Becsi <abecsi@webkit.org> 2 15 -
trunk/Source/WebKit2/Shared/WebPreferencesStore.h
r91232 r91777 110 110 macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Arial") \ 111 111 macro(SerifFontFamily, serifFontFamily, String, String, "Times New Roman") \ 112 macro(PictographFontFamily, pictographFontFamily, String, String, "Times New Roman") \ 112 113 \ 113 114 … … 121 122 macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Helvetica") \ 122 123 macro(SerifFontFamily, serifFontFamily, String, String, "Times") \ 124 macro(PictographFontFamily, pictographFontFamily, String, String, "Apple Color Emoji") \ 123 125 \ 124 126 -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
r91232 r91777 233 233 } 234 234 235 void WKPreferencesSetPictographFontFamily(WKPreferencesRef preferencesRef, WKStringRef family) 236 { 237 toImpl(preferencesRef)->setPictographFontFamily(toWTFString(family)); 238 } 239 240 WKStringRef WKPreferencesCopyPictographFontFamily(WKPreferencesRef preferencesRef) 241 { 242 return toCopiedAPI(toImpl(preferencesRef)->pictographFontFamily()); 243 } 244 235 245 void WKPreferencesSetDefaultFontSize(WKPreferencesRef preferencesRef, uint32_t size) 236 246 { -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.h
r84648 r91777 108 108 WK_EXPORT WKStringRef WKPreferencesCopyFantasyFontFamily(WKPreferencesRef preferencesRef); 109 109 110 WK_EXPORT void WKPreferencesSetPictographFontFamily(WKPreferencesRef preferencesRef, WKStringRef family); 111 WK_EXPORT WKStringRef WKPreferencesCopyPictographFontFamily(WKPreferencesRef preferencesRef); 112 110 113 // Defaults to 16. 111 114 WK_EXPORT void WKPreferencesSetDefaultFontSize(WKPreferencesRef preferencesRef, uint32_t);
Note:
See TracChangeset
for help on using the changeset viewer.