Bug 43097

Summary: Make all objects in the WebKit2 API inherit from a single base class
Product: WebKit Reporter: Sam Weinig <sam>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch andersca: review+

Description Sam Weinig 2010-07-27 18:26:34 PDT
We should make all WK objects in the WebKit2 API inherit from a single base class.
Comment 1 Sam Weinig 2010-07-27 18:38:06 PDT
Created attachment 62783 [details]
Patch
Comment 2 WebKit Review Bot 2010-07-27 18:40:07 PDT
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 3 Darin Adler 2010-07-28 12:59:49 PDT
Comment on attachment 62783 [details]
Patch

Patch says what it does, but not why.

Why is inheriting from a single base class better?
Comment 4 Sam Weinig 2010-07-28 13:04:52 PDT
(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.
Comment 5 Sam Weinig 2010-07-28 14:42:49 PDT
Landed in r64232.