| Index: third_party/WebKit/Source/core/editing/markers/StyleableMarker.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/StyleableMarker.cpp b/third_party/WebKit/Source/core/editing/markers/StyleableMarker.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3ed789a82a392b8d7558c9536873ce10fac2ddb1
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/StyleableMarker.cpp
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "core/editing/markers/StyleableMarker.h"
|
| +
|
| +namespace blink {
|
| +
|
| +StyleableMarker::StyleableMarker(unsigned start_offset,
|
| + unsigned end_offset,
|
| + Color underline_color,
|
| + Thickness thickness,
|
| + Color background_color)
|
| + : DocumentMarker(start_offset, end_offset),
|
| + underline_color_(underline_color),
|
| + background_color_(background_color),
|
| + thickness_(thickness) {}
|
| +
|
| +Color StyleableMarker::UnderlineColor() const {
|
| + return underline_color_;
|
| +}
|
| +
|
| +bool StyleableMarker::IsThick() const {
|
| + return thickness_ == Thickness::kThick;
|
| +}
|
| +
|
| +Color StyleableMarker::BackgroundColor() const {
|
| + return background_color_;
|
| +}
|
| +
|
| +bool IsStyleableMarker(const DocumentMarker& marker) {
|
| + DocumentMarker::MarkerType type = marker.GetType();
|
| + return type == DocumentMarker::kComposition;
|
| +}
|
| +
|
| +} // namespace blink
|
|
|