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

Unified Diff: ui/accessibility/ax_tree.cc

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: GetSimpleRelativeBounds, add failing test for fixed with transform Created 3 years, 5 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_relative_bounds.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_tree.cc
diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc
index d2c7f0d524f52caeda6727e7239e37aabdcd68a5..3e5cf6524d9c83de7d951640372fdfa021d1a1c8 100644
--- a/ui/accessibility/ax_tree.cc
+++ b/ui/accessibility/ax_tree.cc
@@ -199,14 +199,17 @@ gfx::RectF AXTree::RelativeToTreeBounds(const AXNode* node,
if (!container || container == node)
break;
- gfx::RectF container_bounds = container->data().location;
+ const ui::AXNodeData& container_data = container->data();
+ gfx::RectF container_bounds = container_data.location;
bounds.Offset(container_bounds.x(), container_bounds.y());
- int scroll_x = 0;
- int scroll_y = 0;
- if (container->data().GetIntAttribute(ui::AX_ATTR_SCROLL_X, &scroll_x) &&
- container->data().GetIntAttribute(ui::AX_ATTR_SCROLL_Y, &scroll_y)) {
- bounds.Offset(-scroll_x, -scroll_y);
+ if (!node->data().is_fixed_positioned) {
+ int scroll_x = 0;
+ int scroll_y = 0;
+ if (container_data.GetIntAttribute(ui::AX_ATTR_SCROLL_X, &scroll_x) &&
+ container_data.GetIntAttribute(ui::AX_ATTR_SCROLL_Y, &scroll_y)) {
+ bounds.Offset(-scroll_x, -scroll_y);
+ }
}
node = container;
« no previous file with comments | « ui/accessibility/ax_relative_bounds.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698