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

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

Issue 2937083002: Revert of Forward BrowserAccessibility get_accState to AXPlatformNode. (Closed)
Patch Set: Created 3 years, 6 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
Index: content/browser/accessibility/browser_accessibility_com_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_com_win.cc b/content/browser/accessibility/browser_accessibility_com_win.cc
index c20cff89abbc1eafc6f79e2c4764f8b55c94233c..46b1cd18e11c6e63edf5a0ca1b6b379633b6edb0 100644
--- a/content/browser/accessibility/browser_accessibility_com_win.cc
+++ b/content/browser/accessibility/browser_accessibility_com_win.cc
@@ -642,7 +642,23 @@
if (!owner())
return E_FAIL;
- return AXPlatformNodeWin::get_accState(var_id, state);
+ auto* manager = Manager();
+ if (!manager)
+ return E_FAIL;
+
+ if (!state)
+ return E_INVALIDARG;
+
+ BrowserAccessibilityComWin* target = GetTargetFromChildID(var_id);
+ if (!target)
+ return E_INVALIDARG;
+
+ state->vt = VT_I4;
+ state->lVal = target->ia_state();
+ if (manager->GetFocus() == owner())
+ state->lVal |= STATE_SYSTEM_FOCUSED;
+
+ return S_OK;
}
bool BrowserAccessibilityComWin::IsRangeValueSupported() {
« no previous file with comments | « content/browser/accessibility/browser_accessibility.cc ('k') | ui/accessibility/platform/ax_fake_caret_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698