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 1713723002: Implement accessibility support for CSS-transformed iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return gfx::Rect from AccessibilityTransformToRootCoordSpace, get rid of ifdefed-out code accidenta… Created 4 years, 9 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 be59c7176106c8360380c557f5bcba00ee1862bf..96f8f4aeea2701f0b20ea61981d16607e2e7175c 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.get())
+ transform.reset(new gfx::Transform(*other.transform.get()));
dcheng 2016/03/17 19:53:18 Nit: *other.transform should be sufficient
dmazzoni 2016/03/18 17:10:59 Done.
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) {

Powered by Google App Engine
This is Rietveld 408576698