Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: ui/accessibility/ax_node_data.cc

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/accessibility/ax_node_data.cc
diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc
index 35955d2dcef02b1d60424d38fd15b415ff251080..837ef2a37c0539f97652657f02fd2c77592dbc12 100644
--- a/ui/accessibility/ax_node_data.cc
+++ b/ui/accessibility/ax_node_data.cc
@@ -190,7 +190,8 @@ AXNodeData::AXNodeData()
role(AX_ROLE_UNKNOWN),
state(AX_STATE_NONE),
actions(AX_ACTION_NONE),
- offset_container_id(-1) {}
+ offset_container_id(-1),
+ is_fixed_positioned(false) {}
AXNodeData::~AXNodeData() {
}
@@ -211,6 +212,7 @@ AXNodeData::AXNodeData(const AXNodeData& other) {
offset_container_id = other.offset_container_id;
if (other.transform)
transform.reset(new gfx::Transform(*other.transform));
+ is_fixed_positioned = other.is_fixed_positioned;
}
AXNodeData& AXNodeData::operator=(AXNodeData other) {
@@ -231,6 +233,7 @@ AXNodeData& AXNodeData::operator=(AXNodeData other) {
transform.reset(new gfx::Transform(*other.transform));
else
transform.reset(nullptr);
+ is_fixed_positioned = other.is_fixed_positioned;
return *this;
}
@@ -514,6 +517,9 @@ std::string AXNodeData::ToString() const {
if (transform && !transform->IsIdentity())
result += " transform=" + transform->ToString();
+ if (is_fixed_positioned)
+ result += " is_fixed_positioned";
+
for (size_t i = 0; i < int_attributes.size(); ++i) {
std::string value = IntToString(int_attributes[i].second);
switch (int_attributes[i].first) {

Powered by Google App Engine
This is Rietveld 408576698