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

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

Issue 2372823002: Fix a case where the accessible bounding box of an inline text box was wrong. (Closed)
Patch Set: Fix bug in bounds calc uncovered by windows test Created 4 years, 3 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 | « no previous file | third_party/WebKit/LayoutTests/accessibility/bounds-calc.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility.cc
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
index 0797a36a0fc0c8af0e8faa15f4e5189615321aa3..e83f4684a4fb915a7b307978b3d9a5ecd43239cc 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -414,7 +414,7 @@ gfx::Rect BrowserAccessibility::GetPageBoundsForRange(int start, int len)
else
start = 0;
}
- return RelativeToAbsoluteBounds(gfx::RectF(bounds), false);
+ return bounds;
}
int end = start + len;
@@ -457,7 +457,7 @@ gfx::Rect BrowserAccessibility::GetPageBoundsForRange(int start, int len)
int end_pixel_offset =
local_end > 0 ? character_offsets[local_end - 1] : 0;
- gfx::Rect child_rect = gfx::ToEnclosingRect(child->GetLocation());
+ gfx::Rect child_rect = child->GetPageBoundsRect();
auto text_direction = static_cast<ui::AXTextDirection>(
child->GetIntAttribute(ui::AX_ATTR_TEXT_DIRECTION));
gfx::Rect child_overlap_rect;
@@ -501,7 +501,7 @@ gfx::Rect BrowserAccessibility::GetPageBoundsForRange(int start, int len)
bounds.Union(child_overlap_rect);
}
- return RelativeToAbsoluteBounds(gfx::RectF(bounds), false);
+ return bounds;
}
gfx::Rect BrowserAccessibility::GetScreenBoundsForRange(int start, int len)
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/accessibility/bounds-calc.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698