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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarker.h

Issue 2908643002: [DMC #23] Add CompositionMarker (subclass of DocumentMarker) (Closed)
Patch Set: Attempt to fix Android build by using EXPECT_FALSE() Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of the DOM implementation for WebCore. 2 * This file is part of the DOM implementation for WebCore.
3 * 3 *
4 * Copyright (C) 2006 Apple Computer, Inc. 4 * Copyright (C) 2006 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 class MisspellingMarkers : public MarkerTypes { 126 class MisspellingMarkers : public MarkerTypes {
127 public: 127 public:
128 MisspellingMarkers() : MarkerTypes(kSpelling | kGrammar) {} 128 MisspellingMarkers() : MarkerTypes(kSpelling | kGrammar) {}
129 }; 129 };
130 130
131 DocumentMarker(MarkerType, 131 DocumentMarker(MarkerType,
132 unsigned start_offset, 132 unsigned start_offset,
133 unsigned end_offset, 133 unsigned end_offset,
134 const String& description); 134 const String& description);
135 DocumentMarker(unsigned start_offset,
136 unsigned end_offset,
137 Color underline_color,
138 bool thick,
139 Color background_color);
140 135
141 MarkerType GetType() const { return type_; } 136 MarkerType GetType() const { return type_; }
142 unsigned StartOffset() const { return start_offset_; } 137 unsigned StartOffset() const { return start_offset_; }
143 unsigned EndOffset() const { return end_offset_; } 138 unsigned EndOffset() const { return end_offset_; }
144 139
145 const String& Description() const; 140 const String& Description() const;
146 Color UnderlineColor() const;
147 bool Thick() const;
148 Color BackgroundColor() const;
149 DocumentMarkerDetails* Details() const; 141 DocumentMarkerDetails* Details() const;
150 142
151 void ClearDetails() { details_.Clear(); } 143 void ClearDetails() { details_.Clear(); }
152 144
153 struct MarkerOffsets { 145 struct MarkerOffsets {
154 unsigned start_offset; 146 unsigned start_offset;
155 unsigned end_offset; 147 unsigned end_offset;
156 }; 148 };
157 149
158 Optional<MarkerOffsets> ComputeOffsetsAfterShift(unsigned offset, 150 Optional<MarkerOffsets> ComputeOffsetsAfterShift(unsigned offset,
(...skipping 25 matching lines...) Expand all
184 inline DocumentMarkerDetails* DocumentMarker::Details() const { 176 inline DocumentMarkerDetails* DocumentMarker::Details() const {
185 return details_.Get(); 177 return details_.Get();
186 } 178 }
187 179
188 class DocumentMarkerDetails 180 class DocumentMarkerDetails
189 : public GarbageCollectedFinalized<DocumentMarkerDetails> { 181 : public GarbageCollectedFinalized<DocumentMarkerDetails> {
190 public: 182 public:
191 DocumentMarkerDetails() {} 183 DocumentMarkerDetails() {}
192 virtual ~DocumentMarkerDetails(); 184 virtual ~DocumentMarkerDetails();
193 virtual bool IsDescription() const { return false; } 185 virtual bool IsDescription() const { return false; }
194 virtual bool IsComposition() const { return false; }
195 186
196 DEFINE_INLINE_VIRTUAL_TRACE() {} 187 DEFINE_INLINE_VIRTUAL_TRACE() {}
197 }; 188 };
198 189
199 } // namespace blink 190 } // namespace blink
200 191
201 #endif // DocumentMarker_h 192 #endif // DocumentMarker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698