Commit 30aebe7e authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Make FindInPageRectFromRange to use ComputeTextRect()

This function changes FindInPageRectFromRange to use |ComputeTextRect()| instead
of |LayoutObject::AbsoluteBoundingBoxRectForRange()|, which is a wrapper of
|ComputeTextRect()|, to simplify source code.

Following patch will get rid of |AbsoluteBoundingBoxRectForRange()|.

Change-Id: I2c9d3d198a95fa53b943fd9cbdef0a93d0d3ddb3
Reviewed-on: https://chromium-review.googlesource.com/c/1451505Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629005}
parent ee292cc0
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "third_party/blink/renderer/core/dom/node.h" #include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/dom/range.h" #include "third_party/blink/renderer/core/dom/range.h"
#include "third_party/blink/renderer/core/editing/ephemeral_range.h" #include "third_party/blink/renderer/core/editing/ephemeral_range.h"
#include "third_party/blink/renderer/core/editing/visible_units.h"
#include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/layout/layout_block.h" #include "third_party/blink/renderer/core/layout/layout_block.h"
...@@ -147,8 +148,8 @@ FloatRect FindInPageRectFromRange(const EphemeralRange& range) { ...@@ -147,8 +148,8 @@ FloatRect FindInPageRectFromRange(const EphemeralRange& range) {
if (!baseLayoutObject) if (!baseLayoutObject)
return FloatRect(); return FloatRect();
return FindInPageRectFromAbsoluteRect( return FindInPageRectFromAbsoluteRect(ComputeTextFloatRect(range),
LayoutObject::AbsoluteBoundingBoxRectForRange(range), baseLayoutObject); baseLayoutObject);
} }
} // namespace blink } // namespace blink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment