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

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

Issue 2781613003: Added a class acting as a fake caret for accessibility. (Closed)
Patch Set: Created 3 years, 9 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_manager_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_manager_win.cc b/content/browser/accessibility/browser_accessibility_manager_win.cc
index 1b66a0a3c56ab6c2ed1fcc7e81b072c165f869e3..50208c428672aadf9ec252d98ec4ed612661b9f2 100644
--- a/content/browser/accessibility/browser_accessibility_manager_win.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_win.cc
@@ -204,8 +204,12 @@ BrowserAccessibilityEvent::Result
// on the HWND's accessibility object and pass it that same id, which
// we can use to retrieve the IAccessible for this node.
LONG child_id = -target->unique_id();
- ::NotifyWinEvent(win_event_type, hwnd, OBJID_CLIENT, child_id);
+ if (event_type == ui::AX_EVENT_DOCUMENT_SELECTION_CHANGED) {
+ // We also need to fire an older MSAA event used by some assistive software.
dougt 2017/03/28 15:23:44 This change seems unrelated to the fake caret. N
dmazzoni 2017/03/28 15:41:20 This is definitely related to the fake caret, sinc
+ ::NotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, hwnd, OBJID_CARET, child_id);
+ }
+ ::NotifyWinEvent(win_event_type, hwnd, OBJID_CLIENT, child_id);
return BrowserAccessibilityEvent::Sent;
}

Powered by Google App Engine
This is Rietveld 408576698