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 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_TEXT_PAINT_STYLE_H_ 6 #define THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_TEXT_PAINT_STYLE_H_ 7 8 #include "third_party/blink/public/mojom/frame/color_scheme.mojom-blink-forward.h" 9 #include "third_party/blink/renderer/core/core_export.h" 10 #include "third_party/blink/renderer/core/style/applied_text_decoration.h" 11 #include "third_party/blink/renderer/platform/graphics/color.h" 12 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" 13 14 namespace blink { 15 16 class ShadowList; 17 18 struct CORE_EXPORT TextPaintStyle { 19 STACK_ALLOCATED(); 20 21 public: 22 Color current_color; 23 Color fill_color; 24 Color stroke_color; 25 Color emphasis_mark_color; 26 float stroke_width; 27 mojom::blink::ColorScheme color_scheme; 28 const ShadowList* shadow; 29 base::Optional<AppliedTextDecoration> selection_text_decoration; 30 31 bool operator==(const TextPaintStyle& other) const { 32 return current_color == other.current_color && 33 fill_color == other.fill_color && 34 stroke_color == other.stroke_color && 35 emphasis_mark_color == other.emphasis_mark_color && 36 stroke_width == other.stroke_width && 37 color_scheme == other.color_scheme && shadow == other.shadow && 38 selection_text_decoration == other.selection_text_decoration; 39 } 40 bool operator!=(const TextPaintStyle& other) const { 41 return !(*this == other); 42 } 43 }; 44 45 } // namespace blink 46 47 #endif // THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_TEXT_PAINT_STYLE_H_ 48