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

Unified Diff: ui/accessibility/platform/ax_platform_node_win.cc

Issue 2781613003: Added a class acting as a fake caret for accessibility. (Closed)
Patch Set: Activate the fake caret only when Windows is focused. 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
Index: ui/accessibility/platform/ax_platform_node_win.cc
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
index 9a3619ed7ff31aaba10d3a29579dffd7efb776fc..9bf514408b16a5cf00678a302f8193ba52dbd282 100644
--- a/ui/accessibility/platform/ax_platform_node_win.cc
+++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -181,6 +181,12 @@ void AXPlatformNodeWin::NotifyAccessibilityEvent(ui::AXEvent event_type) {
::NotifyWinEvent(native_event, hwnd, OBJID_CLIENT, -unique_id_);
+ if (event_type == ui::AX_EVENT_TEXT_SELECTION_CHANGED) {
+ // We also need to fire an older MSAA event used by some assistive software.
+ ::NotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, hwnd, OBJID_CARET,
+ -unique_id_);
+ }
+
// Keep track of objects that are a target of an alert event.
if (event_type == ui::AX_EVENT_ALERT)
AddAlertTarget();

Powered by Google App Engine
This is Rietveld 408576698