Backed out changesets f0811650f2f7 and a67882c52c98 (bug 957790) for gtest failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 13 Jan 2014 11:22:47 -0500
changeset 163199 92d1972990e475236f5b309f798fa80117ef60c0
parent 163198 1ac9a01f2d001c7782b6d107bd3e365d743778cb
child 163200 1b978b4e5fcc9538d755e548720d64f947e0fe1b
push id25984
push userryanvm@gmail.com
push dateMon, 13 Jan 2014 22:44:31 +0000
treeherdermozilla-central@425579efbac3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs957790
milestone29.0a1
backs outf0811650f2f74cb3148616dd8547849ec45aab99
a67882c52c98062999e7e5717161fa56a5039983
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
Backed out changesets f0811650f2f7 and a67882c52c98 (bug 957790) for gtest failures. CLOSED TREE
gfx/layers/ipc/AsyncPanZoomController.cpp
widget/windows/winrt/APZController.cpp
widget/windows/winrt/APZController.h
--- a/gfx/layers/ipc/AsyncPanZoomController.cpp
+++ b/gfx/layers/ipc/AsyncPanZoomController.cpp
@@ -237,16 +237,21 @@ static int gAsyncScrollThrottleTime = 10
 
 /**
  * The timeout in ms for mAsyncScrollTimeoutTask delay task.
  * Default is 300ms if there is no "apz.asyncscroll.timeout" in preference.
  */
 static int gAsyncScrollTimeout = 300;
 
 /**
+ * Temporary pref for disabling zoom in metrofx on aurora.
+ */
+static bool gAsyncZoomDisabled = false;
+
+/**
  * Pref that enables integration with the Metro "cross-slide" gesture.
  */
 static bool gCrossSlideEnabled = false;
 
 /**
  * Pref that enables progressive tile painting
  */
 static bool gUseProgressiveTilePainting = false;
@@ -365,16 +370,17 @@ AsyncPanZoomController::InitializeGlobal
   Preferences::AddIntVarCache(&gNumPaintDurationSamples, "apz.num_paint_duration_samples", gNumPaintDurationSamples);
   Preferences::AddFloatVarCache(&gTouchStartTolerance, "apz.touch_start_tolerance", gTouchStartTolerance);
   Preferences::AddFloatVarCache(&gXSkateSizeMultiplier, "apz.x_skate_size_multiplier", gXSkateSizeMultiplier);
   Preferences::AddFloatVarCache(&gYSkateSizeMultiplier, "apz.y_skate_size_multiplier", gYSkateSizeMultiplier);
   Preferences::AddFloatVarCache(&gXStationarySizeMultiplier, "apz.x_stationary_size_multiplier", gXStationarySizeMultiplier);
   Preferences::AddFloatVarCache(&gYStationarySizeMultiplier, "apz.y_stationary_size_multiplier", gYStationarySizeMultiplier);
   Preferences::AddIntVarCache(&gAsyncScrollThrottleTime, "apz.asyncscroll.throttle", gAsyncScrollThrottleTime);
   Preferences::AddIntVarCache(&gAsyncScrollTimeout, "apz.asyncscroll.timeout", gAsyncScrollTimeout);
+  Preferences::AddBoolVarCache(&gAsyncZoomDisabled, "apz.asynczoom.disabled", gAsyncZoomDisabled);
   Preferences::AddBoolVarCache(&gCrossSlideEnabled, "apz.cross_slide.enabled", gCrossSlideEnabled);
   Preferences::AddIntVarCache(&gAxisLockMode, "apz.axis_lock_mode", gAxisLockMode);
   gUseProgressiveTilePainting = gfxPlatform::UseProgressiveTilePainting();
 
   gComputedTimingFunction = new ComputedTimingFunction();
   gComputedTimingFunction->Init(
     nsTimingFunction(NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE));
   ClearOnShutdown(&gComputedTimingFunction);
@@ -388,17 +394,17 @@ AsyncPanZoomController::AsyncPanZoomCont
      mCrossProcessCompositorParent(nullptr),
      mPaintThrottler(GetFrameTime()),
      mGeckoContentController(aGeckoContentController),
      mRefPtrMonitor("RefPtrMonitor"),
      mMonitor("AsyncPanZoomController"),
      mTouchListenerTimeoutTask(nullptr),
      mX(MOZ_THIS_IN_INITIALIZER_LIST()),
      mY(MOZ_THIS_IN_INITIALIZER_LIST()),
-     mZoomConstraints(false, MIN_ZOOM, MAX_ZOOM),
+     mZoomConstraints(true, MIN_ZOOM, MAX_ZOOM),
      mLastSampleTime(GetFrameTime()),
      mState(NOTHING),
      mLastAsyncScrollTime(GetFrameTime()),
      mLastAsyncScrollOffset(0, 0),
      mCurrentAsyncScrollOffset(0, 0),
      mAsyncScrollTimeoutTask(nullptr),
      mHandlingTouchQueue(false),
      mTreeManager(aTreeManager),
