Changeset 122255 in webkit
- Timestamp:
- Jul 10, 2012 1:30:01 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r122253 r122255 1 2012-07-10 Xianzhu Wang <wangxianzhu@chromium.org> 2 3 [Chromium-Android] Use default font rendering styles in FontPlatformData::querySystemForRenderStyle() 4 https://bugs.webkit.org/show_bug.cgi?id=90826 5 6 Reviewed by Adam Barth. 7 8 No new tests. The change to this file is refactoring only. 9 10 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: 11 (WebCore::FontPlatformData::querySystemForRenderStyle): Moved the "NoPreference" initialization into PlatformSupport::PlatformSupport::getRenderStyleForStrike(). 12 1 13 2012-07-10 Raymond Toy <rtoy@google.com> 2 14 -
trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp
r120543 r122255 262 262 void FontPlatformData::querySystemForRenderStyle() 263 263 { 264 if (!m_family.length()) {265 // We don't have a family for this, probably because it's a webfont. We266 // set all the values to 'no preference' and take the system defaults.267 m_style.useBitmaps = FontRenderStyle::NoPreference;268 m_style.useAutoHint = FontRenderStyle::NoPreference;269 m_style.useHinting = FontRenderStyle::NoPreference;270 m_style.useAntiAlias = FontRenderStyle::NoPreference;271 m_style.useSubpixelRendering = FontRenderStyle::NoPreference;272 m_style.useSubpixelPositioning = FontRenderStyle::NoPreference;273 return;274 }275 276 264 PlatformSupport::getRenderStyleForStrike(m_family.data(), (((int)m_textSize) << 2) | (m_typeface->style() & 3), &m_style); 277 265 } -
trunk/Source/WebKit/chromium/ChangeLog
r122252 r122255 1 2012-07-10 Xianzhu Wang <wangxianzhu@chromium.org> 2 3 [Chromium-Android] Use default font rendering styles in FontPlatformData::querySystemForRenderStyle() 4 https://bugs.webkit.org/show_bug.cgi?id=90826 5 6 Reviewed by Adam Barth. 7 8 * WebKit.gyp: 9 * src/PlatformSupport.cpp: 10 (WebCore::PlatformSupport::getRenderStyleForStrike): Call style.setDefault() on Android or when the font is not specified. 11 1 12 2012-07-10 Dana Jansens <danakj@chromium.org> 2 13 -
trunk/Source/WebKit/chromium/WebKit.gyp
r121922 r122255 865 865 'sources/': [ 866 866 ['include', '^src/linux/WebFontRendering\\.cpp$'], 867 ['include', '^src/linux/WebFontRenderStyle\\.cpp$'], 867 868 ], 868 869 }], -
trunk/Source/WebKit/chromium/src/PlatformSupport.cpp
r121212 r122255 69 69 #if OS(DARWIN) 70 70 #include <public/mac/WebThemeEngine.h> 71 #elif OS(UNIX) && !OS(ANDROID) 71 #elif OS(UNIX) 72 #include "WebFontRenderStyle.h" 73 #if OS(ANDROID) 74 #include <public/android/WebThemeEngine.h> 75 #else 72 76 #include "WebFontInfo.h" 73 #include "WebFontRenderStyle.h"74 77 #include <public/linux/WebThemeEngine.h> 75 #elif OS(ANDROID) 76 #include <public/android/WebThemeEngine.h> 77 #endif 78 #endif // OS(ANDROID) 79 #endif // elif OS(UNIX) 78 80 79 81 #include "NativeImageSkia.h" … … 258 260 void PlatformSupport::getRenderStyleForStrike(const char* font, int sizeAndStyle, FontRenderStyle* result) 259 261 { 260 #if !OS(ANDROID)261 262 WebFontRenderStyle style; 262 263 263 if (WebKit::Platform::current()->sandboxSupport()) 264 #if OS(ANDROID) 265 style.setDefaults(); 266 #else 267 if (!font || !*font) 268 style.setDefaults(); // It's probably a webfont. Take the system defaults. 269 else if (WebKit::Platform::current()->sandboxSupport()) 264 270 WebKit::Platform::current()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style); 265 271 else 266 272 WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style); 273 #endif 267 274 268 275 style.toFontRenderStyle(result); 269 #endif270 276 } 271 277 #endif
Note: See TracChangeset
for help on using the changeset viewer.