| Index: third_party/WebKit/Source/core/editing/markers/MarkerWithFormatting.h
|
| diff --git a/third_party/WebKit/Source/core/editing/markers/MarkerWithFormatting.h b/third_party/WebKit/Source/core/editing/markers/MarkerWithFormatting.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..74cdb094ec1e1e9d2ea749a20a896fed15ca22c8
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/markers/MarkerWithFormatting.h
|
| @@ -0,0 +1,37 @@
|
| +// 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.
|
| +
|
| +#ifndef MarkerWithFormatting_h
|
| +#define MarkerWithFormatting_h
|
| +
|
| +#include "core/editing/markers/DocumentMarker.h"
|
| +
|
| +namespace blink {
|
| +
|
| +// An abstract subclass of DocumentMarker to be subclassed by DocumentMarkers
|
| +// that should be renderable with customizable formatting.
|
| +class CORE_EXPORT MarkerWithFormatting : public DocumentMarker {
|
| + public:
|
| + enum class Thickness { kThin, kThick };
|
| +
|
| + MarkerWithFormatting(unsigned start_offset,
|
| + unsigned end_offset,
|
| + Color underline_color,
|
| + Thickness,
|
| + Color background_color);
|
| +
|
| + // MarkerWithFormatting-specific
|
| + Color UnderlineColor() const;
|
| + bool IsThick() const;
|
| + Color BackgroundColor() const;
|
| +
|
| + private:
|
| + const Color underline_color_;
|
| + const Color background_color_;
|
| + const Thickness thickness_;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif
|
|
|