зеркало из https://github.com/mozilla/gecko-dev.git
Bug 720538 - Remove unused functions and variables. r=wesj
This commit is contained in:
Родитель
2a1bb09135
Коммит
e63d5f692f
|
@ -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
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче