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

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

Issue 2790703004: [WIP] Move DocumentMarker accessors into subclasses (Closed)
Patch Set: Move CompositionMarkerList::at() into previous CL Created 3 years, 9 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 65acbd723d5e8a5edd5bb0fcc51a9fe19756117f..a8c64b24915f6ab2dfa0a42e1ecf3e42e1f96752 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -68,6 +68,8 @@
#include "core/editing/iterators/TextIterator.h"
#include "core/editing/markers/DocumentMarker.h"
#include "core/editing/markers/DocumentMarkerController.h"
+#include "core/editing/markers/SpellCheckMarker.h"
+#include "core/editing/markers/TextMatchMarker.h"
#include "core/editing/serializers/Serialization.h"
#include "core/editing/spellcheck/IdleSpellCheckCallback.h"
#include "core/editing/spellcheck/SpellCheckRequester.h"
@@ -954,7 +956,7 @@ unsigned Internals::activeMarkerCountForNode(Node* node) {
unsigned activeMarkerCount = 0;
for (const auto& marker : markers) {
- if (marker->activeMatch())
+ if (toTextMatchMarker(marker)->activeMatch())
activeMarkerCount++;
}
@@ -1001,7 +1003,7 @@ String Internals::markerDescriptionForNode(Node* node,
DocumentMarker* marker = markerAt(node, markerType, index, exceptionState);
if (!marker)
return String();
- return marker->description();
+ return toSpellCheckMarker(marker)->description();
}
void Internals::addTextMatchMarker(const Range* range, bool isActive) {

Powered by Google App Engine
This is Rietveld 408576698