Chromium Code Reviews| Index: content/browser/accessibility/browser_accessibility.cc |
| diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc |
| index a700e9a9fd30538f4703fdf92d837a50058eb2c0..423941ce0c53aac71cc5c908b237b9537fe400e6 100644 |
| --- a/content/browser/accessibility/browser_accessibility.cc |
| +++ b/content/browser/accessibility/browser_accessibility.cc |
| @@ -679,6 +679,23 @@ bool BrowserAccessibility::IsEditableText() const { |
| GetRole() == ui::AX_ROLE_TEXT_AREA); |
| } |
| +bool BrowserAccessibility::IsWebAreaForPresentationalIframe() const { |
| + if (GetRole() != ui::AX_ROLE_WEB_AREA && |
| + GetRole() != ui::AX_ROLE_ROOT_WEB_AREA) { |
| + return false; |
| + } |
| + |
| + BrowserAccessibility* parent = GetParent(); |
|
aboxhall
2014/12/03 23:46:17
What is the parent going to be, out of curiosity?
dmazzoni
2014/12/17 18:30:27
Currently the parent is a scrollpane and the grand
|
| + if (!parent) |
| + return false; |
| + |
| + BrowserAccessibility* grandparent = parent->GetParent(); |
| + if (!grandparent) |
| + return false; |
| + |
| + return grandparent->GetRole() == ui::AX_ROLE_IFRAME_PRESENTATIONAL; |
| +} |
| + |
| std::string BrowserAccessibility::GetTextRecursive() const { |
| if (!name_.empty()) { |
| return name_; |