зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1063224 - Add a bit more infrastructure to Axis. r=kats
--HG-- extra : source : 42dc115521166059d08e2cb1c7d23105bb54cbee
This commit is contained in:
Родитель
469a8cdd21
Коммит
482d310a1f
|
@ -387,6 +387,11 @@ CSSCoord AxisX::GetRectOffset(const CSSRect& aRect) const
|
|||
return aRect.x;
|
||||
}
|
||||
|
||||
ScreenPoint AxisX::MakePoint(ScreenCoord aCoord) const
|
||||
{
|
||||
return ScreenPoint(aCoord, 0);
|
||||
}
|
||||
|
||||
AxisY::AxisY(AsyncPanZoomController* aAsyncPanZoomController)
|
||||
: Axis(aAsyncPanZoomController)
|
||||
{
|
||||
|
@ -408,5 +413,10 @@ CSSCoord AxisY::GetRectOffset(const CSSRect& aRect) const
|
|||
return aRect.y;
|
||||
}
|
||||
|
||||
ScreenPoint AxisY::MakePoint(ScreenCoord aCoord) const
|
||||
{
|
||||
return ScreenPoint(0, aCoord);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -217,6 +217,8 @@ public:
|
|||
virtual CSSCoord GetRectLength(const CSSRect& aRect) const = 0;
|
||||
virtual CSSCoord GetRectOffset(const CSSRect& aRect) const = 0;
|
||||
|
||||
virtual ScreenPoint MakePoint(ScreenCoord aCoord) const = 0;
|
||||
|
||||
protected:
|
||||
ScreenCoord mPos;
|
||||
uint32_t mPosTimeMs;
|
||||
|
@ -250,6 +252,7 @@ public:
|
|||
virtual CSSCoord GetPointOffset(const CSSPoint& aPoint) const;
|
||||
virtual CSSCoord GetRectLength(const CSSRect& aRect) const;
|
||||
virtual CSSCoord GetRectOffset(const CSSRect& aRect) const;
|
||||
virtual ScreenPoint MakePoint(ScreenCoord aCoord) const;
|
||||
};
|
||||
|
||||
class AxisY : public Axis {
|
||||
|
@ -258,6 +261,7 @@ public:
|
|||
virtual CSSCoord GetPointOffset(const CSSPoint& aPoint) const;
|
||||
virtual CSSCoord GetRectLength(const CSSRect& aRect) const;
|
||||
virtual CSSCoord GetRectOffset(const CSSRect& aRect) const;
|
||||
virtual ScreenPoint MakePoint(ScreenCoord aCoord) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче