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

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

Issue 2780313002: [WIP] Refactor DocumentMarker (Closed)
Patch Set: Move accessor methods into derived classes 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 b003b520d49b903656029a63dade9e8b28a5e8bc..300211cdb13d82371b0352951275fed70f152648 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