| Index: third_party/WebKit/Source/core/editing/FindInPageCoordinates.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/FindInPageCoordinates.cpp b/third_party/WebKit/Source/core/editing/FindInPageCoordinates.cpp
|
| index f09f593b58fefd3e0cc77bdbd5a08c49fa9b5d21..a5bf691d42bc3612bc1addaa45e9bc88e53af662 100644
|
| --- a/third_party/WebKit/Source/core/editing/FindInPageCoordinates.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/FindInPageCoordinates.cpp
|
| @@ -146,13 +146,17 @@ FloatRect FindInPageRectFromAbsoluteRect(
|
| return normalized_rect;
|
| }
|
|
|
| -FloatRect FindInPageRectFromRange(Range* range) {
|
| - if (!range || !range->FirstNode())
|
| +FloatRect FindInPageRectFromRange(const EphemeralRange& range) {
|
| + if (range.IsNull() || !range.StartPosition().NodeAsRangeFirstNode())
|
| + return FloatRect();
|
| +
|
| + const LayoutObject* const baseLayoutObject =
|
| + range.StartPosition().NodeAsRangeFirstNode()->GetLayoutObject();
|
| + if (!baseLayoutObject)
|
| return FloatRect();
|
|
|
| return FindInPageRectFromAbsoluteRect(
|
| - LayoutObject::AbsoluteBoundingBoxRectForRange(range),
|
| - range->FirstNode()->GetLayoutObject());
|
| + LayoutObject::AbsoluteBoundingBoxRectForRange(range), baseLayoutObject);
|
| }
|
|
|
| } // namespace blink
|
|
|