| Index: third_party/WebKit/Source/core/testing/Internals.cpp
|
| diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
|
| index 300211cdb13d82371b0352951275fed70f152648..3eb62d9183c990e67e9c1313b63394453e746d94 100644
|
| --- a/third_party/WebKit/Source/core/testing/Internals.cpp
|
| +++ b/third_party/WebKit/Source/core/testing/Internals.cpp
|
| @@ -923,8 +923,25 @@ void Internals::setMarker(Document* document,
|
| }
|
|
|
| document->updateStyleAndLayoutIgnorePendingStylesheets();
|
| - document->markers().addMarker(range->startPosition(), range->endPosition(),
|
| - type.value());
|
| +
|
| + if (type == DocumentMarker::Grammar) {
|
| + document->markers().addGrammarMarker(range->startPosition(),
|
| + range->endPosition());
|
| + return;
|
| + }
|
| +
|
| + if (type == DocumentMarker::Spelling) {
|
| + document->markers().addSpellingMarker(range->startPosition(),
|
| + range->endPosition());
|
| + return;
|
| + }
|
| +
|
| + // Grammar and Spelling markers are the only marker types that can be set with
|
| + // just a range
|
| + exceptionState.throwDOMException(
|
| + SyntaxError,
|
| + "Marker of type '" + markerType +
|
| + "' was provided; type must be either Grammar or Spelling.");
|
| }
|
|
|
| unsigned Internals::markerCountForNode(Node* node,
|
|
|