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

Unified Diff: content/browser/accessibility/accessibility_tree_formatter_blink.cc

Issue 1713723002: Implement accessibility support for CSS-transformed iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed another skia dependency Created 4 years, 10 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: 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..777e1ce28d6ba524a9270bb1eded15cb827cc683 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_blink.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_blink.cc
@@ -41,10 +41,20 @@ 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.IsIdentity());
for (int state_index = ui::AX_STATE_NONE;
state_index <= ui::AX_STATE_LAST;
@@ -133,6 +143,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) {

Powered by Google App Engine
This is Rietveld 408576698