Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2210863002: Revert of Remove hasGrammarMarker from internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 429e18c4d9aeaa4b959c4facb739b8951a8f5636..d24834598ee3489320979ce17cc6e8dd12cc6662 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -175,6 +175,8 @@
result = DocumentMarker::AllMarkers();
else if (equalIgnoringCase(markerType, "Spelling"))
result = DocumentMarker::Spelling;
+ else if (equalIgnoringCase(markerType, "Grammar"))
+ result = DocumentMarker::Grammar;
else if (equalIgnoringCase(markerType, "TextMatch"))
result = DocumentMarker::TextMatch;
else
@@ -1608,6 +1610,15 @@
result.append(memoryCache()->capacity());
memoryCache()->setCapacities(minDeadBytes, maxDeadBytes, totalBytes);
return result;
+}
+
+bool Internals::hasGrammarMarker(Document* document, int from, int length)
+{
+ ASSERT(document);
+ if (!document->frame())
+ return false;
+
+ return document->frame()->spellChecker().selectionStartHasMarkerFor(DocumentMarker::Grammar, from, length);
}
unsigned Internals::numberOfScrollableAreas(Document* document)
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698