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

Unified Diff: ui/accessibility/ax_node_data.cc

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: GetSimpleRelativeBounds, add failing test for fixed with transform Created 3 years, 5 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
« no previous file with comments | « ui/accessibility/ax_node_data.h ('k') | ui/accessibility/ax_relative_bounds.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_node_data.cc
diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc
index eedfdd982913d7158f5738022b0b44f64aad3118..40b7bf421975fb7c1d7f87c71dd3786affe5f458 100644
--- a/ui/accessibility/ax_node_data.cc
+++ b/ui/accessibility/ax_node_data.cc
@@ -201,7 +201,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() {
}
@@ -223,6 +224,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) {
@@ -244,6 +246,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;
}
@@ -558,6 +561,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) {
« no previous file with comments | « ui/accessibility/ax_node_data.h ('k') | ui/accessibility/ax_relative_bounds.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698