Closed Bug 1844238 Opened 2 years ago Closed 2 years ago

Don't duplicate role definitions

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Currently, we have to define roles in both accessible/base/Role.h and accessible/interfaces/nsIAccessibleRole.idl and ensure they are kept in sync. We even duplicate the comments. Ideally, we would only need to maintain one or the other.

Role.h will soon be generated, but it is generated within the obj dir, so local includes won't work.
Our C++ style guide says we should prefer exported includes wherever possible anyway.

This was done with this shell command inside the accessible/ directory:

sed -i 's,#include "Role.h",#include "mozilla/a11y/Role.h",' `git grep -l '#include "Role.h"'`

This eliminates duplication.

Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a490408f57c8 part 1: Change includes of Role.h to mozilla/a11y/Role.h. r=eeejay https://hg.mozilla.org/integration/autoland/rev/6a9aca2a1b89 part 2: Generate Role.h from nsIAccessibleRole.idl. r=eeejay
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
See Also: → 1863482
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: