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

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

Issue 874893003: Handles aria-dropeffect after getting its value from blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 5 years, 10 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_cocoa.mm
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index b09e4d6b5d81bef64cac70da14030ec94443ba73..17626c9adb888a32654b274eea33481548a070f7 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -109,6 +109,7 @@ NSDictionary* attributeToMethodNameMap = nil;
{ @"AXARIABusy", @"ariaBusy" },
{ @"AXARIALive", @"ariaLive" },
{ @"AXARIARelevant", @"ariaRelevant" },
+ { @"AXDropEffects", @"dropeffect" },
{ @"AXGrabbed", @"grabbed" },
{ @"AXInvalid", @"invalid" },
{ @"AXLoaded", @"loaded" },
@@ -327,6 +328,11 @@ NSDictionary* attributeToMethodNameMap = nil;
return nil;
}
+- (NSString*)dropeffect {
+ return NSStringForStringAttribute(
+ browserAccessibility_, ui::AX_ATTR_DROPEFFECT);
+}
+
- (NSNumber*)enabled {
return [NSNumber numberWithBool:
GetState(browserAccessibility_, ui::AX_STATE_ENABLED)];
@@ -1392,6 +1398,14 @@ NSDictionary* attributeToMethodNameMap = nil;
@"AXARIABusy",
nil]];
}
+
+ if (browserAccessibility_->HasStringAttribute(
+ ui::AX_ATTR_DROPEFFECT)) {
+ [ret addObjectsFromArray:[NSArray arrayWithObjects:
+ @"AXDropEffects",
+ nil]];
+ }
+
// Add aria-grabbed attribute only if it has true.
if (browserAccessibility_->HasBoolAttribute(ui::AX_ATTR_GRABBED)) {
[ret addObjectsFromArray:[NSArray arrayWithObjects:

Powered by Google App Engine
This is Rietveld 408576698