Chromium Code Reviews| 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 3cc4c5ec28f788e80dab529c74837def527eeada..71d4d401e88eeb078898568ee898aca138754d0d 100644 |
| --- a/content/browser/accessibility/browser_accessibility_android.cc |
| +++ b/content/browser/accessibility/browser_accessibility_android.cc |
| @@ -303,7 +303,10 @@ const char* BrowserAccessibilityAndroid::GetClassName() const { |
| class_name = "android.app.Dialog"; |
| break; |
| case ui::AX_ROLE_ROOT_WEB_AREA: |
|
David Tseng
2016/03/04 16:50:20
So, AX_ROLE_WEB_AREA is no longer used?
dmazzoni
2016/03/07 21:35:32
Yes. I was planning to delete it in a follow-up ch
|
| - class_name = "android.webkit.WebView"; |
| + if (GetParent() == nullptr) |
| + class_name = "android.webkit.WebView"; |
| + else |
| + class_name = "android.view.View"; |
| break; |
| case ui::AX_ROLE_MENU_ITEM: |
| case ui::AX_ROLE_MENU_ITEM_CHECK_BOX: |
| @@ -935,13 +938,13 @@ bool BrowserAccessibilityAndroid::Scroll(int direction) const { |
| // Figure out the bounding box of the visible portion of this scrollable |
| // view so we know how much to scroll by. |
| gfx::Rect bounds; |
| - if (GetRole() == ui::AX_ROLE_ROOT_WEB_AREA) { |
| + if (GetRole() == ui::AX_ROLE_ROOT_WEB_AREA && !GetParent()) { |
| // If this is the root web area, use the bounds of the view to determine |
| // how big one page is. |
| if (!manager()->delegate()) |
| return false; |
| bounds = manager()->delegate()->AccessibilityGetViewBounds(); |
| - } else if (GetRole() == ui::AX_ROLE_WEB_AREA) { |
| + } else if (GetRole() == ui::AX_ROLE_ROOT_WEB_AREA) { |
|
David Tseng
2016/03/04 16:50:20
&& GetParent()
dmazzoni
2016/03/07 21:35:32
Done.
|
| // If this is a web area inside of an iframe, try to use the bounds of |
| // the containing element. |
| BrowserAccessibility* parent = GetParent(); |