Changeset 42260 in webkit
- Timestamp:
- Apr 6, 2009 4:11:59 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r42256 r42260 1 2009-04-06 Dimitri Glazkov <dglazkov@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 https://bugs.webkit.org/show_bug.cgi?id=25059 6 Remove references to dominantScript, getGenericFontForScript. 7 8 * platform/graphics/chromium/FontCacheChromiumWin.cpp: Removed references 9 to getGenericFontForScript. 10 (WebCore::FontCache::getLastResortFallbackFont): Removed calls to dominantScript. 11 * platform/graphics/chromium/FontCacheLinux.cpp: Ditto. 12 * rendering/RenderThemeChromiumLinux.cpp: 13 (WebCore::defaultGUIFont): Removed Document* arg. 14 (WebCore::RenderThemeChromiumLinux::systemFont): Ditto. 15 * rendering/RenderThemeChromiumLinux.h: Ditto. 16 * rendering/RenderThemeChromiumMac.h: Ditto. 17 * rendering/RenderThemeChromiumMac.mm: Ditto. 18 (WebCore::RenderThemeChromiumMac::systemFont): Ditto. 19 * rendering/RenderThemeChromiumWin.cpp: 20 (WebCore::defaultGUIFont): Ditto. 21 (WebCore::RenderThemeChromiumWin::systemFont): Ditto. 22 * rendering/RenderThemeChromiumWin.h: Ditto. 23 1 24 2009-04-06 Geoffrey Garen <ggaren@apple.com> 2 25 -
trunk/WebCore/platform/graphics/chromium/FontCacheChromiumWin.cpp
r41392 r42260 415 415 { 416 416 FontDescription::GenericFamilyType generic = description.genericFamily(); 417 // FIXME: Mapping webkit generic to GenericFamilyType needs to418 // be more intelligent.419 // This spot rarely gets reached. GetFontDataForCharacters() gets hit a lot420 // more often (see FIXME comment there).421 const wchar_t* family = getFontFamilyForScript(description.dominantScript(), generic);422 423 if (family)424 return getCachedFontPlatformData(description, AtomicString(family, wcslen(family)));425 417 426 418 // FIXME: Would be even better to somehow get the user's default font here. … … 454 446 }; 455 447 return gdiFontWeights[fontWeight]; 456 }457 458 // FIXME: This may not be the best place to put this function459 AtomicString FontCache::getGenericFontForScript(UScriptCode script, const FontDescription& description)460 {461 const wchar_t* scriptFont = getFontFamilyForScript( script, description.genericFamily());462 return scriptFont ? AtomicString(scriptFont, wcslen(scriptFont)) : emptyAtom;463 448 } 464 449 -
trunk/WebCore/platform/graphics/chromium/FontCacheLinux.cpp
r41082 r42260 160 160 } 161 161 162 AtomicString FontCache::getGenericFontForScript(UScriptCode script,163 const FontDescription& descript)164 {165 notImplemented();166 return AtomicString();167 }168 169 162 } // namespace WebCore -
trunk/WebCore/rendering/RenderThemeChromiumLinux.cpp
r42044 r42260 89 89 // IE uses MS Shell Dlg there, which we render incorrectly at certain pixel 90 90 // sizes (e.g. 15px). So, for now we just use Arial. 91 static const char* defaultGUIFont( Document* document)91 static const char* defaultGUIFont() 92 92 { 93 93 return "Arial"; … … 156 156 } 157 157 158 void RenderThemeChromiumLinux::systemFont(int propId, Document* document,FontDescription& fontDescription) const158 void RenderThemeChromiumLinux::systemFont(int propId, FontDescription& fontDescription) const 159 159 { 160 160 float fontSize = DefaultFontSize; … … 173 173 } 174 174 175 fontDescription.firstFamily().setFamily(defaultGUIFont( NULL));175 fontDescription.firstFamily().setFamily(defaultGUIFont()); 176 176 fontDescription.setSpecifiedSize(fontSize); 177 177 fontDescription.setIsAbsoluteSize(true); -
trunk/WebCore/rendering/RenderThemeChromiumLinux.h
r42044 r42260 57 57 58 58 // System fonts. 59 virtual void systemFont(int propId, Document*,FontDescription&) const;59 virtual void systemFont(int propId, FontDescription&) const; 60 60 61 61 virtual int minimumMenuListSize(RenderStyle*) const; -
trunk/WebCore/rendering/RenderThemeChromiumMac.h
r41939 r42260 68 68 69 69 // System fonts. 70 virtual void systemFont(int cssValueId, Document*,FontDescription&) const;70 virtual void systemFont(int cssValueId, FontDescription&) const; 71 71 72 72 virtual int minimumMenuListSize(RenderStyle*) const; -
trunk/WebCore/rendering/RenderThemeChromiumMac.mm
r41040 r42260 34 34 #import "CSSStyleSelector.h" 35 35 #import "CSSValueKeywords.h" 36 #import "Document.h"37 36 #import "Element.h" 38 37 #import "FoundationExtras.h" … … 193 192 } 194 193 195 void RenderThemeChromiumMac::systemFont(int cssValueId, Document* document,FontDescription& fontDescription) const194 void RenderThemeChromiumMac::systemFont(int cssValueId, FontDescription& fontDescription) const 196 195 { 197 196 static FontDescription systemFont; -
trunk/WebCore/rendering/RenderThemeChromiumWin.cpp
r42044 r42260 32 32 #include "CSSStyleSheet.h" 33 33 #include "CSSValueKeywords.h" 34 #include "Document.h"35 34 #include "FontSelector.h" 36 35 #include "FontUtilsChromiumWin.h" … … 207 206 // IE uses MS Shell Dlg there, which we render incorrectly at certain pixel 208 207 // sizes (e.g. 15px). So, for now we just use Arial. 209 static wchar_t* defaultGUIFont(Document* document) 210 { 211 UScriptCode dominantScript = document->dominantScript(); 212 const wchar_t* family = NULL; 213 214 // FIXME: Special-casing of Latin/Greeek/Cyrillic should go away once 215 // GetFontFamilyForScript is enhanced to support GenericFamilyType for 216 // real. For now, we make sure that we use Arial to match IE for those 217 // scripts. 218 if (dominantScript != USCRIPT_LATIN && 219 dominantScript != USCRIPT_CYRILLIC && 220 dominantScript != USCRIPT_GREEK && 221 dominantScript != USCRIPT_INVALID_CODE) { 222 family = getFontFamilyForScript(dominantScript, FontDescription::NoFamily); 223 if (family) 224 return const_cast<wchar_t*>(family); 225 } 208 static wchar_t* defaultGUIFont() 209 { 226 210 return L"Arial"; 227 211 } … … 339 323 } 340 324 341 void RenderThemeChromiumWin::systemFont(int propId, Document* document,FontDescription& fontDescription) const325 void RenderThemeChromiumWin::systemFont(int propId, FontDescription& fontDescription) const 342 326 { 343 327 // This logic owes much to RenderThemeSafari.cpp. … … 376 360 case CSSValueWebkitSmallControl: 377 361 case CSSValueWebkitControl: 378 faceName = defaultGUIFont( document);362 faceName = defaultGUIFont(); 379 363 // Why 2 points smaller? Because that's what Gecko does. 380 364 fontSize = defaultFontSize - pointsToPixels(2); 381 365 break; 382 366 default: 383 faceName = defaultGUIFont( document);367 faceName = defaultGUIFont(); 384 368 fontSize = defaultFontSize; 385 369 break; -
trunk/WebCore/rendering/RenderThemeChromiumWin.h
r42044 r42260 67 67 68 68 // System fonts. 69 virtual void systemFont(int propId, Document*,FontDescription&) const;69 virtual void systemFont(int propId, FontDescription&) const; 70 70 71 71 virtual int minimumMenuListSize(RenderStyle*) const;
Note: See TracChangeset
for help on using the changeset viewer.