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

Unified Diff: content/browser/accessibility/browser_accessibility_cocoa.mm

Issue 2210763002: MacViews a11y: Sync VoiceOver cursor with keyboard focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 4 years, 2 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
« no previous file with comments | « no previous file | ui/accessibility/platform/ax_platform_node_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/browser_accessibility_cocoa.mm
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index a0a8338f3f294ec228f5613173c49785afc1e264..45763cdae9b1e112118f523f7fe405dad50b8948 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -106,11 +106,6 @@ const int kAXResultsLimitNoLimit = -1;
extern "C" {
-// See http://openradar.appspot.com/9896491. This SPI has been tested on 10.5,
-// 10.6, and 10.7. It allows accessibility clients to observe events posted on
-// this object.
-void NSAccessibilityUnregisterUniqueIdForUIElement(id element);
-
// The following are private accessibility APIs required for cursor navigation
// and text selection. VoiceOver started relying on them in Mac OS X 10.11.
#if !defined(MAC_OS_X_VERSION_10_11) || \
@@ -610,8 +605,10 @@ NSString* const NSAccessibilityRequiredAttribute = @"AXRequired";
}
- (void)detach {
- if (browserAccessibility_)
- NSAccessibilityUnregisterUniqueIdForUIElement(self);
+ if (!browserAccessibility_)
+ return;
+ NSAccessibilityPostNotification(
+ self, NSAccessibilityUIElementDestroyedNotification);
browserAccessibility_ = nullptr;
}
@@ -2880,7 +2877,10 @@ NSString* const NSAccessibilityRequiredAttribute = @"AXRequired";
return browserAccessibility_->GetId();
}
-- (BOOL)accessibilityShouldUseUniqueId {
+- (BOOL)accessibilityNotifiesWhenDestroyed {
+ // Indicate that BrowserAccessibilityCocoa will post a notification when it's
+ // destroyed (see -detach). This allows VoiceOver to do some internal things
+ // more efficiently.
return YES;
}
« no previous file with comments | « no previous file | ui/accessibility/platform/ax_platform_node_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698