Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Unified Diff: third_party/WebKit/Source/web/TextFinder.cpp

Issue 2904833002: LayoutObject::AbsoluteBoundingBoxRectForRange() should take EphemeralRange (Closed)
Patch Set: RebasedAndUpdatedWithComments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/TextFinder.cpp
diff --git a/third_party/WebKit/Source/web/TextFinder.cpp b/third_party/WebKit/Source/web/TextFinder.cpp
index ee0bd074f8da6172b2e622a3e4730ecf0c2a0307..185340245ce5936b08f11c4f551048ffa123106a 100644
--- a/third_party/WebKit/Source/web/TextFinder.cpp
+++ b/third_party/WebKit/Source/web/TextFinder.cpp
@@ -170,7 +170,7 @@ bool TextFinder::Find(int identifier,
OwnerFrame().ViewImpl()->ZoomToFindInPageRect(
OwnerFrame().GetFrameView()->ContentsToRootFrame(
EnclosingIntRect(LayoutObject::AbsoluteBoundingBoxRectForRange(
- active_match_.Get()))));
+ EphemeralRange(active_match_.Get())))));
}
bool was_active_frame = current_active_match_frame_;
@@ -540,7 +540,7 @@ void TextFinder::UpdateFindMatchRects() {
!match.range_->startContainer()->isConnected())
match.rect_ = FloatRect();
else if (!find_match_rects_are_valid_)
- match.rect_ = FindInPageRectFromRange(match.range_.Get());
+ match.rect_ = FindInPageRectFromRange(EphemeralRange(match.range_.Get()));
if (match.rect_.IsEmpty())
++dead_matches;
@@ -575,7 +575,7 @@ WebFloatRect TextFinder::ActiveFindMatchRect() {
if (!current_active_match_frame_ || !active_match_)
return WebFloatRect();
- return WebFloatRect(FindInPageRectFromRange(ActiveMatch()));
+ return WebFloatRect(FindInPageRectFromRange(EphemeralRange(ActiveMatch())));
}
void TextFinder::FindMatchRects(WebVector<WebFloatRect>& output_rects) {
@@ -654,8 +654,9 @@ int TextFinder::SelectFindMatch(unsigned index, WebRect* selection_rect) {
}
IntRect active_match_rect;
- IntRect active_match_bounding_box = EnclosingIntRect(
- LayoutObject::AbsoluteBoundingBoxRectForRange(active_match_.Get()));
+ IntRect active_match_bounding_box =
+ EnclosingIntRect(LayoutObject::AbsoluteBoundingBoxRectForRange(
+ EphemeralRange(active_match_.Get())));
if (!active_match_bounding_box.IsEmpty()) {
if (active_match_->FirstNode() &&
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/web/tests/TextFinderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698