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

Unified Diff: ui/accessibility/ax_relative_bounds.h

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_node_data.cc ('k') | ui/accessibility/ax_relative_bounds.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_relative_bounds.h
diff --git a/ui/accessibility/ax_relative_bounds.h b/ui/accessibility/ax_relative_bounds.h
index 478275a9ebbca114d515c53b134d2f83293409a4..88f873f016d46bec7284ec7982cd29c24c0b8631 100644
--- a/ui/accessibility/ax_relative_bounds.h
+++ b/ui/accessibility/ax_relative_bounds.h
@@ -21,8 +21,8 @@ namespace ui {
// This is an efficient, compact, serializable representation of a node's
// bounding box that requires minimal changes to the tree when layers are
// moved or scrolled. Computing the absolute bounding box of a node requires
-// walking up the tree and applying node offsets and transforms until reaching
-// the top.
+// walking up the tree and applying node offsets, scroll positions, and
+// transforms until reaching the top.
//
// If the offset container id is valid, the bounds are relative
// to the node with that offset container id.
@@ -30,6 +30,13 @@ namespace ui {
// Otherwise, for a node other than the root, the bounds are relative to
// the root of the tree, and for the root of a tree, the bounds are relative
// to its immediate containing node.
+//
+// If |is_fixed_positioned| is true, the scroll offsets of the container
+// node should be ignored.
+//
+// The canonical implementation of converting a node's bounding box
+// from local coordinates to tree coordinates is AXTree::GetTreeBounds().
+// Always try to use that rather than reimplementing it.
struct AX_EXPORT AXRelativeBounds {
AXRelativeBounds();
virtual ~AXRelativeBounds();
@@ -54,6 +61,9 @@ struct AX_EXPORT AXRelativeBounds {
// constructor both make a duplicate of the owned pointer, so it acts more
// like a member than a pointer.
std::unique_ptr<gfx::Transform> transform;
+
+ // If true, the container's scroll position should be ignored.
+ bool is_fixed_positioned;
};
} // namespace ui
« no previous file with comments | « ui/accessibility/ax_node_data.cc ('k') | ui/accessibility/ax_relative_bounds.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698