Bug 1251519 Part 2 - Remove nsLayoutUtils::IsRectVisibleInScrollFrames(). r?mats
nsLayoutUtils::IsRectVisibleInScrollFrames() was used only by
SelectionCarets which was removed in
bug 1221459.
MozReview-Commit-ID: 4dQAq1umHY7
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -2671,22 +2671,16 @@ bool
nsLayoutUtils::ContainsPoint(const nsRect& aRect, const nsPoint& aPoint,
nscoord aInflateSize)
{
nsRect rect = aRect;
rect.Inflate(aInflateSize);
return rect.Contains(aPoint);
}
-bool
-nsLayoutUtils::IsRectVisibleInScrollFrames(nsIFrame* aFrame, const nsRect& aRect)
-{
- return !ClampRectToScrollFrames(aFrame, aRect).IsEmpty();
-}
-
nsRect
nsLayoutUtils::ClampRectToScrollFrames(nsIFrame* aFrame, const nsRect& aRect)
{
nsIFrame* closestScrollFrame =
nsLayoutUtils::GetClosestFrameOfType(aFrame, nsGkAtoms::scrollFrame);
nsRect resultRect = aRect;
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -886,23 +886,16 @@ public:
/**
* Returns true if aRect with border inflation of size aInflateSize contains
* aPoint.
*/
static bool ContainsPoint(const nsRect& aRect, const nsPoint& aPoint,
nscoord aInflateSize);
/**
- * Check whether aRect is visible in the boundary of the scroll frames
- * boundary.
- */
- static bool IsRectVisibleInScrollFrames(nsIFrame* aFrame,
- const nsRect& aRect);
-
- /**
* Clamp aRect relative to aFrame to the scroll frames boundary searching from
* aFrame.
*/
static nsRect ClampRectToScrollFrames(nsIFrame* aFrame,
const nsRect& aRect);
/**
* Return true if a "layer transform" could be computed for aFrame,