@@ -406,16 +412,19 @@ AsyncPanZoomController::AsyncPanZoomCont
      mSharedFrameMetricsBuffer(nullptr),
      mSharedLock(nullptr)
 {
   MOZ_COUNT_CTOR(AsyncPanZoomController);
 
   if (aGestures == USE_GESTURE_DETECTOR) {
     mGestureEventListener = new GestureEventListener(this);
   }
+  if (gAsyncZoomDisabled) {
+    mZoomConstraints.mAllowZoom = false;
+  }
 }
 
 AsyncPanZoomController::~AsyncPanZoomController() {
 
   PCompositorParent* compositor =
     (mCrossProcessCompositorParent ? mCrossProcessCompositorParent : mCompositorParent.get());
 
   // Only send the release message if the SharedFrameMetrics has been created.
@@ -1638,18 +1647,19 @@ bool AsyncPanZoomController::IsPanningSt
 }
 
 void AsyncPanZoomController::TimeoutTouchListeners() {
   mTouchListenerTimeoutTask = nullptr;
   ContentReceivedTouch(false);
 }
 
 void AsyncPanZoomController::UpdateZoomConstraints(const ZoomConstraints& aConstraints) {
-  APZC_LOG("%p updating zoom constraints to %d %f %f\n", this, aConstraints.mAllowZoom,
-    aConstraints.mMinZoom.scale, aConstraints.mMaxZoom.scale);
+  if (gAsyncZoomDisabled) {
+    return;
+  }
   mZoomConstraints.mAllowZoom = aConstraints.mAllowZoom;
   mZoomConstraints.mMinZoom = (MIN_ZOOM > aConstraints.mMinZoom ? MIN_ZOOM : aConstraints.mMinZoom);
   mZoomConstraints.mMaxZoom = (MAX_ZOOM > aConstraints.mMaxZoom ? aConstraints.mMaxZoom : MAX_ZOOM);
 }
 
 ZoomConstraints
 AsyncPanZoomController::GetZoomConstraints() const
 {
--- a/widget/windows/winrt/APZController.cpp
+++ b/widget/windows/winrt/APZController.cpp
@@ -261,30 +261,16 @@ APZController::SendAsyncScrollDOMEvent(b
 }
 
 void
 APZController::PostDelayedTask(Task* aTask, int aDelayMs)
 {
   MessageLoop::current()->PostDelayedTask(FROM_HERE, aTask, aDelayMs);
 }
 
-bool
-APZController::GetRootZoomConstraints(ZoomConstraints* aOutConstraints)
-{
-  if (aOutConstraints) {
-    // Until we support the meta-viewport tag properly allow zooming
-    // from 1/4 to 4x by default.
-    aOutConstraints->mAllowZoom = true;
-    aOutConstraints->mMinZoom = CSSToScreenScale(0.25f);
-    aOutConstraints->mMaxZoom = CSSToScreenScale(4.0f);
-    return true;
-  }
-  return false;
-}
-
 // apzc notifications
 
 class TransformedStartEvent : public nsRunnable
 {
   NS_IMETHOD Run() {
     MetroUtils::FireObserver("apzc-transform-start", L"");
     return NS_OK;
   }
--- a/widget/windows/winrt/APZController.h
+++ b/widget/windows/winrt/APZController.h
@@ -18,33 +18,31 @@ namespace mozilla {
 namespace widget {
 namespace winrt {
 
 class APZController :
   public mozilla::layers::GeckoContentController
 {
   typedef mozilla::layers::FrameMetrics FrameMetrics;
   typedef mozilla::layers::ScrollableLayerGuid ScrollableLayerGuid;
-  typedef mozilla::layers::ZoomConstraints ZoomConstraints;
 
 public:
   APZController() :
     mWidgetListener(nullptr)
   {
   }
 
   // GeckoContentController interface
   virtual void RequestContentRepaint(const FrameMetrics& aFrameMetrics);
   virtual void HandleDoubleTap(const mozilla::CSSIntPoint& aPoint, int32_t aModifiers);
   virtual void HandleSingleTap(const mozilla::CSSIntPoint& aPoint, int32_t aModifiers);
   virtual void HandleLongTap(const mozilla::CSSIntPoint& aPoint, int32_t aModifiers);
   virtual void HandleLongTapUp(const mozilla::CSSIntPoint& aPoint, int32_t aModifiers);
   virtual void SendAsyncScrollDOMEvent(bool aIsRoot, const mozilla::CSSRect &aContentRect, const mozilla::CSSSize &aScrollableSize);
   virtual void PostDelayedTask(Task* aTask, int aDelayMs);
-  virtual bool GetRootZoomConstraints(ZoomConstraints* aOutConstraints);
   virtual void NotifyTransformBegin(const ScrollableLayerGuid& aGuid);
   virtual void NotifyTransformEnd(const ScrollableLayerGuid& aGuid);
   
   void SetWidgetListener(nsIWidgetListener* aWidgetListener);
 
   bool HitTestAPZC(mozilla::ScreenIntPoint& aPoint);
   void TransformCoordinateToGecko(const mozilla::ScreenIntPoint& aPoint,
                                   LayoutDeviceIntPoint* aRefPointOut);