OLD | NEW |
(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 |
OLD | NEW |