| 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 e38f0d7e42fdbde9b633cc4c0e733d008db35ad8..5d1af9d7223b8acb3f1d7fb0bffb49f15787aa78 100644
|
| --- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
|
| @@ -224,11 +224,6 @@ void DOMSelection::collapse(Node* node,
|
|
|
| // 2. The method must throw an IndexSizeError exception if offset is longer
|
| // than node's length ([DOM4]) and abort these steps.
|
| - if (offset < 0) {
|
| - exceptionState.throwDOMException(
|
| - IndexSizeError, String::number(offset) + " is not a valid offset.");
|
| - return;
|
| - }
|
| Range::checkNodeWOffset(node, offset, exceptionState);
|
| if (exceptionState.hadException())
|
| return;
|
| @@ -322,20 +317,6 @@ void DOMSelection::setBaseAndExtent(Node* baseNode,
|
| if (!isAvailable())
|
| return;
|
|
|
| - if (baseOffset < 0) {
|
| - exceptionState.throwDOMException(
|
| - IndexSizeError,
|
| - String::number(baseOffset) + " is not a valid base offset.");
|
| - return;
|
| - }
|
| -
|
| - if (extentOffset < 0) {
|
| - exceptionState.throwDOMException(
|
| - IndexSizeError,
|
| - String::number(extentOffset) + " is not a valid extent offset.");
|
| - return;
|
| - }
|
| -
|
| // 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) {
|
| @@ -471,11 +452,6 @@ void DOMSelection::extend(Node* node,
|
| return;
|
| }
|
|
|
| - if (offset < 0) {
|
| - exceptionState.throwDOMException(
|
| - IndexSizeError, String::number(offset) + " is not a valid offset.");
|
| - return;
|
| - }
|
| Range::checkNodeWOffset(node, offset, exceptionState);
|
| if (exceptionState.hadException())
|
| return;
|
|
|