summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordmazzoni@google.com <dmazzoni@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-26 06:14:17 +0000
committerdmazzoni@google.com <dmazzoni@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-26 06:14:17 +0000
commitcb6ec5471fa7015852d1df5f03cb8b9a02d3fc2e (patch)
treed5ca82fbb7db754d98a08564ba4586260c2c6a87
parent68e874880e126b504ccebbc80ed10e77eedca49c (diff)
downloadchromium_src-cb6ec5471fa7015852d1df5f03cb8b9a02d3fc2e.zip
chromium_src-cb6ec5471fa7015852d1df5f03cb8b9a02d3fc2e.tar.gz
chromium_src-cb6ec5471fa7015852d1df5f03cb8b9a02d3fc2e.tar.bz2
Fix accessible bounding box when page is scrolled.
This patch is for merging; will add new test to prevent this from happening again in subsequent changelist. See this diff from the changelist that broke it to see the bug: https://chromiumcodereview.appspot.com/12084028/diff/12004/content/browser/accessibility/browser_accessibility.cc Originally the scrolling logic was applied to the main frame. Change 12084028 intended to have it affect all frames, but instead it affected all frames except the root frame (which has a distinct role in the accessibility tree). BUG=223756 TBR=dtseng Review URL: https://codereview.chromium.org/13007004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190563 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/accessibility/browser_accessibility.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
index 82bee25..2c4b078 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) &&