Backed out changeset 3486a7a210a1 (bug 976605) for build failures; CLOSED TREE

This commit is contained in:
Ed Morley 2014-04-15 17:46:20 +01:00
Родитель c46be2513f
Коммит 4ac96f1555
2 изменённых файлов: 27 добавлений и 27 удалений

Просмотреть файл

@ -207,30 +207,30 @@ void Axis::SetVelocity(float aVelocity) {
mVelocity = aVelocity; mVelocity = aVelocity;
} }
float Axis::GetCompositionEnd() const { float Axis::GetCompositionEnd() {
return GetOrigin() + GetCompositionLength(); return GetOrigin() + GetCompositionLength();
} }
float Axis::GetPageEnd() const { float Axis::GetPageEnd() {
return GetPageStart() + GetPageLength(); return GetPageStart() + GetPageLength();
} }
float Axis::GetOrigin() const { float Axis::GetOrigin() {
CSSPoint origin = mAsyncPanZoomController->GetFrameMetrics().GetScrollOffset(); CSSPoint origin = mAsyncPanZoomController->GetFrameMetrics().GetScrollOffset();
return GetPointOffset(origin); return GetPointOffset(origin);
} }
float Axis::GetCompositionLength() const { float Axis::GetCompositionLength() {
const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics(); const FrameMetrics& metrics = mAsyncPanZoomController->GetFrameMetrics();
return GetRectLength(metrics.CalculateCompositedRectInCssPixels()); return GetRectLength(metrics.CalculateCompositedRectInCssPixels());
} }
float Axis::GetPageStart() const { float Axis::GetPageStart() {
CSSRect pageRect = mAsyncPanZoomController->GetFrameMetrics().mScrollableRect; CSSRect pageRect = mAsyncPanZoomController->GetFrameMetrics().mScrollableRect;
return GetRectOffset(pageRect); return GetRectOffset(pageRect);
} }
float Axis::GetPageLength() const { float Axis::GetPageLength() {
CSSRect pageRect = mAsyncPanZoomController->GetFrameMetrics().mScrollableRect; CSSRect pageRect = mAsyncPanZoomController->GetFrameMetrics().mScrollableRect;
return GetRectLength(pageRect); 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; return aPoint.x;
} }
float AxisX::GetRectLength(const CSSRect& aRect) const float AxisX::GetRectLength(const CSSRect& aRect)
{ {
return aRect.width; return aRect.width;
} }
float AxisX::GetRectOffset(const CSSRect& aRect) const float AxisX::GetRectOffset(const CSSRect& aRect)
{ {
return aRect.x; 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; return aPoint.y;
} }
float AxisY::GetRectLength(const CSSRect& aRect) const float AxisY::GetRectLength(const CSSRect& aRect)
{ {
return aRect.height; return aRect.height;
} }
float AxisY::GetRectOffset(const CSSRect& aRect) const float AxisY::GetRectOffset(const CSSRect& aRect)
{ {
return aRect.y; return aRect.y;
} }

Просмотреть файл

@ -170,18 +170,18 @@ public:
*/ */
bool ScaleWillOverscrollBothSides(float aScale); bool ScaleWillOverscrollBothSides(float aScale);
float GetOrigin() const; float GetOrigin();
float GetCompositionLength() const; float GetCompositionLength();
float GetPageStart() const; float GetPageStart();
float GetPageLength() const; float GetPageLength();
float GetCompositionEnd() const; float GetCompositionEnd();
float GetPageEnd() const; float GetPageEnd();
int32_t GetPos() const { return mPos; } int32_t GetPos() const { return mPos; }
virtual float GetPointOffset(const CSSPoint& aPoint) const = 0; virtual float GetPointOffset(const CSSPoint& aPoint) = 0;
virtual float GetRectLength(const CSSRect& aRect) const = 0; virtual float GetRectLength(const CSSRect& aRect) = 0;
virtual float GetRectOffset(const CSSRect& aRect) const = 0; virtual float GetRectOffset(const CSSRect& aRect) = 0;
protected: protected:
int32_t mPos; int32_t mPos;
@ -195,17 +195,17 @@ protected:
class AxisX : public Axis { class AxisX : public Axis {
public: public:
AxisX(AsyncPanZoomController* mAsyncPanZoomController); AxisX(AsyncPanZoomController* mAsyncPanZoomController);
virtual float GetPointOffset(const CSSPoint& aPoint) const; virtual float GetPointOffset(const CSSPoint& aPoint);
virtual float GetRectLength(const CSSRect& aRect) const; virtual float GetRectLength(const CSSRect& aRect);
virtual float GetRectOffset(const CSSRect& aRect) const; virtual float GetRectOffset(const CSSRect& aRect);
}; };
class AxisY : public Axis { class AxisY : public Axis {
public: public:
AxisY(AsyncPanZoomController* mAsyncPanZoomController); AxisY(AsyncPanZoomController* mAsyncPanZoomController);
virtual float GetPointOffset(const CSSPoint& aPoint) const; virtual float GetPointOffset(const CSSPoint& aPoint);
virtual float GetRectLength(const CSSRect& aRect) const; virtual float GetRectLength(const CSSRect& aRect);
virtual float GetRectOffset(const CSSRect& aRect) const; virtual float GetRectOffset(const CSSRect& aRect);
}; };
} }