[webkit-dev] Proposal and ideas for a new .in format

Maciej Stachowiak mjs at apple.com
Thu Jun 19 01:32:29 PDT 2008


On Jun 19, 2008, at 12:56 AM, Eric Seidel wrote:

> Not a big fan of using the negative:
>
> noWrapperFactory=1
>
> Should be something like:
> includeInWrapperFactory=0

Why would anything be excluded from the wrapper factory in the first  
place? Are those just elements where the wrapper is JSHTMLElement and  
not some more specific class? In which case, I think it is ok to just  
specify that as the interface name.

>>
>>> I'm not sure what the audio hack is.
>>
>> Audio tags need a special wrapper so the attribute triggers  
>> generating
>> it. Maybe "isAudioTag" would be more explicit?

OK, so the audio special case seems to be if (! 
MediaPlayer::isAvailable()), make a generic HTMLElement instead. The  
first thing I wonder is whether this should apply to video as well as  
audio. If so, maybe the parameter should be something like  
wrapperOnlyIfMediaIsAvailable=1.

Another thought: is there any case where we want the C++ namespace to  
be anything but WebCore? I think not, in which case we should probably  
hardcode this in the script instead of making it a parameter.


>>
>>
>>> Instead of "upperCase", might it make sense to call that  
>>> "interfaceName" for
>>> cases where the interface is not the obvious thing derived from  
>>> the tag
>>> name? "Anchor" isn't really an uppercase version of "a", and for  
>>> h1-h6 all
>>> of them would have Header in the interface name, but it's not  
>>> really an
>>> uppercase version. Might it make sense to even say
>>> interface=HTMLAnchorElement?
>>
>> upperCase usually really represents the upper case (Camel-case) name
>> but there is some exceptions.
>> I am fine with "interface" or "interfaceName" but you could not write
>> interface=HTMLAnchorElement as the "interface" value has other use
>> that just the class name (wrapper function name, QualifiedName, ...).
>> Maybe "useCustomInterface" would be an even better name as there is a
>> default value?

The wrapper function name could use the full interface name IMO, or  
else the tag name like the defined QName does. The QualifiedName is  
based on the actual tag name, isn't it? It's HTMLNames::aTag, not  
anchorTag. What else uses the uppercase version of the name?

Regards,
Maciej





More information about the webkit-dev mailing list