Flutter Engine
The Flutter Engine
third_party
accessibility
ax
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
5
#include "
ax_node_text_styles.h
"
6
7
constexpr
int
kUnsetValue
= -1;
8
9
namespace
ui
{
10
AXNodeTextStyles::AXNodeTextStyles
()
11
: background_color(
kUnsetValue
),
12
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
),
20
font_size
(
kUnsetValue
),
21
font_weight(
kUnsetValue
) {}
22
23
AXNodeTextStyles::AXNodeTextStyles
(
AXNodeTextStyles
&& other)
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
37
AXNodeTextStyles
&
AXNodeTextStyles::operator=
(
AXNodeTextStyles
&& other) {
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
54
bool
AXNodeTextStyles::operator==
(
const
AXNodeTextStyles
& other)
const
{
55
return
(
background_color
== other.
background_color
&&
color
== other.
color
&&
56
invalid_state
== other.
invalid_state
&&
57
overline_style
== other.
overline_style
&&
58
strikethrough_style
== other.
strikethrough_style
&&
59
text_direction
== other.
text_direction
&&
60
text_position
== other.
text_position
&&
61
font_size
== other.
font_size
&&
font_weight
== other.
font_weight
&&
62
text_style
== other.
text_style
&&
63
underline_style
== other.
underline_style
&&
64
font_family
== other.
font_family
);
65
}
66
67
bool
AXNodeTextStyles::operator!=
(
const
AXNodeTextStyles
& other)
const
{
68
return
!
operator==
(other);
69
}
70
71
bool
AXNodeTextStyles::IsUnset
()
const
{
72
return
(
background_color
==
kUnsetValue
&&
invalid_state
==
kUnsetValue
&&
73
overline_style
==
kUnsetValue
&&
strikethrough_style
==
kUnsetValue
&&
74
text_position
==
kUnsetValue
&&
font_size
==
kUnsetValue
&&
75
font_weight
==
kUnsetValue
&&
text_style
==
kUnsetValue
&&
76
underline_style
==
kUnsetValue
&&
font_family
.length() == 0);
77
}
78
79
}
// namespace ui
kUnsetValue
constexpr int kUnsetValue
Definition:
ax_node_text_styles.cc:7
ax_node_text_styles.h
color
DlColor color
Definition:
dl_golden_blur_unittests.cc:23
font_size
SkScalar font_size
Definition:
dl_golden_blur_unittests.cc:22
std
Definition:
ref_ptr.h:256
ui
Definition:
window_binding_handler.h:18
ui::AXNodeTextStyles
Definition:
ax_node_text_styles.h:18
ui::AXNodeTextStyles::overline_style
int32_t overline_style
Definition:
ax_node_text_styles.h:38
ui::AXNodeTextStyles::AXNodeTextStyles
AXNodeTextStyles()
Definition:
ax_node_text_styles.cc:10
ui::AXNodeTextStyles::color
int32_t color
Definition:
ax_node_text_styles.h:36
ui::AXNodeTextStyles::operator=
AXNodeTextStyles & operator=(const AXNodeTextStyles &)=delete
ui::AXNodeTextStyles::IsUnset
bool IsUnset() const
Definition:
ax_node_text_styles.cc:71
ui::AXNodeTextStyles::text_style
int32_t text_style
Definition:
ax_node_text_styles.h:42
ui::AXNodeTextStyles::strikethrough_style
int32_t strikethrough_style
Definition:
ax_node_text_styles.h:39
ui::AXNodeTextStyles::background_color
int32_t background_color
Definition:
ax_node_text_styles.h:35
ui::AXNodeTextStyles::text_position
int32_t text_position
Definition:
ax_node_text_styles.h:41
ui::AXNodeTextStyles::operator!=
bool operator!=(const AXNodeTextStyles &other) const
Definition:
ax_node_text_styles.cc:67
ui::AXNodeTextStyles::font_size
float font_size
Definition:
ax_node_text_styles.h:44
ui::AXNodeTextStyles::operator==
bool operator==(const AXNodeTextStyles &other) const
Definition:
ax_node_text_styles.cc:54
ui::AXNodeTextStyles::font_weight
float font_weight
Definition:
ax_node_text_styles.h:45
ui::AXNodeTextStyles::underline_style
int32_t underline_style
Definition:
ax_node_text_styles.h:43
ui::AXNodeTextStyles::text_direction
int32_t text_direction
Definition:
ax_node_text_styles.h:40
ui::AXNodeTextStyles::invalid_state
int32_t invalid_state
Definition:
ax_node_text_styles.h:37
ui::AXNodeTextStyles::font_family
std::string font_family
Definition:
ax_node_text_styles.h:46
Generated on Sun Jun 23 2024 21:55:19 for Flutter Engine by
1.9.4