Bug 43097 - Make all objects in the WebKit2 API inherit from a single base class
Summary: Make all objects in the WebKit2 API inherit from a single base class
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-27 18:26 PDT by Sam Weinig
Modified: 2010-07-28 14:42 PDT (History)
1 user (show)

See Also:


Attachments
Patch (37.71 KB, patch)
2010-07-27 18:38 PDT, Sam Weinig
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.