Backed out changeset 43ecf82afb92 (
bug 1270241) for android reftest failures
--- a/gfx/thebes/gfxAndroidPlatform.cpp
+++ b/gfx/thebes/gfxAndroidPlatform.cpp
@@ -308,25 +308,25 @@ gfxAndroidPlatform::GetScaledFontForFont
}
bool
gfxAndroidPlatform::FontHintingEnabled()
{
// In "mobile" builds, we sometimes use non-reflow-zoom, so we
// might not want hinting. Let's see.
-#ifdef MOZ_WIDGET_ANDROID
- // On Android, we currently only use gecko to render web
+#ifdef MOZ_USING_ANDROID_JAVA_WIDGETS
+ // On android-java, we currently only use gecko to render web
// content that can always be be non-reflow-zoomed. So turn off
// hinting.
//
// XXX when gecko-android-java is used as an "app runtime", we may
// want to re-enable hinting for non-browser processes there.
return false;
-#endif // MOZ_WIDGET_ANDROID
+#endif // MOZ_USING_ANDROID_JAVA_WIDGETS
#ifdef MOZ_WIDGET_GONK
// On B2G, the UX preference is currently to keep hinting disabled
// for all text (see bug 829523).
return false;
#endif
// Currently, we don't have any other targets, but if/when we do,
@@ -334,18 +334,18 @@ gfxAndroidPlatform::FontHintingEnabled()
NS_NOTREACHED("oops, what platform is this?");
return gfxPlatform::FontHintingEnabled();
}
bool
gfxAndroidPlatform::RequiresLinearZoom()
{
-#ifdef MOZ_WIDGET_ANDROID
- // On Android, we currently only use gecko to render web
+#ifdef MOZ_USING_ANDROID_JAVA_WIDGETS
+ // On android-java, we currently only use gecko to render web
// content that can always be be non-reflow-zoomed.
//
// XXX when gecko-android-java is used as an "app runtime", we may
// want to treat it like B2G and use linear zoom only for the web
// browser process, not other apps.
return true;
#endif
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -284,16 +284,21 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['TK_CFLAGS']
CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CFLAGS += CONFIG['TK_CFLAGS']
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gonk', 'qt'):
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
+ # This is set for "normal Android", that is, when Gecko is running on
+ # top of the android java runtime.
+ DEFINES['MOZ_USING_ANDROID_JAVA_WIDGETS'] = True
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'):
CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
DEFINES['GRAPHITE2_STATIC'] = True
if CONFIG['CLANG_CXX']: