Skip to content

Commit

Permalink
Fixed compiling bugs and bug 990869
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeshkova committed Apr 3, 2014
1 parent 3f49814 commit b9e9008
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 24 deletions.
3 changes: 3 additions & 0 deletions b2g/app/b2g.js
Expand Up @@ -904,6 +904,9 @@ pref("apz.enlarge_displayport_when_clipped", true);
// Use "sticky" axis locking
pref("apz.axis_lock_mode", 2);

// Allow build sub layers tree for iframes
pref("apz.subframe.enabled", true);

// This preference allows FirefoxOS apps (and content, I think) to force
// the use of software (instead of hardware accelerated) 2D canvases by
// creating a context like this:
Expand Down
2 changes: 2 additions & 0 deletions browser/metro/profile/metro.js
Expand Up @@ -58,6 +58,8 @@ pref("apz.min_skate_speed", "10.0");
// 0 = free, 1 = standard, 2 = sticky
pref("apz.axis_lock_mode", 2);
pref("apz.cross_slide.enabled", true);
// Allow build sub layers tree for iframes
pref("apz.subframe.enabled", true);

// Enable Microsoft TSF support by default for imes.
pref("intl.tsf.enable", true);
Expand Down
19 changes: 19 additions & 0 deletions configure.in
Expand Up @@ -9165,6 +9165,20 @@ if test -z "$MOZ_NATIVE_NSPR"; then
if test -n "$USE_ARM_KUSER"; then
ac_configure_args="$ac_configure_args --with-arm-kuser"
fi
# A configure script generated by autoconf 2.68 does not allow the cached
# values of "precious" variables such as CFLAGS and LDFLAGS to differ from
# the values passed to the configure script. Since we modify CFLAGS and
# LDFLAGS before passing them to NSPR's configure script, we cannot share
# config.cache with NSPR. As a result, we cannot pass AS, CC, CXX, etc. to
# NSPR via a shared config.cache file and must pass them to NSPR on the
# configure command line.
for var in AS CC CXX CPP LD AR RANLIB STRIP; do
ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'"
done
# A configure script generated by autoconf 2.68 warns if --host is
# specified but --build isn't. So we always pass --build to NSPR's
# configure script.
ac_configure_args="$ac_configure_args --build=$build"
ac_configure_args="$ac_configure_args $NSPR_CONFIGURE_ARGS"

# Save these, so we can mess with them for the subconfigure ..
Expand All @@ -9180,9 +9194,14 @@ if test -z "$MOZ_NATIVE_NSPR"; then
export LDFLAGS="$LDFLAGS $NSPR_LDFLAGS"
export CFLAGS="$CFLAGS $MOZ_FRAMEPTR_FLAGS"

# Use a separate cache file for NSPR since it uses autoconf 2.68.
_save_cache_file="$cache_file"
cache_file=$_objdir/nsprpub/config.cache

AC_OUTPUT_SUBDIRS(nsprpub)

# .. and restore them
cache_file="$_save_cache_file"
CFLAGS="$_SAVE_CFLAGS"
CPPFLAGS="$_SAVE_CPPFLAGS"
LDFLAGS="$_SAVE_LDFLAGS"
Expand Down
2 changes: 1 addition & 1 deletion embedding/embedlite/config/mozconfig.merqtxulrunner
@@ -1,9 +1,9 @@
export ac_cv_have_usable_wchar_option_v2="no"
export CFLAGS="-O3"
export CXXFLAGS="-O3"
export CROSS_COMPILE=1
export MOZ_DEBUG_SYMBOLS=1
export MOZILLA_OFFICIAL=1
export CROSS_COMPILE=1

mk_add_options PROFILE_GEN_SCRIPT=@TOPSRCDIR@/build/profile_pageloader.pl
mk_add_options MOZ_MAKE_FLAGS="-j8"
Expand Down
2 changes: 1 addition & 1 deletion embedding/embedlite/embedding.js
Expand Up @@ -301,7 +301,7 @@ pref("extensions.strictCompatibility", false);
pref("extensions.minCompatibleAppVersion", "11.0");

// Enable sub layers for apzc
pref("layout.want.subapzc", true);
pref("apz.subframe.enabled", true);

