[webkit-dev] WebAccessibilityRole must match AccessiblityRole enums?

Darin Adler darin at apple.com
Fri Jun 4 10:59:27 PDT 2010

For what it’s worth, this kind of pattern was quite common in the Mac OS X WebKit API, with public enums in the Objective-C API that exactly matched private enums inside WebCore and had to be kept in sync.

Over the years, working towards the goal of making WebKit better cross-platform, we’ve tried to eliminate that, although I suspect there are some that remain. In some places that means we’re using switch statements to translate one enum to another, which of course has a bit of runtime cost.

The Chromium use of this sort of pattern may be analogous. Or possibly it’s different, but just sounds similar.

    -- Darin

More information about the webkit-dev mailing list