We should make all WK objects in the WebKit2 API inherit from a single base class.
Created attachment 62783 [details] Patch
Attachment 62783 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebKit2/UIProcess/API/C/WKAPICast.h:59: More than one command on the same line [whitespace/newline] [4] WebKit2/UIProcess/API/C/WKAPICast.h:60: More than one command on the same line [whitespace/newline] [4] WebKit2/UIProcess/API/C/WKAPICast.h:73: More than one command on the same line [whitespace/newline] [4] WebKit2/UIProcess/API/C/WKAPICast.h:120: Extra space before last semicolon. If this should be an empty statement, use { } instead. [whitespace/semicolon] [5] Total errors found: 4 in 30 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 62783 [details] Patch Patch says what it does, but not why. Why is inheriting from a single base class better?
(In reply to comment #3) > (From update of attachment 62783 [details]) > Patch says what it does, but not why. > > Why is inheriting from a single base class better? The intent is to allow for a CF-style base type (CFTypeRef) so that our message passing API can be defined as something like WKContextPostMessageToInjectedBundle(WKStringRef name, WKTypeRef message); Then you could send a message which is either a WKStringRef or a WKArrayRef or a WKPageRef event.
Landed in r64232.