RESOLVED FIXED286928
AX: move definition of Mac NSAccessibility constants to a common header file, remove guards
https://bugs.webkit.org/show_bug.cgi?id=286928
Summary AX: move definition of Mac NSAccessibility constants to a common header file,...
Dominic Mazzoni
Reported 2025-02-03 08:34:00 PST
To make it easier to identify and audit all of the accessibility constants in WebKit, move the definition of NSAccessibility constants to a common header file and remove guards. We currently have definitions like this in a few different files: #ifndef NSAccessibilityCurrentStateChangedNotification #define NSAccessibilityCurrentStateChangedNotification @"AXCurrentStateChanged" #endif The #ifndef guard is misleading because it implies that it's preventing us from redefining a constant defined in a system header. But in fact, most system-defined accessibility constants are symbols, so the #ifndef isn't doing anything, and we were in fact redefining some symbol names before being deleted in a previous change. As a follow-up I think we should consider switching to symbols for these constants in WebKit because then we'd get a linker error if we duplicate a system symbol.
Attachments
Radar WebKit Bug Importer
Comment 1 2025-02-03 08:34:23 PST
Dominic Mazzoni
Comment 2 2025-02-03 08:52:31 PST
EWS
Comment 3 2025-02-04 17:53:38 PST
Committed 289842@main (9644e79bbfa1): <https://commits.webkit.org/289842@main> Reviewed commits have been landed. Closing PR #39915 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.