| 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 21c35038a70d2d6ab26fc4ef12acada8418557f4..87dad2b4736e913857d15d0baa319e14becde77e 100644
|
| --- a/third_party/WebKit/Source/core/testing/Internals.cpp
|
| +++ b/third_party/WebKit/Source/core/testing/Internals.cpp
|
| @@ -1791,6 +1791,17 @@ StaticNodeList* Internals::nodesFromRect(Document* document,
|
| return StaticNodeList::adopt(matches);
|
| }
|
|
|
| +void Internals::setSpellingMarker(Document* document) {
|
| + DCHECK(document);
|
| + DCHECK(document->frame());
|
| +
|
| + EphemeralRange range =
|
| + document->frame()->selection().selection().toNormalizedEphemeralRange();
|
| + document->markers().addMarker(range.startPosition(), range.endPosition(),
|
| + DocumentMarker::Spelling);
|
| + document->updateStyleAndLayoutIgnorePendingStylesheets();
|
| +}
|
| +
|
| bool Internals::hasSpellingMarker(Document* document, int from, int length) {
|
| ASSERT(document);
|
| if (!document->frame())
|
| @@ -1810,6 +1821,14 @@ void Internals::setSpellCheckingEnabled(bool enabled) {
|
| contextDocument()->frame()->spellChecker().toggleSpellCheckingEnabled();
|
| }
|
|
|
| +void Internals::replaceMisspelled(Document* document,
|
| + const String& replacement) {
|
| + DCHECK(document);
|
| + DCHECK(document->frame());
|
| +
|
| + document->frame()->spellChecker().replaceMisspelledRange(replacement);
|
| +}
|
| +
|
| bool Internals::canHyphenate(const AtomicString& locale) {
|
| return LayoutLocale::valueOrDefault(LayoutLocale::get(locale))
|
| .getHyphenation();
|
|
|