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

Unified Diff: ui/accessibility/ax_relative_bounds.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.h ('k') | ui/accessibility/ax_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_relative_bounds.cc
diff --git a/ui/accessibility/ax_relative_bounds.cc b/ui/accessibility/ax_relative_bounds.cc
index 322a0680fc3e3d64eca1c77725be61fdf56e508a..4984d261c19b67f9949032fc42c304d8118b0a2b 100644
--- a/ui/accessibility/ax_relative_bounds.cc
+++ b/ui/accessibility/ax_relative_bounds.cc
@@ -12,8 +12,7 @@ using base::IntToString;
namespace ui {
AXRelativeBounds::AXRelativeBounds()
- : offset_container_id(-1) {
-}
+ : offset_container_id(-1), is_fixed_positioned(false) {}
AXRelativeBounds::~AXRelativeBounds() {
}
@@ -23,6 +22,7 @@ AXRelativeBounds::AXRelativeBounds(const AXRelativeBounds& other) {
bounds = other.bounds;
if (other.transform)
transform.reset(new gfx::Transform(*other.transform));
+ is_fixed_positioned = other.is_fixed_positioned;
}
AXRelativeBounds& AXRelativeBounds::operator=(AXRelativeBounds other) {
@@ -30,6 +30,7 @@ AXRelativeBounds& AXRelativeBounds::operator=(AXRelativeBounds other) {
bounds = other.bounds;
if (other.transform)
transform.reset(new gfx::Transform(*other.transform));
+ is_fixed_positioned = other.is_fixed_positioned;
return *this;
}
@@ -38,6 +39,8 @@ bool AXRelativeBounds::operator==(const AXRelativeBounds& other) {
return false;
if (bounds != other.bounds)
return false;
+ if (is_fixed_positioned != other.is_fixed_positioned)
+ return false;
if (!transform && !other.transform)
return true;
if ((transform && !other.transform) || (!transform && other.transform))
@@ -63,6 +66,9 @@ std::string AXRelativeBounds::ToString() const {
if (transform && !transform->IsIdentity())
result += " transform=" + transform->ToString();
+ if (is_fixed_positioned)
+ result += " is_fixed_positioned";
+
return result;
}
« no previous file with comments | « ui/accessibility/ax_relative_bounds.h ('k') | ui/accessibility/ax_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698