[webkit-dev] How to prevent conditional interfaces from being added as supplemental interfaces

Sergio Villar Senin svillar at igalia.com
Thu Feb 23 07:44:24 PST 2012


Hi,

I've been trying to build the GTK port without geolocation support and
found that is no longer possible (after r108610). The reason is because
that commit removes an #ifdef guard that was hiding the actual issue IMO.

Thing is that NavigatorGeolocation.idl specifies a conditional interface
to be added to the Navigator interface. It seems fine as the conditional
clearly specifies that it needs the GEOLOCATION feature. The generated
code properly has the #ifdef guards to ensure that the generated code is
only built if geolocation is enabled. The problem is that it generates a
function whose signature is something like

WebKitDOMGeolocation*
webkit_dom_navigator_get_geolocation(WebKitDOMNavigator* self);

It does not matter that the implementation is correctly surrounded by
the proper #ifdefs as the doc says[1] because the compiler will always
complain due to the lack of WebKitDOMGeolocation object.

So my question is, shouldn't the platform specific bindings generators
(resolve-supplemental.pl maybe?) skip the addition of supplemental
interfaces to their parents if the specified conditions are not met?

BR

[1]: http://trac.webkit.org/wiki/IdlAttributes


More information about the webkit-dev mailing list