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

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

Issue 2855463003: Forward BrowserAccessibilityWin::get_accName to platform node. (Closed)
Patch Set: Created 3 years, 8 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 | ui/accessibility/platform/ax_platform_node_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 162f191772fc133384ef8cfaf581aaa7d4b27aa1..5eeb44f59e3b077d60d6286a84198c9a7e87096b 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -661,29 +661,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_accName(VARIANT var_id, BSTR* name) {
if (!instance_active())
return E_FAIL;
- if (!name)
- return E_INVALIDARG;
-
- BrowserAccessibilityWin* target = GetTargetFromChildID(var_id);
- if (!target)
- return E_INVALIDARG;
-
- base::string16 name_str = target->name();
- if (name_str.empty()) {
- if (target->ia2_role() == ROLE_SYSTEM_DOCUMENT && PlatformGetParent()) {
- // Hack: Some versions of JAWS crash if they get an empty name on
- // a document that's the child of an iframe, so always return a
- // nonempty string for this role. https://crbug.com/583057
- name_str = L" ";
- } else {
- return S_FALSE;
- }
- }
-
- *name = SysAllocString(name_str.c_str());
-
- DCHECK(*name);
- return S_OK;
+ return GetPlatformNodeWin()->get_accName(var_id, name);
}
STDMETHODIMP BrowserAccessibilityWin::get_accParent(IDispatch** disp_parent) {
« no previous file with comments | « no previous file | ui/accessibility/platform/ax_platform_node_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698