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

Unified Diff: Source/core/dom/DocumentMarker.h

Issue 23728006: addMarker() optimizations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase & split marker list by marker type. Created 7 years, 3 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: Source/core/dom/DocumentMarker.h
diff --git a/Source/core/dom/DocumentMarker.h b/Source/core/dom/DocumentMarker.h
index b6072b9701c76607f4cd735443d80bbe8d2538b9..48db6e48283e92f0695ae8dd44544649504efb0a 100644
--- a/Source/core/dom/DocumentMarker.h
+++ b/Source/core/dom/DocumentMarker.h
@@ -38,10 +38,17 @@ class DocumentMarkerDetails;
// for all types other than type TextMatch.
class DocumentMarker {
public:
+ enum MarkerTypeIndex {
+ SpellingMarkerIndex,
groby-ooo-7-16 2013/09/19 18:17:09 Personal nit: I prefer a "= 0" after the first enu
pstanek 2013/09/21 21:10:51 Done.
+ GramarMarkerIndex,
+ TextMatchMarkerIndex,
+ MarkerTypeIndexesCount
+ };
+
enum MarkerType {
- Spelling = 1 << 0,
- Grammar = 1 << 1,
- TextMatch = 1 << 2
+ Spelling = 1 << SpellingMarkerIndex,
+ Grammar = 1 << GramarMarkerIndex,
+ TextMatch = 1 << TextMatchMarkerIndex
};
class MarkerTypes {
« no previous file with comments | « no previous file | Source/core/dom/DocumentMarkerController.h » ('j') | Source/core/dom/DocumentMarkerController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698