Flutter Engine
The Flutter Engine
ax_node_text_styles.cc
Go to the documentation of this file.
1// Copyright 2019 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
6
7constexpr int kUnsetValue = -1;
8
9namespace ui {
11 : background_color(kUnsetValue),
13 invalid_state(kUnsetValue),
14 overline_style(kUnsetValue),
15 strikethrough_style(kUnsetValue),
16 text_direction(kUnsetValue),
17 text_position(kUnsetValue),
18 text_style(kUnsetValue),
19 underline_style(kUnsetValue),
21 font_weight(kUnsetValue) {}
22
24 : background_color(other.background_color),
25 color(other.color),
26 invalid_state(other.invalid_state),
27 overline_style(other.overline_style),
28 strikethrough_style(other.strikethrough_style),
29 text_direction(other.text_direction),
30 text_position(other.text_position),
31 text_style(other.text_style),
32 underline_style(other.underline_style),
33 font_size(other.font_size),
34 font_weight(other.font_weight),
35 font_family(std::move(other.font_family)) {}
36
38 background_color = other.background_color;
39 color = other.color;
40 invalid_state = other.invalid_state;
41 overline_style = other.overline_style;
42 strikethrough_style = other.strikethrough_style;
43 text_direction = other.text_direction;
44 text_position = other.text_position;
45 text_style = other.text_style;
46 underline_style = other.underline_style;
47 font_size = other.font_size;
48 font_weight = other.font_weight;
49 font_family = other.font_family;
50
51 return *this;
52}
53
55 return (background_color == other.background_color && color == other.color &&
61 font_size == other.font_size && font_weight == other.font_weight &&
62 text_style == other.text_style &&
64 font_family == other.font_family);
65}
66
68 return !operator==(other);
69}
70
76 underline_style == kUnsetValue && font_family.length() == 0);
77}
78
79} // namespace ui
constexpr int kUnsetValue
DlColor color
SkScalar font_size
Definition: ref_ptr.h:256
AXNodeTextStyles & operator=(const AXNodeTextStyles &)=delete
bool operator!=(const AXNodeTextStyles &other) const
bool operator==(const AXNodeTextStyles &other) const