Bug 1708855 - Remove Axis::GetScaleForAxis(). r=tnikkel

It was duplicating the method GetAxisScale().

Differential Revision: https://phabricator.services.mozilla.com/D114180
This commit is contained in:
Botond Ballo 2021-05-03 23:51:29 +00:00
Родитель 9adeec0ae9
Коммит edaa0e7e9b
2 изменённых файлов: 1 добавлений и 17 удалений

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

@ -296,7 +296,7 @@ bool Axis::CanScroll(ParentLayerCoord aDelta) const {
}
CSSCoord Axis::ClampOriginToScrollableRect(CSSCoord aOrigin) const {
CSSToParentLayerScale zoom = GetScaleForAxis(GetFrameMetrics().GetZoom());
CSSToParentLayerScale zoom = GetAxisScale(GetFrameMetrics().GetZoom());
ParentLayerCoord origin = aOrigin * zoom;
ParentLayerCoord result;
if (origin < GetPageStart()) {
@ -473,11 +473,6 @@ ParentLayerCoord AxisX::GetRectOffset(const ParentLayerRect& aRect) const {
return aRect.X();
}
CSSToParentLayerScale AxisX::GetScaleForAxis(
const CSSToParentLayerScale2D& aScale) const {
return CSSToParentLayerScale(aScale.xScale);
}
float AxisX::GetTransformScale(
const AsyncTransformComponentMatrix& aMatrix) const {
return aMatrix._11;
@ -557,11 +552,6 @@ ParentLayerCoord AxisY::GetRectOffset(const ParentLayerRect& aRect) const {
return aRect.Y();
}
CSSToParentLayerScale AxisY::GetScaleForAxis(
const CSSToParentLayerScale2D& aScale) const {
return CSSToParentLayerScale(aScale.yScale);
}
float AxisY::GetTransformScale(
const AsyncTransformComponentMatrix& aMatrix) const {
return aMatrix._22;

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

@ -294,8 +294,6 @@ class Axis {
const ParentLayerRect& aRect) const = 0;
virtual ParentLayerCoord GetRectOffset(
const ParentLayerRect& aRect) const = 0;
virtual CSSToParentLayerScale GetScaleForAxis(
const CSSToParentLayerScale2D& aScale) const = 0;
virtual float GetTransformScale(
const AsyncTransformComponentMatrix& aMatrix) const = 0;
virtual ParentLayerCoord GetTransformTranslation(
@ -370,8 +368,6 @@ class AxisX : public Axis {
const ParentLayerPoint& aPoint) const override;
ParentLayerCoord GetRectLength(const ParentLayerRect& aRect) const override;
ParentLayerCoord GetRectOffset(const ParentLayerRect& aRect) const override;
CSSToParentLayerScale GetScaleForAxis(
const CSSToParentLayerScale2D& aScale) const override;
float GetTransformScale(
const AsyncTransformComponentMatrix& aMatrix) const override;
ParentLayerCoord GetTransformTranslation(
@ -399,8 +395,6 @@ class AxisY : public Axis {
const CSSToParentLayerScale2D& aScale) const override;
ParentLayerCoord GetRectLength(const ParentLayerRect& aRect) const override;
ParentLayerCoord GetRectOffset(const ParentLayerRect& aRect) const override;
CSSToParentLayerScale GetScaleForAxis(
const CSSToParentLayerScale2D& aScale) const override;
float GetTransformScale(
const AsyncTransformComponentMatrix& aMatrix) const override;
ParentLayerCoord GetTransformTranslation(