mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
Backed out changeset 3486a7a210a1 (bug 976605) for build failures; CLOSED TREE
This commit is contained in:
parent
c46be2513f
commit
4ac96f1555
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user