From 4d30de9e0f556f259dd88b8c166549e3057b3166 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Tue, 15 Apr 2014 17:46:20 +0100 Subject: [PATCH] Backed out changeset 3486a7a210a1 (bug 976605) for build failures; CLOSED TREE --- gfx/layers/ipc/Axis.cpp | 24 ++++++++++++------------ gfx/layers/ipc/Axis.h | 30 +++++++++++++++--------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/gfx/layers/ipc/Axis.cpp b/gfx/layers/ipc/Axis.cpp index 975486e2805..00e22093c28 100644 --- a/gfx/layers/ipc/Axis.cpp +++ b/gfx/layers/ipc/Axis.cpp @@ -207,30 +207,30 @@ void Axis::SetVelocity(float aVelocity) { mVelocity = aVelocity; } -float Axis::GetCompositionEnd() const { +float Axis::GetCompositionEnd() { return GetOrigin() + GetCompositionLength(); } -float Axis::GetPageEnd() const { +float Axis::GetPageEnd() { return GetPageStart() + GetPageLength(); } -float Axis::GetOrigin() const { +float Axis::GetOrigin() { CSSPoint origin = mAsyncPanZoomController->GetFrameMetrics().GetScrollOffset(); return GetPointOffset(origin); } -float Axis::GetCompositionLength() const { +float Axis::GetCompositionLength() { const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics(); return GetRectLength(metrics.CalculateCompositedRectInCssPixels()); } -float Axis::GetPageStart() const { +float Axis::GetPageStart() { CSSRect pageRect = mAsyncPanZoomController->GetFrameMetrics().mScrollableRect; return GetRectOffset(pageRect); } -float Axis::GetPageLength() const { +float Axis::GetPageLength() { CSSRect pageRect = mAsyncPanZoomController->GetFrameMetrics().mScrollableRect; return GetRectLength(pageRect); } @@ -250,17 +250,17 @@ AxisX::AxisX(AsyncPanZoomController* aAsyncPanZoomController) } -float AxisX::GetPointOffset(const CSSPoint& aPoint) const +float AxisX::GetPointOffset(const CSSPoint& aPoint) { return aPoint.x; } -float AxisX::GetRectLength(const CSSRect& aRect) const +float AxisX::GetRectLength(const CSSRect& aRect) { return aRect.width; } -float AxisX::GetRectOffset(const CSSRect& aRect) const +float AxisX::GetRectOffset(const CSSRect& aRect) { return aRect.x; } @@ -271,17 +271,17 @@ AxisY::AxisY(AsyncPanZoomController* aAsyncPanZoomController) } -float AxisY::GetPointOffset(const CSSPoint& aPoint) const +float AxisY::GetPointOffset(const CSSPoint& aPoint) { return aPoint.y; } -float AxisY::GetRectLength(const CSSRect& aRect) const +float AxisY::GetRectLength(const CSSRect& aRect) { return aRect.height; } -float AxisY::GetRectOffset(const CSSRect& aRect) const +float AxisY::GetRectOffset(const CSSRect& aRect) { return aRect.y; } diff --git a/gfx/layers/ipc/Axis.h b/gfx/layers/ipc/Axis.h index 56c52f49264..dd544da07cf 100644 --- a/gfx/layers/ipc/Axis.h +++ b/gfx/layers/ipc/Axis.h @@ -170,18 +170,18 @@ public: */ bool ScaleWillOverscrollBothSides(float aScale); - float GetOrigin() const; - float GetCompositionLength() const; - float GetPageStart() const; - float GetPageLength() const; - float GetCompositionEnd() const; - float GetPageEnd() const; + float GetOrigin(); + float GetCompositionLength(); + float GetPageStart(); + float GetPageLength(); + float GetCompositionEnd(); + float GetPageEnd(); int32_t GetPos() const { return mPos; } - virtual float GetPointOffset(const CSSPoint& aPoint) const = 0; - virtual float GetRectLength(const CSSRect& aRect) const = 0; - virtual float GetRectOffset(const CSSRect& aRect) const = 0; + virtual float GetPointOffset(const CSSPoint& aPoint) = 0; + virtual float GetRectLength(const CSSRect& aRect) = 0; + virtual float GetRectOffset(const CSSRect& aRect) = 0; protected: int32_t mPos; @@ -195,17 +195,17 @@ protected: class AxisX : public Axis { public: AxisX(AsyncPanZoomController* mAsyncPanZoomController); - virtual float GetPointOffset(const CSSPoint& aPoint) const; - virtual float GetRectLength(const CSSRect& aRect) const; - virtual float GetRectOffset(const CSSRect& aRect) const; + virtual float GetPointOffset(const CSSPoint& aPoint); + virtual float GetRectLength(const CSSRect& aRect); + virtual float GetRectOffset(const CSSRect& aRect); }; class AxisY : public Axis { public: AxisY(AsyncPanZoomController* mAsyncPanZoomController); - virtual float GetPointOffset(const CSSPoint& aPoint) const; - virtual float GetRectLength(const CSSRect& aRect) const; - virtual float GetRectOffset(const CSSRect& aRect) const; + virtual float GetPointOffset(const CSSPoint& aPoint); + virtual float GetRectLength(const CSSRect& aRect); + virtual float GetRectOffset(const CSSRect& aRect); }; }