Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/Position.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/Position.cpp b/third_party/WebKit/Source/core/editing/Position.cpp |
| index 771328e27d55caed0c567d7e0dd7aec8c337b84d..eab61e4ba6df3f245d5175760b3664b13d1dca26 100644 |
| --- a/third_party/WebKit/Source/core/editing/Position.cpp |
| +++ b/third_party/WebKit/Source/core/editing/Position.cpp |
| @@ -353,6 +353,16 @@ bool PositionTemplate<Strategy>::operator>=( |
| } |
| template <typename Strategy> |
| +bool PositionTemplate<Strategy>::IsEquivalent( |
| + const PositionTemplate<Strategy>& other) const { |
| + if (IsNull()) |
| + return other.IsNull(); |
|
yoichio
2017/05/15 01:43:05
nlgtm because Nan != Nan generally.
yosin_UTC9
2017/05/15 04:08:15
IsNull() doesn't mean NaN.
Also, Position::operato
|
| + if (anchor_type_ == other.anchor_type_) |
| + return *this == other; |
| + return ToOffsetInAnchor() == other.ToOffsetInAnchor(); |
| +} |
| + |
| +template <typename Strategy> |
| bool PositionTemplate<Strategy>::AtFirstEditingPositionForNode() const { |
| if (IsNull()) |
| return true; |