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

Unified Diff: ui/accessibility/ax_node_data.cc

Issue 2217363002: Use relative bounding boxes throughout Chrome accessibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback from aboxhall Created 4 years, 4 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 0191bc661d65df8f49a07a1cce9b35d77665f8ad..0f04517978c944131f8cce87eaa8c12cb85f763c 100644
--- a/ui/accessibility/ax_node_data.cc
+++ b/ui/accessibility/ax_node_data.cc
@@ -60,7 +60,8 @@ typename std::vector<std::pair<FirstType, SecondType>>::const_iterator
AXNodeData::AXNodeData()
: id(-1),
role(AX_ROLE_UNKNOWN),
- state(0xFFFFFFFF) {
+ state(0xFFFFFFFF),
+ offset_container_id(-1) {
}
AXNodeData::~AXNodeData() {
@@ -78,6 +79,7 @@ AXNodeData::AXNodeData(const AXNodeData& other) {
html_attributes = other.html_attributes;
child_ids = other.child_ids;
location = other.location;
+ offset_container_id = other.offset_container_id;
if (other.transform)
transform.reset(new gfx::Transform(*other.transform));
}
@@ -94,8 +96,11 @@ AXNodeData& AXNodeData::operator=(AXNodeData other) {
html_attributes = other.html_attributes;
child_ids = other.child_ids;
location = other.location;
+ offset_container_id = other.offset_container_id;
if (other.transform)
transform.reset(new gfx::Transform(*other.transform));
+ else
+ transform.reset(nullptr);
return *this;
}
@@ -343,6 +348,9 @@ std::string AXNodeData::ToString() const {
IntToString(location.width()) + ", " +
IntToString(location.height()) + ")";
+ if (offset_container_id != -1)
+ result += " offset_container_id=" + IntToString(offset_container_id);
+
if (transform && !transform->IsIdentity())
result += " transform=" + transform->ToString();
« 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