Chromium Code Reviews| Index: ui/accessibility/ax_node_data.cc |
| diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc |
| index 6c2be7658a8d211ad808969c23d4f650896af116..8e42031deac150d3bbc17f0009433d7760d6075b 100644 |
| --- a/ui/accessibility/ax_node_data.cc |
| +++ b/ui/accessibility/ax_node_data.cc |
| @@ -13,6 +13,7 @@ |
| #include "base/strings/string_util.h" |
| #include "base/strings/stringprintf.h" |
| #include "base/strings/utf_string_conversions.h" |
| +#include "ui/gfx/transform.h" |
| using base::DoubleToString; |
| using base::IntToString; |
| @@ -69,7 +70,6 @@ AXNodeData::AXNodeData(const AXNodeData& other) { |
| id = other.id; |
| role = other.role; |
| state = other.state; |
| - location = other.location; |
| string_attributes = other.string_attributes; |
| int_attributes = other.int_attributes; |
| float_attributes = other.float_attributes; |
| @@ -77,13 +77,15 @@ AXNodeData::AXNodeData(const AXNodeData& other) { |
| intlist_attributes = other.intlist_attributes; |
| html_attributes = other.html_attributes; |
| child_ids = other.child_ids; |
| + location = other.location; |
| + if (other.transform) |
| + transform.reset(new gfx::Transform(*other.transform)); |
| } |
| AXNodeData& AXNodeData::operator=(AXNodeData other) { |
| id = other.id; |
| role = other.role; |
| state = other.state; |
| - location = other.location; |
| string_attributes = other.string_attributes; |
| int_attributes = other.int_attributes; |
| float_attributes = other.float_attributes; |
| @@ -91,6 +93,9 @@ AXNodeData& AXNodeData::operator=(AXNodeData other) { |
| intlist_attributes = other.intlist_attributes; |
| html_attributes = other.html_attributes; |
| child_ids = other.child_ids; |
| + location = other.location; |
| + if (other.transform) |
| + transform.reset(new gfx::Transform(*other.transform)); |
| return *this; |
| } |
| @@ -338,6 +343,9 @@ std::string AXNodeData::ToString() const { |
| IntToString(location.width()) + ", " + |
| IntToString(location.height()) + ")"; |
| + if (transform.get() && !transform->IsIdentity()) |
|
dcheng
2016/03/23 05:26:00
Nit: no .get()
dmazzoni
2016/03/24 04:50:07
Done.
|
| + result += " transform=" + transform->ToString(); |
| + |
| for (size_t i = 0; i < int_attributes.size(); ++i) { |
| std::string value = IntToString(int_attributes[i].second); |
| switch (int_attributes[i].first) { |