| 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 91d8dbedd404b282866de9c7e0d5c0719ca87a62..e7c2c90f96b4e024411441a5976e81793204f542 100644
|
| --- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
|
| @@ -272,8 +272,17 @@ void DOMSelection::setBaseAndExtent(Node* baseNode,
|
| return;
|
| }
|
|
|
| - if (!baseNode || !extentNode)
|
| + // TODO(editing-dev): Behavior on where base or extent is null is still
|
| + // under discussion: https://github.com/w3c/selection-api/issues/72
|
| + if (!baseNode) {
|
| UseCounter::count(frame(), UseCounter::SelectionSetBaseAndExtentNull);
|
| + frame()->selection().clear();
|
| + return;
|
| + }
|
| + if (!extentNode) {
|
| + UseCounter::count(frame(), UseCounter::SelectionSetBaseAndExtentNull);
|
| + extentOffset = 0;
|
| + }
|
|
|
| if (!isValidForPosition(baseNode) || !isValidForPosition(extentNode))
|
| return;
|
|
|