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

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

Issue 2922233002: [ActiveSuggestionMarker #1] Introduce abstract StyleableMarker subclass of DocumentMarker (Closed)
Patch Set: Add test for IsStyleableMarker() 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "core/editing/markers/StyleableMarker.h"
6
7 namespace blink {
8
9 StyleableMarker::StyleableMarker(unsigned start_offset,
10 unsigned end_offset,
11 Color underline_color,
12 Thickness thickness,
13 Color background_color)
14 : DocumentMarker(start_offset, end_offset),
15 underline_color_(underline_color),
16 background_color_(background_color),
17 thickness_(thickness) {}
18
19 Color StyleableMarker::UnderlineColor() const {
20 return underline_color_;
21 }
22
23 bool StyleableMarker::IsThick() const {
24 return thickness_ == Thickness::kThick;
25 }
26
27 Color StyleableMarker::BackgroundColor() const {
28 return background_color_;
29 }
30
31 bool IsStyleableMarker(const DocumentMarker& marker) {
32 DocumentMarker::MarkerType type = marker.GetType();
33 return type == DocumentMarker::kComposition;
34 }
35
36 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/markers/StyleableMarker.h ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698