[webkit-dev] Proposal for a new way to handle porting #ifdefs

Kevin Ollivier kevino at theolliviers.com
Mon May 25 12:09:41 PDT 2009


Hi Maciej,

On May 25, 2009, at 12:33 AM, Maciej Stachowiak wrote:

>
> On May 24, 2009, at 10:38 PM, Adam Barth wrote:
>
>> On Sun, May 24, 2009 at 10:08 PM, Maciej Stachowiak <mjs at apple.com>  
>> wrote:
>>> I don't think it should be discounted. It might be helpful to  
>>> clarify why
>>> you think ifdefs are a bad solution.
>>
>> When I made changes that affect several ports, I try to be good  
>> WebKit
>> citizen and update all the ports, but the situation we have today
>> makes that a pain.  For example, consider the case of adding a method
>> to ChromeClient.  I understand that I have to add the method to a
>> bunch of port-specific subclasses, but theses classes are stored in
>> slightly different locations (WebCoreSupport or WebKitSupport?), have
>> different naming conventions (WebChromeClient or ChromeClientGtk?),
>> and have different names spaces (using namespace WebCore or not?).
>> All these issues combine to ensure that I've screwed it up, and I
>> don't really have a way to test because I can't building the XYZ  
>> port.
>> I just have to check in my change and pray.
>>
>> Anyway, that's my rant.  Are patches welcome for homogenizing some of
>> these idiosyncrasies?
>
> I would be in favor, though in general we leave the WebKit layer up  
> to port owners. Maybe others would like to chime in.

Personally, I'd be in favor of some defined conventions that ports are  
at least suggested to follow. I don't think homogenizing the Web(Kit |  
Core)Support layer would be a big problem for porters, and I think  
it's definitely worth doing if it makes it easier for you guys to make  
changes to the ports.

In hindsight, while we used WebKitSupport for the wx port, I think  
WebCoreSupport is probably the better choice, or perhaps even  
WebCoreClients would be more appropriate. Regarding the file names, I  
think most ports use the convention of WhateverClientPort. I think  
actually the Apple ports are the only ones using the WebWhateverClient  
convention. While I can go either way, I do like the  
WhateverClientPort convention, myself. Regardless, if we decide on a  
particular convention or guideline, I will happily update the wx port  
to use it! :-)

> I think one key step here will be to have a "try server" integrated  
> with the buildbots, so that it's at least practical to test such  
> patches.

I definitely second this, it would be enormously helpful! :-)

Thanks,

Kevin

> Regards,
> Maciej
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



More information about the webkit-dev mailing list