[webkit-dev] WEB_TIMING enabled on all ports - let's remove the flag?

Maciej Stachowiak mjs at apple.com
Tue Aug 1 15:02:07 PDT 2017

> On Aug 1, 2017, at 9:57 AM, Dean Jackson <dino at apple.com> wrote:
>> On 24 Jul 2017, at 22:44, Brian Burg <bburg at apple.com> wrote:
>> Hi WebKittens,
>> In WebKit, the various web-exposed timing APIs–Resource Timing, User Timing, and Navigation Timing are guarded by the ENABLE_WEB_TIMING feature flag.
>> It seems that ENABLE_WEB_TIMING is turned on for Xcode and CMake build systems by default, and we have not experienced any fallout from shipping these features in Safari Technology Preview. I think it’s time to remove the feature flag. Are there any objections? Is there a port in-tree that’s compiling without this feature?
>> If I don’t hear anything, the flag’s removal will be tracked in <https://bugs.webkit.org/show_bug.cgi?id=174795>.
> In general I think we should be more enthusiastic about removing feature flags that are guarding core parts of the Web platform. Web Timing is a great example. 

I agree with this sentiment. I think a lot of these should never have been compile time flags. They should have been runtime (or at this point not flags at all).

Our Feature Policy addresses this: https://webkit.org/feature-policy/ <https://webkit.org/feature-policy/>

"In some cases, compile time flags should be used in addition to or instead of runtime flags:
	• When merely compiling a feature in significantly impacts the hackability or livability of trunk.
	• When a feature requires a platform-specific back end that is not available on all platforms.
	• When some ports or platforms have resource constraints which require the ability to remove the feature completely from builds.
	• When a feature is otherwise only relevant to some ports or platforms.

That said, runtime flags are preferred whenever feasible."

Most of the flags listed below don't meet any of these conditions, and never did. It sounds like a few, like WebGL, might satisfy "When a feature requires a platform-specific backend that is not available on all platforms".

For any new features, we should strongly consider using runtime flags whenever possible. For many older features, it would be great to convert them to runtime flags even if they aren't ready to be enabled everywhere yet. Death to compile-time feature flags!

> Some others I see:

For Streams API, I think we're ready for Read Streams to be default on everywhere, but not yet Write Streams. I think Write Streams should be compiled in but runtime switched off by default until it's up to spec and fully qualified. (I don't remember how this maps to the flags exactly).



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20170801/63cdf47d/attachment.html>

More information about the webkit-dev mailing list