Closed
Bug 1169408
Opened 9 years ago
Closed 9 years ago
Merge mozButtonAccessible and mozPopupButtonAccessible
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: lsocks, Assigned: lsocks)
References
Details
Attachments
(1 file, 2 obsolete files)
10.71 KB,
patch
|
lsocks
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8612529 -
Flags: review?(surkov.alexander)
Comment 2•9 years ago
|
||
Comment on attachment 8612529 [details] [diff] [review] merged mozPopupButtonAccessible, mozButtonAccessible into one class Review of attachment 8612529 [details] [diff] [review]: ----------------------------------------------------------------- r=me ::: accessible/mac/AccessibleWrap.mm @@ -65,5 @@ > case roles::SPLITBUTTON: > case roles::TOGGLE_BUTTON: > { > // if this button may show a popup, let's make it of the popupbutton type. > - return HasPopup() ? [mozPopupButtonAccessible class] : AccessibleWrap::HasPopup() is not used anymore, you can remove it ::: accessible/mac/mozActionElements.mm @@ +58,5 @@ > NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL; > > + if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) { > + if ([self hasPopup]) > + return [self children]; pls remove whitespaces @@ +87,5 @@ > + if ([self isEnabled]) { > + if ([self hasPopup]) > + return [NSArray arrayWithObjects:NSAccessibilityPressAction, > + NSAccessibilityShowMenuAction, > + nil]; something wrong with indentation, I guess NSAcc.. should be aligned @@ +102,5 @@ > > + if ([self hasPopup]) { > + if ([action isEqualToString:NSAccessibilityShowMenuAction]) > + return @"show menu"; > + } I would move this after pressaction check @@ +119,5 @@ > - (void)accessibilityPerformAction:(NSString*)action > { > NS_OBJC_BEGIN_TRY_ABORT_BLOCK; > > + if ([self hasPopup] && ![self isEnabled]) I believe isEnabled check should be applied to mozButtonAcc too @@ +150,5 @@ > +{ > + AccessibleWrap* accWrap = [self getGeckoAccessible]; > + if (!accWrap) > + return false; > + return (accWrap->NativeState() & mozilla::a11y::states::HASPOPUP); I would prefer return acc && (acc->NativeState() & ) @@ -188,5 @@ > - NSAccessibilityHelpAttribute, > - NSAccessibilityEnabledAttribute, // required > - NSAccessibilityFocusedAttribute, // required > - NSAccessibilityTitleAttribute, // required for popupmenus, and for menubuttons with a title > - NSAccessibilityChildrenAttribute, // required this one is missed on mozButtonAccessible
Attachment #8612529 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8612529 -
Attachment is obsolete: true
Assignee | ||
Comment 4•9 years ago
|
||
Carry r=surkov
Attachment #8612889 -
Attachment is obsolete: true
Attachment #8612978 -
Flags: review+
Comment 6•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6fda72452cf9
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•