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

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp

Issue 2820343004: [DMC #4] Add CompositionMarkerListImpl (Closed)
Patch Set: DECLARE_VIRTUAL_TRACE() Created 3 years, 8 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/DocumentMarkerController.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
index d13fbd068d1a5dcbea34863c5b6999f7e3a38508..dc2881b92fbe6d4cfae34626bc7e712bcfb6ae0e 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
@@ -34,6 +34,7 @@
#include "core/dom/Range.h"
#include "core/dom/Text.h"
#include "core/editing/iterators/TextIterator.h"
+#include "core/editing/markers/CompositionMarkerListImpl.h"
#include "core/editing/markers/DocumentMarkerListEditor.h"
#include "core/editing/markers/GenericDocumentMarkerListImpl.h"
#include "core/editing/markers/RenderedDocumentMarker.h"
@@ -66,9 +67,12 @@ DocumentMarker::MarkerTypeIndex MarkerTypeToMarkerIndex(
}
DocumentMarkerList* CreateListForType(DocumentMarker::MarkerType type) {
- // All MarkerTypes use GenericDocumentMarkerListImpl for now. Eventually we
- // will use different marker list classes for different MarkerTypes.
- return new GenericDocumentMarkerListImpl();
+ switch (type) {
+ case DocumentMarker::kComposition:
+ return new CompositionMarkerListImpl();
+ default:
+ return new GenericDocumentMarkerListImpl();
+ }
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698