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

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: 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: 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 6e572695b654a8335058d1b9ba95f0e0b3371842..88d8dfe7b6f4398ea25afa885172bbd692087915 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.
+ ::NotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, hwnd, OBJID_CARET, child_id);
dmazzoni 2017/04/17 05:07:34 I don't think we want this here, because this mean
+ }
+ ::NotifyWinEvent(win_event_type, hwnd, OBJID_CLIENT, child_id);
return BrowserAccessibilityEvent::Sent;
}

Powered by Google App Engine
This is Rietveld 408576698