Bug 950934 - Enable APZ in the B2G root process. r=botond,smaug
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 12 Jan 2015 18:13:18 -0500
changeset 226971 3e710889d4e86937c9bb8a6d5c130fa700241d48
parent 226970 72940b27aeaa3c5284252eda375ccfd32ce3b644
child 226972 bcefc7d8d8859469897c4c66b48c5b4ef6e9afeb
push id54972
push userbballo@mozilla.com
push dateMon, 02 Feb 2015 01:41:21 +0000
treeherdermozilla-inbound@bcefc7d8d885 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, smaug
bugs950934
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 950934 - Enable APZ in the B2G root process. r=botond,smaug
docshell/base/nsDocShell.cpp
layout/base/nsLayoutUtils.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -13675,17 +13675,17 @@ nsDocShell::GetAppManifestURL(nsAString&
 
 NS_IMETHODIMP
 nsDocShell::GetAsyncPanZoomEnabled(bool* aOut)
 {
     if (TabChild* tabChild = TabChild::GetFrom(this)) {
         *aOut = tabChild->IsAsyncPanZoomEnabled();
         return NS_OK;
     }
-    *aOut = false;
+    *aOut = Preferences::GetBool("layers.async-pan-zoom.enabled", false);
     return NS_OK;
 }
 
 bool
 nsDocShell::HasUnloadedParent()
 {
     nsRefPtr<nsDocShell> parent = GetParentDocshell();
     while (parent) {
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -7642,25 +7642,18 @@ nsLayoutUtils::CalculateExpandedScrollab
     scrollableRect.height = compSize.height;
   }
   return scrollableRect;
 }
 
 /* static */ bool
 nsLayoutUtils::WantSubAPZC()
 {
-  // TODO Turn this on for inprocess OMTC on all platforms
-  bool wantSubAPZC = gfxPrefs::AsyncPanZoomEnabled() &&
-                     gfxPrefs::APZSubframeEnabled();
-#ifdef MOZ_WIDGET_GONK
-  if (XRE_GetProcessType() != GeckoProcessType_Content) {
-    wantSubAPZC = false;
-  }
-#endif
-  return wantSubAPZC;
+  return gfxPrefs::AsyncPanZoomEnabled() &&
+         gfxPrefs::APZSubframeEnabled();
 }
 
 /* static */ bool
 nsLayoutUtils::UsesAsyncScrolling()
 {
 #ifdef MOZ_WIDGET_ANDROID
   // We always have async scrolling for android
   return true;