From a796db47c5d35cd20c718e7ce4e3380429e7b0ac Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 16 Oct 2014 10:14:37 -0400 Subject: [PATCH] Bug 1083398 - Sprinkle some const keywords around. r=botond --- gfx/layers/apz/src/AsyncPanZoomController.cpp | 2 +- gfx/layers/apz/src/AsyncPanZoomController.h | 2 +- gfx/layers/apz/src/Axis.cpp | 2 +- gfx/layers/apz/src/Axis.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index dd80e007198..5d1a3da1268 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -1776,7 +1776,7 @@ ScreenPoint AsyncPanZoomController::PanStart() const { return ScreenPoint(mX.PanStart(), mY.PanStart()); } -const ScreenPoint AsyncPanZoomController::GetVelocityVector() { +const ScreenPoint AsyncPanZoomController::GetVelocityVector() const { return ScreenPoint(mX.GetVelocity(), mY.GetVelocity()); } diff --git a/gfx/layers/apz/src/AsyncPanZoomController.h b/gfx/layers/apz/src/AsyncPanZoomController.h index 54abe1a96b0..69d68e7dfb3 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.h +++ b/gfx/layers/apz/src/AsyncPanZoomController.h @@ -491,7 +491,7 @@ protected: /** * Gets a vector of the velocities of each axis. */ - const ScreenPoint GetVelocityVector(); + const ScreenPoint GetVelocityVector() const; /** * Gets the first touch point from a MultiTouchInput. This gets only diff --git a/gfx/layers/apz/src/Axis.cpp b/gfx/layers/apz/src/Axis.cpp index eb93a53b697..de8647bc090 100644 --- a/gfx/layers/apz/src/Axis.cpp +++ b/gfx/layers/apz/src/Axis.cpp @@ -320,7 +320,7 @@ CSSCoord Axis::ScaleWillOverscrollAmount(float aScale, CSSCoord aFocus) const { return 0; } -float Axis::GetVelocity() { +float Axis::GetVelocity() const { return mAxisLocked ? 0 : mVelocity; } diff --git a/gfx/layers/apz/src/Axis.h b/gfx/layers/apz/src/Axis.h index 62053507b2c..3b84c3607b8 100644 --- a/gfx/layers/apz/src/Axis.h +++ b/gfx/layers/apz/src/Axis.h @@ -151,7 +151,7 @@ public: /** * Gets the raw velocity of this axis at this moment. */ - float GetVelocity(); + float GetVelocity() const; /** * Sets the raw velocity of this axis at this moment.