зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1168263 - Remove TransformRectOut since it's unused. r=roc
This commit is contained in:
Родитель
32478eadd5
Коммит
c684f27337
|
@ -5982,20 +5982,6 @@ nsRect nsDisplayTransform::TransformRect(const nsRect &aUntransformedBounds,
|
|||
factor);
|
||||
}
|
||||
|
||||
nsRect nsDisplayTransform::TransformRectOut(const nsRect &aUntransformedBounds,
|
||||
const nsIFrame* aFrame,
|
||||
const nsPoint &aOrigin,
|
||||
const nsRect* aBoundsOverride)
|
||||
{
|
||||
NS_PRECONDITION(aFrame, "Can't take the transform based on a null frame!");
|
||||
|
||||
float factor = aFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
return nsLayoutUtils::MatrixTransformRectOut
|
||||
(aUntransformedBounds,
|
||||
GetResultingTransformMatrixP3D(aFrame, aOrigin, factor, aBoundsOverride),
|
||||
factor);
|
||||
}
|
||||
|
||||
bool nsDisplayTransform::UntransformRect(const nsRect &aTransformedBounds,
|
||||
const nsRect &aChildBounds,
|
||||
const nsIFrame* aFrame,
|
||||
|
|
|
@ -3848,11 +3848,6 @@ public:
|
|||
const nsRect* aBoundsOverride = nullptr,
|
||||
bool aPreserves3D = true);
|
||||
|
||||
static nsRect TransformRectOut(const nsRect &aUntransformedBounds,
|
||||
const nsIFrame* aFrame,
|
||||
const nsPoint &aOrigin,
|
||||
const nsRect* aBoundsOverride = nullptr);
|
||||
|
||||
/* UntransformRect is like TransformRect, except that it inverts the
|
||||
* transform.
|
||||
*/
|
||||
|
|
|
@ -2399,23 +2399,6 @@ nsLayoutUtils::RoundedRectIntersectsRect(const nsRect& aRoundedRect,
|
|||
aRadii[NS_CORNER_BOTTOM_LEFT_Y]);
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsLayoutUtils::MatrixTransformRectOut(const nsRect &aBounds,
|
||||
const Matrix4x4 &aMatrix, float aFactor)
|
||||
{
|
||||
nsRect outside = aBounds;
|
||||
outside.ScaleRoundOut(1/aFactor);
|
||||
RectDouble image = RectDouble(outside.x, outside.y,
|
||||
outside.width, outside.height);
|
||||
|
||||
RectDouble maxBounds = RectDouble(double(nscoord_MIN) / aFactor * 0.5,
|
||||
double(nscoord_MIN) / aFactor * 0.5,
|
||||
double(nscoord_MAX) / aFactor,
|
||||
double(nscoord_MAX) / aFactor);
|
||||
image = aMatrix.TransformAndClipBounds(image, maxBounds);
|
||||
return RoundGfxRectToAppRect(ThebesRect(image), aFactor);
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsLayoutUtils::MatrixTransformRect(const nsRect &aBounds,
|
||||
const Matrix4x4 &aMatrix, float aFactor)
|
||||
|
|
|
@ -919,18 +919,6 @@ public:
|
|||
static nsRect MatrixTransformRect(const nsRect &aBounds,
|
||||
const Matrix4x4 &aMatrix, float aFactor);
|
||||
|
||||
/**
|
||||
* Helper function that, given a rectangle and a matrix, returns the smallest
|
||||
* rectangle containing the image of the source rectangle rounded out to the nearest
|
||||
* pixel value.
|
||||
*
|
||||
* @param aBounds The rectangle to transform.
|
||||
* @param aMatrix The matrix to transform it with.
|
||||
* @param aFactor The number of app units per graphics unit.
|
||||
* @return The smallest rect that contains the image of aBounds.
|
||||
*/
|
||||
static nsRect MatrixTransformRectOut(const nsRect &aBounds,
|
||||
const Matrix4x4 &aMatrix, float aFactor);
|
||||
/**
|
||||
* Helper function that, given a point and a matrix, returns the image
|
||||
* of that point under the matrix transform.
|
||||
|
|
Загрузка…
Ссылка в новой задаче