Bug 1407987 Part 1: Change isRangeVisible to only use isRangeRendered for text within the viewport. r=mikedeboer
☠☠ backed out by 26268962cf5e ☠ ☠
authorBrad Werth <bwerth@mozilla.com>
Thu, 12 Oct 2017 15:49:18 -0700
changeset 386788 ed9097c98efaa89e1b6e56b4d13b26f86648d01d
parent 386787 7f841ee580b9745b6d75649619411295e863ed6e
child 386789 fb0a06ceed77eac4fab4865fd8b18f0c32fd162f
push id96311
push userarchaeopteryx@coole-files.de
push dateWed, 18 Oct 2017 09:52:02 +0000
treeherdermozilla-inbound@a8a1e8cc1980 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1407987
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1407987 Part 1: Change isRangeVisible to only use isRangeRendered for text within the viewport. r=mikedeboer MozReview-Commit-ID: BUlZ5SGTiSR
toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
--- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
+++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp
@@ -1263,19 +1263,19 @@ nsTypeAheadFind::IsRangeVisible(nsIPresS
   nsRectVisibility rectVisibility = nsRectVisibility_kAboveViewport;
 
   if (!aGetTopVisibleLeaf && !frame->GetRect().IsEmpty()) {
     rectVisibility =
       aPresShell->GetRectVisibility(frame,
                                     nsRect(nsPoint(0,0), frame->GetSize()),
                                     minDistance);
 
-    if (rectVisibility != nsRectVisibility_kAboveViewport) {
-      // This is an early exit case, where we return true iff the range
-      // is actually rendered.
+    if (rectVisibility == nsRectVisibility_kVisible) {
+      // This is an early exit case, where we return true if and only if
+      // the range is actually rendered.
       return IsRangeRendered(aPresShell, aPresContext, aRange);
     }
   }
 
   // Below this point, we know the range is not in the viewport.
 
   if (!aMustBeInViewPort) {
     // This is an early exit case because we don't care that that range