Title: [122255] trunk/Source
- Revision
- 122255
- Author
- [email protected]
- Date
- 2012-07-10 13:30:01 -0700 (Tue, 10 Jul 2012)
Log Message
[Chromium-Android] Use default font rendering styles in FontPlatformData::querySystemForRenderStyle()
https://bugs.webkit.org/show_bug.cgi?id=90826
Reviewed by Adam Barth.
Source/WebCore:
No new tests. The change to this file is refactoring only.
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
(WebCore::FontPlatformData::querySystemForRenderStyle): Moved the "NoPreference" initialization into PlatformSupport::PlatformSupport::getRenderStyleForStrike().
Source/WebKit/chromium:
* WebKit.gyp:
* src/PlatformSupport.cpp:
(WebCore::PlatformSupport::getRenderStyleForStrike): Call style.setDefault() on Android or when the font is not specified.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (122254 => 122255)
--- trunk/Source/WebCore/ChangeLog 2012-07-10 20:23:51 UTC (rev 122254)
+++ trunk/Source/WebCore/ChangeLog 2012-07-10 20:30:01 UTC (rev 122255)
@@ -1,3 +1,15 @@
+2012-07-10 Xianzhu Wang <[email protected]>
+
+ [Chromium-Android] Use default font rendering styles in FontPlatformData::querySystemForRenderStyle()
+ https://bugs.webkit.org/show_bug.cgi?id=90826
+
+ Reviewed by Adam Barth.
+
+ No new tests. The change to this file is refactoring only.
+
+ * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
+ (WebCore::FontPlatformData::querySystemForRenderStyle): Moved the "NoPreference" initialization into PlatformSupport::PlatformSupport::getRenderStyleForStrike().
+
2012-07-10 Raymond Toy <[email protected]>
AudioFIFO not correctly wrapping the write index on push
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp (122254 => 122255)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp 2012-07-10 20:23:51 UTC (rev 122254)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp 2012-07-10 20:30:01 UTC (rev 122255)
@@ -261,18 +261,6 @@
void FontPlatformData::querySystemForRenderStyle()
{
- if (!m_family.length()) {
- // We don't have a family for this, probably because it's a webfont. We
- // set all the values to 'no preference' and take the system defaults.
- m_style.useBitmaps = FontRenderStyle::NoPreference;
- m_style.useAutoHint = FontRenderStyle::NoPreference;
- m_style.useHinting = FontRenderStyle::NoPreference;
- m_style.useAntiAlias = FontRenderStyle::NoPreference;
- m_style.useSubpixelRendering = FontRenderStyle::NoPreference;
- m_style.useSubpixelPositioning = FontRenderStyle::NoPreference;
- return;
- }
-
PlatformSupport::getRenderStyleForStrike(m_family.data(), (((int)m_textSize) << 2) | (m_typeface->style() & 3), &m_style);
}
Modified: trunk/Source/WebKit/chromium/ChangeLog (122254 => 122255)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-07-10 20:23:51 UTC (rev 122254)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-07-10 20:30:01 UTC (rev 122255)
@@ -1,3 +1,14 @@
+2012-07-10 Xianzhu Wang <[email protected]>
+
+ [Chromium-Android] Use default font rendering styles in FontPlatformData::querySystemForRenderStyle()
+ https://bugs.webkit.org/show_bug.cgi?id=90826
+
+ Reviewed by Adam Barth.
+
+ * WebKit.gyp:
+ * src/PlatformSupport.cpp:
+ (WebCore::PlatformSupport::getRenderStyleForStrike): Call style.setDefault() on Android or when the font is not specified.
+
2012-07-10 Dana Jansens <[email protected]>
[chromium] Avoid allocating render pass textures that have no content
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (122254 => 122255)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-07-10 20:23:51 UTC (rev 122254)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-07-10 20:30:01 UTC (rev 122255)
@@ -864,6 +864,7 @@
['OS=="android"', {
'sources/': [
['include', '^src/linux/WebFontRendering\\.cpp$'],
+ ['include', '^src/linux/WebFontRenderStyle\\.cpp$'],
],
}],
],
Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (122254 => 122255)
--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-07-10 20:23:51 UTC (rev 122254)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp 2012-07-10 20:30:01 UTC (rev 122255)
@@ -68,13 +68,15 @@
#if OS(DARWIN)
#include <public/mac/WebThemeEngine.h>
-#elif OS(UNIX) && !OS(ANDROID)
+#elif OS(UNIX)
+#include "WebFontRenderStyle.h"
+#if OS(ANDROID)
+#include <public/android/WebThemeEngine.h>
+#else
#include "WebFontInfo.h"
-#include "WebFontRenderStyle.h"
#include <public/linux/WebThemeEngine.h>
-#elif OS(ANDROID)
-#include <public/android/WebThemeEngine.h>
-#endif
+#endif // OS(ANDROID)
+#endif // elif OS(UNIX)
#include "NativeImageSkia.h"
@@ -257,16 +259,20 @@
void PlatformSupport::getRenderStyleForStrike(const char* font, int sizeAndStyle, FontRenderStyle* result)
{
-#if !OS(ANDROID)
WebFontRenderStyle style;
- if (WebKit::Platform::current()->sandboxSupport())
+#if OS(ANDROID)
+ style.setDefaults();
+#else
+ if (!font || !*font)
+ style.setDefaults(); // It's probably a webfont. Take the system defaults.
+ else if (WebKit::Platform::current()->sandboxSupport())
WebKit::Platform::current()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style);
else
WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style);
+#endif
style.toFontRenderStyle(result);
-#endif
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes