Bug 1251519 Part 2 - Remove nsLayoutUtils::IsRectVisibleInScrollFrames(). r?mats draft
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 10 Mar 2016 17:38:31 +0800
changeset 338984 9e03b4b71ebdbbde762b84dd1e193cdcb43214d1
parent 338983 99595b41c69e38b0828d25556bac02ae6e98cbb6
child 338985 7f13469534ecde47ce7a81c1040990657c3f4c99
push id12625
push usertlin@mozilla.com
push dateThu, 10 Mar 2016 09:49:24 +0000
reviewersmats
bugs1251519, 1221459
milestone48.0a1
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
layout/base/nsLayoutUtils.cpp
layout/base/nsLayoutUtils.h
--- 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,