[webkit-dev] On web-exposing features disabled at runtime

Benjamin Poulain benjamin at webkit.org
Mon Feb 10 13:38:42 PST 2014


On 2/10/14, 10:40 AM, Sergio Villar Senin wrote:
> I'm sending this to the list because it might affect different
> components inside the project.
>
> So as smfr correctly reported here[1] for all those features that don't
> have a feature flag (like grid layout) we're web-exposing the CSS
> properties of the feature even if it's disabled at runtime (we're
> exposing them as well for features enabled at build time but disabled at
> runtime).
>
> If I am not wrong, we just disable the parsing of those properties that
> are not runtime enabled, but the properties are exposed anyway,
> something easy to check doing for example:
> Object.getOwnPropertyDescriptor(document.body.style, property-name).

Yep that is bad.

> The question is whether this is an acceptable behavior or not, and how
> to fix it in case we don't like it. I guess it's safe to conclude that
> it isn't something that we want in general, as it might confuse web
> authors (they see the how properties are available but do nothing).
> Regarding how to fix it, I guess the idea is to do something similar to
> what Eric did in Blink last year[2], i.e., filtering out the list of
> properties that are runtime disabled.
>
> Opinions?

Can't we add a compile time flag instead?
The chromium patch you linked is inelegant and it touches some hot paths.

Another advantage of compile time flag is Andreas eventually notice when 
they become useless and remove all the unnecessary cruft ;)

Benjamin


More information about the webkit-dev mailing list