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

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

Issue 1762143002: Use unique IDs for accessibility nodes on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix null obj deref in DCHECK Created 4 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_mac.mm
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 712de431a523bc58d62ed3f51f4302e2f72d1170..0df142e52dec82db4df6636ec93e12323f9767ab 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -140,7 +140,7 @@ void BrowserAccessibilityManagerMac::NotifyAccessibilityEvent(
}
}
- auto native_node = node->ToBrowserAccessibilityCocoa();
+ auto native_node = ToBrowserAccessibilityCocoa(node);
DCHECK(native_node);
// Refer to |AXObjectCache::postPlatformNotification| in WebKit source code.
@@ -187,7 +187,7 @@ void BrowserAccessibilityManagerMac::NotifyAccessibilityEvent(
BrowserAccessibility* focus = GetFocus();
if (!focus)
break;
- NSAccessibilityPostNotification(focus->ToBrowserAccessibilityCocoa(),
+ NSAccessibilityPostNotification(ToBrowserAccessibilityCocoa(focus),
mac_notification);
if (base::mac::IsOSElCapitanOrLater()) {
@@ -203,9 +203,9 @@ void BrowserAccessibilityManagerMac::NotifyAccessibilityEvent(
return;
NSAccessibilityPostNotificationWithUserInfo(
- focus->ToBrowserAccessibilityCocoa(), mac_notification, user_info);
+ ToBrowserAccessibilityCocoa(focus), mac_notification, user_info);
NSAccessibilityPostNotificationWithUserInfo(
- root->ToBrowserAccessibilityCocoa(), mac_notification, user_info);
+ ToBrowserAccessibilityCocoa(root), mac_notification, user_info);
return;
}
break;
@@ -318,7 +318,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
BrowserAccessibility* focus_object = GetFromID(focus_id);
if (focus_object) {
focus_object = focus_object->GetClosestPlatformObject();
- auto native_focus_object = focus_object->ToBrowserAccessibilityCocoa();
+ auto native_focus_object = ToBrowserAccessibilityCocoa(focus_object);
if (native_focus_object) {
[user_info setObject:[native_focus_object selectedTextMarkerRange]
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];

Powered by Google App Engine
This is Rietveld 408576698