Index: content/browser/accessibility/accessibility_tree_formatter_blink.cc |
diff --git a/content/browser/accessibility/accessibility_tree_formatter_blink.cc b/content/browser/accessibility/accessibility_tree_formatter_blink.cc |
index 200c3375f45d6f7cf07d273543d3e1629106d329..08ce9bd1ca0793f74d4525d2d40fcba7998ae8d5 100644 |
--- a/content/browser/accessibility/accessibility_tree_formatter_blink.cc |
+++ b/content/browser/accessibility/accessibility_tree_formatter_blink.cc |
@@ -7,6 +7,7 @@ |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/stringprintf.h" |
#include "content/browser/accessibility/accessibility_tree_formatter_blink.h" |
+#include "ui/gfx/transform.h" |
namespace content { |
@@ -41,10 +42,21 @@ void AccessibilityTreeFormatterBlink::AddProperties( |
dict->SetString("role", ui::ToString(node.GetData().role)); |
- dict->SetInteger("boundsX", node.GetData().location.x()); |
- dict->SetInteger("boundsY", node.GetData().location.y()); |
- dict->SetInteger("boundsWidth", node.GetData().location.width()); |
- dict->SetInteger("boundsHeight", node.GetData().location.height()); |
+ gfx::Rect bounds = node.GetData().location; |
+ dict->SetInteger("boundsX", bounds.x()); |
+ dict->SetInteger("boundsY", bounds.y()); |
+ dict->SetInteger("boundsWidth", bounds.width()); |
+ dict->SetInteger("boundsHeight", bounds.height()); |
+ |
+ gfx::Rect page_bounds = node.GetLocalBoundsRect(); |
+ dict->SetInteger("pageBoundsX", page_bounds.x()); |
+ dict->SetInteger("pageBoundsY", page_bounds.y()); |
+ dict->SetInteger("pageBoundsWidth", page_bounds.width()); |
+ dict->SetInteger("pageBoundsHeight", page_bounds.height()); |
+ |
+ dict->SetBoolean("transform", |
+ node.GetData().transform.get() && |
+ !node.GetData().transform->IsIdentity()); |
for (int state_index = ui::AX_STATE_NONE; |
state_index <= ui::AX_STATE_LAST; |
@@ -133,6 +145,19 @@ base::string16 AccessibilityTreeFormatterBlink::ToString( |
FormatCoordinates("size", "boundsWidth", "boundsHeight", dict), |
&line); |
+ WriteAttribute(false, |
+ FormatCoordinates("pageLocation", |
+ "pageBoundsX", "pageBoundsY", dict), |
+ &line); |
+ WriteAttribute(false, |
+ FormatCoordinates("pageSize", |
+ "pageBoundsWidth", "pageBoundsHeight", dict), |
+ &line); |
+ |
+ bool transform; |
+ if (dict.GetBoolean("transform", &transform) && transform) |
+ WriteAttribute(false, "transform", &line); |
+ |
for (int attr_index = ui::AX_STRING_ATTRIBUTE_NONE; |
attr_index <= ui::AX_STRING_ATTRIBUTE_LAST; |
++attr_index) { |