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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/CompositionMarker.cpp

Issue 2911733002: [DMC #25] Make DocumentMarker::GetType() virtual (Closed)
Patch Set: Rebase 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 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/editing/markers/CompositionMarker.h" 5 #include "core/editing/markers/CompositionMarker.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 CompositionMarker::CompositionMarker(unsigned start_offset, 9 CompositionMarker::CompositionMarker(unsigned start_offset,
10 unsigned end_offset, 10 unsigned end_offset,
11 Color underline_color, 11 Color underline_color,
12 bool thick, 12 bool thick,
13 Color background_color) 13 Color background_color)
14 : DocumentMarker(DocumentMarker::kComposition, start_offset, end_offset), 14 : DocumentMarker(start_offset, end_offset),
15 underline_color_(underline_color), 15 underline_color_(underline_color),
16 background_color_(background_color), 16 background_color_(background_color),
17 thick_(thick) {} 17 thick_(thick) {}
18 18
19 DocumentMarker::MarkerType CompositionMarker::GetType() const {
20 return DocumentMarker::kComposition;
21 }
22
19 Color CompositionMarker::UnderlineColor() const { 23 Color CompositionMarker::UnderlineColor() const {
20 return underline_color_; 24 return underline_color_;
21 } 25 }
22 26
23 bool CompositionMarker::Thick() const { 27 bool CompositionMarker::Thick() const {
24 return thick_; 28 return thick_;
25 } 29 }
26 30
27 Color CompositionMarker::BackgroundColor() const { 31 Color CompositionMarker::BackgroundColor() const {
28 return background_color_; 32 return background_color_;
29 } 33 }
30 34
31 } // namespace blink 35 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698