// Enable HTML fullscreen API in content.
pref("full-screen-api.enabled", true);
Expand Down
1 change: 1 addition & 0 deletions gfx/thebes/gfxPrefs.h
Expand Up @@ -108,6 +108,7 @@ class gfxPrefs MOZ_FINAL
DECL_GFX_PREF(Once, "apz.max_event_acceleration", APZMaxEventAcceleration, float, 999.0f);
DECL_GFX_PREF(Once, "apz.max_velocity_inches_per_ms", APZMaxVelocity, float, -1.0f);
DECL_GFX_PREF(Once, "apz.max_velocity_queue_size", APZMaxVelocityQueueSize, uint32_t, 5);
DECL_GFX_PREF(Live, "apz.subframe.enabled", APZSubframeEnabled, bool, false);

DECL_GFX_PREF(Once, "gfx.android.rgb16.force", AndroidRGB16Force, bool, false);
#if defined(ANDROID)
Expand Down
18 changes: 5 additions & 13 deletions layout/generic/nsGfxScrollFrame.cpp
Expand Up @@ -52,6 +52,7 @@
#include "nsIScrollPositionListener.h"
#include "StickyScrollContainer.h"
#include "nsIFrameInlines.h"
#include "gfxPrefs.h"
#include <algorithm>
#include <cstdlib> // for std::abs(int/long)
#include <cmath> // for std::abs(float/double)
Expand Down Expand Up @@ -2585,20 +2586,11 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
bool wantLayerV = isVScrollable && (mVScrollbarBox || isFocused);
bool wantLayerH = isHScrollable && (mHScrollbarBox || isFocused);
// TODO Turn this on for inprocess OMTC on all platforms
bool wantSubAPZC = (XRE_GetProcessType() == GeckoProcessType_Content);
#ifdef XP_WIN
if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Metro) {
wantSubAPZC = true;
}
#else
static bool addedLayoutWantSubAPZC = false;
static bool layoutWantSubAPZC = false;
if (!addedLayoutWantSubAPZC) {
Preferences::AddBoolVarCache(&layoutWantSubAPZC,
"layout.want.subapzc", layoutWantSubAPZC);
addedLayoutWantSubAPZC = true;
bool wantSubAPZC = gfxPrefs::APZSubframeEnabled();
#ifdef MOZ_WIDGET_GONK
if (XRE_GetProcessType() != GeckoProcessType_Content) {
wantSubAPZC = false;
}
wantSubAPZC = layoutWantSubAPZC;
#endif
shouldBuildLayer =
wantSubAPZC &&
Expand Down
3 changes: 3 additions & 0 deletions modules/libpref/src/init/all.js
Expand Up @@ -332,6 +332,9 @@ pref("apz.axis_lock_mode", 0);
// Whether to print the APZC tree for debugging
pref("apz.printtree", false);

// Whether to allow build sub layers tree for iframes
pref("apz.subframe.enabled", false);

#ifdef XP_MACOSX
// Whether to run in native HiDPI mode on machines with "Retina"/HiDPI display;
// <= 0 : hidpi mode disabled, display will just use pixel-based upscaling
Expand Down
5 changes: 2 additions & 3 deletions nsprpub/configure
Expand Up @@ -3110,8 +3110,7 @@ else
fi
if test -z "$SKIP_COMPILER_CHECKS"; then
if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
if test "$target" != "$host"; then
echo "cross compiling from $host to $target"
cross_compiling=yes
Expand Down Expand Up @@ -3967,7 +3966,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
if test "$target" != "$host"; then
if test -n "$USE_CPLUS"; then
for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
do
Expand Down
8 changes: 2 additions & 6 deletions nsprpub/configure.in
Expand Up @@ -569,11 +569,7 @@ if test -z "$SKIP_COMPILER_CHECKS"; then
dnl ========================================================
dnl Checks for compilers.
dnl ========================================================

dnl Explicitly honor $CROSS_COMPILE to allow cross-compiling
dnl between toolkits on the same architecture, as when
dnl targeting the iOS Simulator from OS X.
if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
if test "$target" != "$host"; then
echo "cross compiling from $host to $target"
cross_compiling=yes

Expand Down Expand Up @@ -612,7 +608,7 @@ dnl and before invoking AC_TRY_COMPILE (which requires AC_PROG_CC).
AC_PROG_CC

dnl Reenter the conditional blocks after invoking AC_PROG_CC.
if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
if test "$target" != "$host"; then
if test -n "$USE_CPLUS"; then
AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", echo)
unset ac_cv_prog_CXX
Expand Down

0 comments on commit b9e9008

Please sign in to comment.