[webkit-dev] WebIDL implementation plans (was: Re: Multiple inheritance in the DOM)

Dirk Schulze dschulze at adobe.com
Fri Jan 25 20:32:35 PST 2013


On Jan 25, 2013, at 8:16 PM, Elliott Sprehn <esprehn at chromium.org> wrote:

>> interface SVGViewSpec
>>  {
>>   readonly attribute SVGTransformList transform;
>>   readonly attribute SVGElement viewTarget;
>>   readonly attribute DOMString viewBoxString;
>>   readonly attribute DOMString preserveAspectRatioString;
>>   readonly attribute DOMString transformString;
>>   readonly attribute DOMString viewTargetString;
>> };
>> SVGViewSpec implements SVGFitToViewBox;
>> SVGViewSpec implements SVGZoomAndPan;
>> 
>> SVGFitToViewBox and SVGZoomAndPan are both NoInterfaceObjects.
>> 
>> I hope that I am not mistaken and that this is not what you mean with QueryInterface.
> 
> 
> Since they're NoInterfaceObjects we can just merge the idl into the file in WebKit or use Supplemental in WebkitIDL. You've written it with multiple implements to be DRY in the WebIDL, that's not a problem for WebKit.
> 
> See: HTMLInputElementFileSystem.

As far as I understood it, HTMLInputElementFileSystem extends HTMLInputElement. In WebIDL it would be:

HTMLInputElement implements HTMLInputElementFileSystem;

The problem is that SVGFitToViewBox and SVGZoomAndPan of the example above are implemented by a lot of other interfaces as well. Supplemental is just supposed to be set once per interface. That is why Supplemental doesn't work for SVG. The alternative would be to implement the attributes and operations of SVGFitToViewBox and SVGZoomAndPan into every class that implements them. This would be a lot of code copies. And these are not the only interfaces that would need to be merged.

Greetings,
Dirk


More information about the webkit-dev mailing list