From e63d5f692f4dd317543f414b623f9f07d01bd339 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 2 Feb 2012 09:16:25 -0500 Subject: [PATCH] Bug 720538 - Remove unused functions and variables. r=wesj --- mobile/android/base/gfx/LayerController.java | 5 ----- mobile/android/base/gfx/RectUtils.java | 12 ------------ mobile/android/base/ui/PanZoomController.java | 2 -- 3 files changed, 19 deletions(-) diff --git a/mobile/android/base/gfx/LayerController.java b/mobile/android/base/gfx/LayerController.java index 37b02d7d5f8a..11cdfaa10509 100644 --- a/mobile/android/base/gfx/LayerController.java +++ b/mobile/android/base/gfx/LayerController.java @@ -335,11 +335,6 @@ public class LayerController { return new RectF(x, y, x + layerSize.width, y + layerSize.height); } - public RectF restrictToPageSize(RectF aRect) { - FloatSize pageSize = getPageSize(); - return RectUtils.restrict(aRect, new RectF(0, 0, pageSize.width, pageSize.height)); - } - // Returns true if a checkerboard is about to be visible. private boolean aboutToCheckerboard() { // Increase the size of the viewport (and clamp to page boundaries), and diff --git a/mobile/android/base/gfx/RectUtils.java b/mobile/android/base/gfx/RectUtils.java index 33877bf188e7..ea606af20faf 100644 --- a/mobile/android/base/gfx/RectUtils.java +++ b/mobile/android/base/gfx/RectUtils.java @@ -115,18 +115,6 @@ public final class RectUtils { return new IntSize(rect.width(), rect.height()); } - /* Returns a new RectF which restricts a source rect to the area inside a second destination rect. - * If the source rect is wider/taller than the destination rect, it's width/height will be shortened - * (and its aspect ratio will NOT be maintained). - */ - public static RectF restrict(RectF rect, RectF dest) { - float width = Math.min(rect.width(), dest.width()); - float height = Math.min(rect.height(), dest.height()); - float x = Math.max(dest.left, Math.min(dest.right-width, rect.left)); - float y = Math.max(dest.top, Math.min(dest.bottom-height, rect.top)); - return new RectF(x, y, x+width, y+height); - } - /* * Returns the rect that represents a linear transition between `from` and `to` at time `t`, * which is on the scale [0, 1). diff --git a/mobile/android/base/ui/PanZoomController.java b/mobile/android/base/ui/PanZoomController.java index c5e87db31163..76ed510624b2 100644 --- a/mobile/android/base/ui/PanZoomController.java +++ b/mobile/android/base/ui/PanZoomController.java @@ -163,7 +163,6 @@ public class PanZoomController Log.i(LOGTAG, "Got message: " + event); try { if (MESSAGE_ZOOM_RECT.equals(event)) { - float scale = mController.getZoomFactor(); float x = (float)message.getDouble("x"); float y = (float)message.getDouble("y"); final RectF zoomRect = new RectF(x, y, @@ -175,7 +174,6 @@ public class PanZoomController } }); } else if (MESSAGE_ZOOM_PAGE.equals(event)) { - float scale = mController.getZoomFactor(); FloatSize pageSize = mController.getPageSize(); RectF viewableRect = mController.getViewport();