| Index: third_party/WebKit/Source/core/dom/Range.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Range.cpp b/third_party/WebKit/Source/core/dom/Range.cpp
|
| index deae19228de4b177d043485e624d0bb0a9d22e8b..d30539bd95848065c192ed3f40ebd312057a3759 100644
|
| --- a/third_party/WebKit/Source/core/dom/Range.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Range.cpp
|
| @@ -1433,21 +1433,11 @@ void Range::CheckExtractPrecondition(ExceptionState& exception_state) {
|
| }
|
|
|
| Node* Range::FirstNode() const {
|
| - if (start_.Container().IsCharacterDataNode())
|
| - return &start_.Container();
|
| - if (Node* child = NodeTraversal::ChildAt(start_.Container(), start_.Offset()))
|
| - return child;
|
| - if (!start_.Offset())
|
| - return &start_.Container();
|
| - return NodeTraversal::NextSkippingChildren(start_.Container());
|
| + return StartPosition().NodeAsRangeFirstNode();
|
| }
|
|
|
| Node* Range::PastLastNode() const {
|
| - if (end_.Container().IsCharacterDataNode())
|
| - return NodeTraversal::NextSkippingChildren(end_.Container());
|
| - if (Node* child = NodeTraversal::ChildAt(end_.Container(), end_.Offset()))
|
| - return child;
|
| - return NodeTraversal::NextSkippingChildren(end_.Container());
|
| + return EndPosition().NodeAsRangePastLastNode();
|
| }
|
|
|
| IntRect Range::BoundingBox() const {
|
|
|