Index: ui/accessibility/ax_node_data.cc |
diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc |
index be59c7176106c8360380c557f5bcba00ee1862bf..e2d198648e8e32da07a975a43b4c1c608e45cd38 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.get()) |
dcheng
2016/03/08 00:39:42
No .get() when boolean testing scoped_ptr's (here
dmazzoni
2016/03/16 21:38:14
Done.
|
+ transform.reset(new gfx::Transform(*other.transform.get())); |
dcheng
2016/03/08 00:39:42
Similarly just use *other.transform.
dmazzoni
2016/03/16 21:38:13
Done.
|
} |
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.get()) |
+ transform.reset(new gfx::Transform(*other.transform.get())); |
return *this; |
} |
@@ -338,6 +343,9 @@ std::string AXNodeData::ToString() const { |
IntToString(location.width()) + ", " + |
IntToString(location.height()) + ")"; |
+ if (transform.get() && !transform->IsIdentity()) |
+ 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) { |