Bug 715836 - (Cleanup) Remove unused functions. r=pcwalton
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 13 Jan 2012 07:03:22 -0500
changeset 84412 317592537ff6226d89d776d62135ff6263ea494f
parent 84411 a18c8d5765eade4826971e2a52cbbd1a10c2d392
child 84413 157c86d30692cd09b572cf03628e1439f9544963
push id21848
push usermak77@bonardo.net
push dateSat, 14 Jan 2012 09:02:20 +0000
treeherdermozilla-central@27a7f197c6fc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspcwalton
bugs715836
milestone12.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 715836 - (Cleanup) Remove unused functions. r=pcwalton
mobile/android/base/gfx/LayerController.java
--- a/mobile/android/base/gfx/LayerController.java
+++ b/mobile/android/base/gfx/LayerController.java
@@ -173,46 +173,28 @@ public class LayerController {
         if (mLayerClient != null)
             mLayerClient.viewportSizeChanged();
 
         notifyLayerClientOfGeometryChange();
         mPanZoomController.abortAnimation();
         mView.requestRender();
     }
 
-    /** Scrolls the viewport to the given point. You must hold the monitor while calling this. */
-    public void scrollTo(PointF point) {
-        mViewportMetrics.setOrigin(point);
-        Log.d(LOGTAG, "scrollTo: " + mViewportMetrics);
-        notifyLayerClientOfGeometryChange();
-        GeckoApp.mAppContext.repositionPluginViews(false);
-        mView.requestRender();
-    }
-
     /** Scrolls the viewport by the given offset. You must hold the monitor while calling this. */
     public void scrollBy(PointF point) {
         PointF origin = mViewportMetrics.getOrigin();
         origin.offset(point.x, point.y);
         mViewportMetrics.setOrigin(origin);
         Log.d(LOGTAG, "scrollBy: " + mViewportMetrics);
 
         notifyLayerClientOfGeometryChange();
         GeckoApp.mAppContext.repositionPluginViews(false);
         mView.requestRender();
     }
 
-    /** Sets the current viewport. You must hold the monitor while calling this. */
-    public void setViewport(RectF viewport) {
-        mViewportMetrics.setViewport(viewport);
-        Log.d(LOGTAG, "setViewport: " + mViewportMetrics);
-        notifyLayerClientOfGeometryChange();
-        GeckoApp.mAppContext.repositionPluginViews(false);
-        mView.requestRender();
-    }
-
     /** Sets the current page size. You must hold the monitor while calling this. */
     public void setPageSize(FloatSize size) {
         if (mViewportMetrics.getPageSize().fuzzyEquals(size))
             return;
 
         mViewportMetrics.setPageSize(size);
         Log.d(LOGTAG, "setPageSize: " + mViewportMetrics);
 
@@ -229,46 +211,31 @@ public class LayerController {
      */
     public void setViewportMetrics(ViewportMetrics viewport) {
         mViewportMetrics = new ViewportMetrics(viewport);
         Log.d(LOGTAG, "setViewportMetrics: " + mViewportMetrics);
         GeckoApp.mAppContext.repositionPluginViews(false);
         mView.requestRender();
     }
 
-    /** Scales the viewport. You must hold the monitor while calling this. */
-    public void scaleTo(float zoomFactor) {
-        scaleWithFocus(zoomFactor, new PointF(0,0));
-    }
-
     /**
      * Scales the viewport, keeping the given focus point in the same place before and after the
      * scale operation. You must hold the monitor while calling this.
      */
     public void scaleWithFocus(float zoomFactor, PointF focus) {
         mViewportMetrics.scaleTo(zoomFactor, focus);
         Log.d(LOGTAG, "scaleWithFocus: " + mViewportMetrics + "; zf=" + zoomFactor);
 
         // We assume the zoom level will only be modified by the
         // PanZoomController, so no need to notify it of this change.
         notifyLayerClientOfGeometryChange();
         GeckoApp.mAppContext.repositionPluginViews(false);
         mView.requestRender();
     }
 
-    /**
-     * Sets the viewport origin and scales in one operation. You must hold the monitor while
-     * calling this.
-     */
-    public void scaleWithOrigin(float zoomFactor, PointF origin) {
-        mViewportMetrics.setOrigin(origin);
-        Log.d(LOGTAG, "scaleWithOrigin: " + mViewportMetrics + "; zf=" + zoomFactor);
-        scaleTo(zoomFactor);
-    }
-
     public boolean post(Runnable action) { return mView.post(action); }
 
     public void setOnTouchListener(OnTouchListener onTouchListener) {
         mOnTouchListener = onTouchListener;
     }
 
     /**
      * The view as well as the controller itself use this method to notify the layer client that