Closed Bug 1719736 Opened 4 years ago Closed 4 years ago

mozAccessible protocol should explicitly inherit from NSObject

Categories

(Core :: Disability Access APIs, defect, P3)

defect

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: morgan, Assigned: morgan)

Details

Attachments

(1 file)

Right now, mozAccessible the protocol (contained in mozAccessibleProtocol.h) doesn't inherit from NSObject. This causes some problems, namely compiler warnings that NSObject functions are invalid to call on objects implementing the mozAccessible protocol.

For example:

- id<mozAccessible> moxParent { ... }

- void someOtherFunction {
  // the following will throw an error because isKindOfClass is an NSObject function
  if ([[self moxParent] isKindOfClass:[mozActionAccessible class]) { ... }

  // this wont because it implicitly casts id<mozAccessible> to id<NSObject>
  id parent = [self moxParent];
  if ([parent isKindOfClass:[mozActionAccessible class]) { ... }
}
Pushed by mreschenberg@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e8b4959ef52 Have mozAccessible protocol inherit from NSObject r=eeejay
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: