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

Unified Diff: third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImpl.h

Issue 2873483002: [DMC #5.6] Add type cast for SpellCheckMarkerListImpl (Closed)
Patch Set: Rebase Created 3 years, 7 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/editing/markers/SpellCheckMarkerListImpl.h
diff --git a/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImpl.h b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImpl.h
index ff3de05d1391139db2c952726c3d1a0c40daf3cb..e2e93875c16442067ea657d08cce17b2ea47e073 100644
--- a/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImpl.h
+++ b/third_party/WebKit/Source/core/editing/markers/SpellCheckMarkerListImpl.h
@@ -9,13 +9,13 @@
namespace blink {
-// Implementation of DocumentMarkerList for Spelling/Grammar markers.
-// Markers with touching endpoints are merged on insert. Markers are kept sorted
-// by start offset in order to be able to do this efficiently.
+// Nearly-complete implementation of DocumentMarkerList for Spelling or Grammar
+// markers (subclassed by SpellingMarkerListImpl and GrammarMarkerListImpl to
+// implement the MarkerType() method). Markers with touching endpoints are
+// merged on insert. Markers are kept sorted by start offset in order to be able
+// to do this efficiently.
class CORE_EXPORT SpellCheckMarkerListImpl : public DocumentMarkerList {
public:
- SpellCheckMarkerListImpl() = default;
-
// DocumentMarkerList implementations
bool IsEmpty() const final;
@@ -34,12 +34,21 @@ class CORE_EXPORT SpellCheckMarkerListImpl : public DocumentMarkerList {
DECLARE_VIRTUAL_TRACE();
+ protected:
+ SpellCheckMarkerListImpl() = default;
+
private:
HeapVector<Member<RenderedDocumentMarker>> markers_;
DISALLOW_COPY_AND_ASSIGN(SpellCheckMarkerListImpl);
};
+DEFINE_TYPE_CASTS(SpellCheckMarkerListImpl,
+ DocumentMarkerList,
+ list,
+ true,
yosin_UTC9 2017/05/15 02:17:28 MarkerType() == kSpellingMarker and MarkerType() =
rlanday 2017/05/15 02:27:11 Oh wow, I think I was missing the forest for the t
+ true);
+
} // namespace blink
#endif // SpellCheckMarkerListImpl_h

Powered by Google App Engine
This is Rietveld 408576698