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

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

Issue 13007004: Fix accessible bounding box when page is scrolled. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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 | no next file » | 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 82bee25b46854c275ebea3fcbea9ab23ab497db6..2c4b0785cc28c5741ad15d77753e901fb541d501 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -141,7 +141,8 @@ gfx::Rect BrowserAccessibility::GetLocalBoundsRect() {
// nested web area.
BrowserAccessibility* parent = parent_;
bool need_to_offset_web_area =
- (role_ == AccessibilityNodeData::ROLE_WEB_AREA);
+ (role_ == AccessibilityNodeData::ROLE_WEB_AREA ||
+ role_ == AccessibilityNodeData::ROLE_ROOT_WEB_AREA);
while (parent) {
if (need_to_offset_web_area &&
parent->location().width() > 0 &&
@@ -149,7 +150,8 @@ gfx::Rect BrowserAccessibility::GetLocalBoundsRect() {
bounds.Offset(parent->location().x(), parent->location().y());
need_to_offset_web_area = false;
}
- if (parent->role() == AccessibilityNodeData::ROLE_WEB_AREA) {
+ if (parent->role() == AccessibilityNodeData::ROLE_WEB_AREA ||
+ parent->role() == AccessibilityNodeData::ROLE_ROOT_WEB_AREA) {
int sx = 0;
int sy = 0;
if (parent->GetIntAttribute(AccessibilityNodeData::ATTR_SCROLL_X, &sx) &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698