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

Unified Diff: ui/accessibility/ax_tree.cc

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: Created 3 years, 6 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_tree.cc
diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc
index 43e635af1a207bede9fe8d71f0e0ef1e3e5da326..f58bbf77d4d28adcac8cdb303e583ba624fd99cd 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;

Powered by Google App Engine
This is Rietveld 408576698