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

Unified Diff: content/browser/accessibility/browser_accessibility_manager.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_manager.cc
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc
index 7cef0bb5202d0d54f92c43867dc97c4c733c2d55..3564fe2f8ffc01893ae49dad5233d179009d97d4 100644
--- a/content/browser/accessibility/browser_accessibility_manager.cc
+++ b/content/browser/accessibility/browser_accessibility_manager.cc
@@ -413,7 +413,9 @@ void BrowserAccessibilityManager::OnLocationChanges(
if (!obj)
continue;
ui::AXNode* node = obj->node();
- node->SetLocation(params[i].new_location);
+ node->SetLocation(params[i].new_location.offset_container_id,
+ params[i].new_location.bounds,
+ params[i].new_location.transform.get());
}
SendLocationChangeEvents(params);
}
@@ -887,7 +889,7 @@ base::string16 BrowserAccessibilityManager::GetTextForRange(
}
// static
-gfx::Rect BrowserAccessibilityManager::GetLocalBoundsForRange(
+gfx::Rect BrowserAccessibilityManager::GetPageBoundsForRange(
const BrowserAccessibility& start_object,
int start_offset,
const BrowserAccessibility& end_object,
@@ -904,7 +906,7 @@ gfx::Rect BrowserAccessibilityManager::GetLocalBoundsForRange(
return gfx::Rect();
}
- return start_object.GetLocalBoundsForRange(
+ return start_object.GetPageBoundsForRange(
start_offset, end_offset - start_offset);
}
@@ -934,10 +936,10 @@ gfx::Rect BrowserAccessibilityManager::GetLocalBoundsForRange(
start_char_index = start_offset;
if (current == last)
end_char_index = end_offset;
- result.Union(current->GetLocalBoundsForRange(
+ result.Union(current->GetPageBoundsForRange(
start_char_index, end_char_index - start_char_index));
} else {
- result.Union(current->GetLocalBoundsRect());
+ result.Union(current->GetPageBoundsRect());
}
if (current == last)

Powered by Google App Engine
This is Rietveld 408576698