Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/DOMSelection.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp |
| index 4540f0f6369de4b28cfb82f37fc318da948c1a68..770df423472bc6e5fff13ae5489d9649fb7f89ba 100644 |
| --- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp |
| +++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp |
| @@ -581,6 +581,14 @@ void DOMSelection::clearCachedRangeIfSelectionOfDocument() { |
| frame()->selection().clearDocumentCachedRange(); |
| } |
| +void DOMSelection::removeRange(Range* range) { |
| + DCHECK(range); |
| + if (!isAvailable()) |
| + return; |
| + if (range == primaryRangeOrNull()) |
|
yosin_UTC9
2017/02/24 14:47:55
nit: I prefer early-return style:
if (range != pr
tkent
2017/02/24 17:44:12
I prefer early-return in general. However, not-ea
|
| + frame()->selection().clear(); |
| +} |
| + |
| void DOMSelection::removeAllRanges() { |
| if (!isAvailable()) |
| return; |