Chromium Code Reviews| Index: content/browser/accessibility/browser_accessibility_win.cc |
| diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc |
| index 22410f8cb62a26edaf79b3c1d170d80200b50aa8..1f5005016ff761c81322343b33372e23729572d1 100644 |
| --- a/content/browser/accessibility/browser_accessibility_win.cc |
| +++ b/content/browser/accessibility/browser_accessibility_win.cc |
| @@ -438,7 +438,7 @@ HRESULT BrowserAccessibilityWin::accDoDefaultAction(VARIANT var_id) { |
| return E_INVALIDARG; |
| // Return an error if it's not clickable. |
| - if (!target->HasIntAttribute(ui::AX_ATTR_ACTION)) |
| + if (!target->HasIntAttribute(ui::AX_ATTR_DEFAULT_ACTION_VERB)) |
| return DISP_E_MEMBERNOTFOUND; |
| manager_->DoDefaultAction(*target); |
| @@ -2712,7 +2712,7 @@ STDMETHODIMP BrowserAccessibilityWin::nActions(long* n_actions) { |
| // |IsHyperlink| is required for |IAccessibleHyperlink::anchor/anchorTarget| |
| // to work properly because the |IAccessibleHyperlink| interface inherits from |
| // |IAccessibleAction|. |
| - if (IsHyperlink() || HasIntAttribute(ui::AX_ATTR_ACTION)) { |
| + if (IsHyperlink() || HasIntAttribute(ui::AX_ATTR_DEFAULT_ACTION_VERB)) { |
| *n_actions = 1; |
| } else { |
| *n_actions = 0; |
| @@ -2727,7 +2727,7 @@ STDMETHODIMP BrowserAccessibilityWin::doAction(long action_index) { |
| if (!instance_active()) |
| return E_FAIL; |
| - if (!HasIntAttribute(ui::AX_ATTR_ACTION) || action_index != 0) |
| + if (!HasIntAttribute(ui::AX_ATTR_DEFAULT_ACTION_VERB) || action_index != 0) |
| return E_INVALIDARG; |
| manager_->DoDefaultAction(*this); |
| @@ -2760,13 +2760,14 @@ STDMETHODIMP BrowserAccessibilityWin::get_name(long action_index, BSTR* name) { |
| return E_INVALIDARG; |
| int action; |
| - if (!GetIntAttribute(ui::AX_ATTR_ACTION, &action) || action_index != 0) { |
| + if (!GetIntAttribute(ui::AX_ATTR_DEFAULT_ACTION_VERB, &action) || |
| + action_index != 0) { |
| *name = nullptr; |
| return E_INVALIDARG; |
| } |
| - base::string16 action_verb = |
| - ui::ActionToUnlocalizedString(static_cast<ui::AXSupportedAction>(action)); |
| + base::string16 action_verb = ui::ActionToUnlocalizedString( |
| + static_cast<ui::AXDefaultActionVerb>(action)); |
| if (action_verb.empty() || action_verb == L"none") { |
| *name = nullptr; |
| return S_FALSE; |
| @@ -2789,13 +2790,14 @@ BrowserAccessibilityWin::get_localizedName(long action_index, |
| return E_INVALIDARG; |
| int action; |
| - if (!GetIntAttribute(ui::AX_ATTR_ACTION, &action) || action_index != 0) { |
| + if (!GetIntAttribute(ui::AX_ATTR_DEFAULT_ACTION_VERB, &action) || |
| + action_index != 0) { |
| *localized_name = nullptr; |
| return E_INVALIDARG; |
| } |
| base::string16 action_verb = |
| - ui::ActionToString(static_cast<ui::AXSupportedAction>(action)); |
| + ui::ActionToString(static_cast<ui::AXDefaultActionVerb>(action)); |
|
dmazzoni
2017/05/12 03:08:58
And this one should be ActionVerbToLocalizedString
Patti Lor
2017/05/15 06:03:42
Done.
|
| if (action_verb.empty()) { |
| *localized_name = nullptr; |
| return S_FALSE; |