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

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

Issue 1490953002: Switches to using document selection changed event instead of text selection changed on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1da46ed0943e8a3c19f6a9d1181d4c70f6e616a0..8c83c62d442a8a1c39fb61dbc399e23bb5199c17 100644
--- a/content/browser/accessibility/browser_accessibility_manager_win.cc
+++ b/content/browser/accessibility/browser_accessibility_manager_win.cc
@@ -84,7 +84,7 @@ void BrowserAccessibilityManagerWin::MaybeCallNotifyWinEvent(
// This line and other LOG(WARNING) lines are temporary, to debug
// flaky failures in DumpAccessibilityEvent* tests.
// http://crbug.com/440579
- LOG(WARNING) << "Not firing AX event because of no delegate";
+ DLOG(WARNING) << "Not firing AX event because of no delegate";
return;
}
@@ -93,7 +93,7 @@ void BrowserAccessibilityManagerWin::MaybeCallNotifyWinEvent(
HWND hwnd = delegate->AccessibilityGetAcceleratedWidget();
if (!hwnd) {
- LOG(WARNING) << "Not firing AX event because of no hwnd";
+ DLOG(WARNING) << "Not firing AX event because of no hwnd";
return;
}
@@ -175,7 +175,7 @@ void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent(
BrowserAccessibility* node) {
BrowserAccessibilityDelegate* root_delegate = GetDelegateFromRootManager();
if (!root_delegate || !root_delegate->AccessibilityGetAcceleratedWidget()) {
- LOG(WARNING) << "Not firing AX event because of no root_delegate or hwnd";
+ DLOG(WARNING) << "Not firing AX event because of no root_delegate or hwnd";
return;
}
@@ -255,9 +255,15 @@ void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent(
case ui::AX_EVENT_SELECTED_CHILDREN_CHANGED:
event_id = EVENT_OBJECT_SELECTIONWITHIN;
break;
- case ui::AX_EVENT_TEXT_SELECTION_CHANGED:
+ case ui::AX_EVENT_DOCUMENT_SELECTION_CHANGED: {
+ // Fire the event on the object where the focus of the selection is.
+ int32 focus_id = GetTreeData().sel_focus_object_id;
+ BrowserAccessibility* focus_object = GetFromID(focus_id);
+ if (focus_object)
+ node = focus_object;
event_id = IA2_EVENT_TEXT_CARET_MOVED;
break;
+ }
default:
// Not all WebKit accessibility events result in a Windows
// accessibility notification.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698