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

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

Issue 2217363002: Use relative bounding boxes throughout Chrome accessibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback from aboxhall Created 4 years, 4 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: content/browser/accessibility/browser_accessibility_android.cc
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
index c509b05feedf4293f6d77dde3541aa97ae8254d1..abe3a0164383e834b154b5fef928a17cb81e6355 100644
--- a/content/browser/accessibility/browser_accessibility_android.cc
+++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -972,18 +972,18 @@ bool BrowserAccessibilityAndroid::Scroll(int direction) const {
// If this is a web area inside of an iframe, try to use the bounds of
// the containing element.
BrowserAccessibility* parent = GetParent();
- while (parent && (parent->GetLocation().width() == 0 ||
- parent->GetLocation().height() == 0)) {
+ while (parent && (parent->GetPageBoundsRect().width() == 0 ||
+ parent->GetPageBoundsRect().height() == 0)) {
parent = parent->GetParent();
}
if (parent)
- bounds = parent->GetLocation();
+ bounds = parent->GetPageBoundsRect();
else
- bounds = GetLocation();
+ bounds = GetPageBoundsRect();
} else {
// Otherwise this is something like a scrollable div, just use the
// bounds of this object itself.
- bounds = GetLocation();
+ bounds = GetPageBoundsRect();
}
// Scroll by 80% of one page.
@@ -1249,7 +1249,7 @@ void BrowserAccessibilityAndroid::GetLineBoundaries(
CHECK_EQ(ui::AX_ROLE_INLINE_TEXT_BOX, child->GetRole());
// TODO(dmazzoni): replace this with a proper API to determine
// if two inline text boxes are on the same line. http://crbug.com/421771
- int y = child->GetLocation().y();
+ int y = child->GetPageBoundsRect().y();
if (i == 0) {
line_starts->push_back(offset);
} else if (y != last_y) {

Powered by Google App Engine
This is Rietveld 408576698