On Sat, Mar 7, 2015 at 8:55 AM, Darin Adler <da...@apple.com> wrote:

> Why do we have [Conditional=] in our IDL files? Perhaps because some ports
> lacked a way to do #if in the past?


I think Conditional is a nicer/newer way of if-defing based on feature
flags.


> Should we use #if or [Conditional]? See for example, HTMLMediaElement.idl,
> which has a mix of both styles. It's pretty ugly how the #if look in the
> IDL files, but even worse is a seemingly random mix of both #if and
> [Conditional].
>

We should use Conditional as much as possible.

As far as I know one area we can't use Conditional= is if something depends
on multiple feature flags or if it's specific to a binding language
(JS/Objective-C/etc...).  We should probably add a special feature flag for
that; e.g. Conditional=JS.

- R. Niwa
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to