Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Issue 18578007: Add a public API to enable/disable blink runtime features by name (Closed)

Created:
7 years, 5 months ago by dstockwell
Modified:
7 years, 5 months ago
CC:
blink-reviews, jamesr, dglazkov+blink, eae+blinkwatch, alancutter (OOO until 2018), darin (slow to review)
Visibility:
Public.

Description

Add a public API to enable/disable blink runtime features by name This will be used to add an --enable-blink-features=feature1,feature2 flag to Chromium to avoid plumbing separate flags each time a feature needs to be exposed individually (eg. for the purposes of a virtual test suite). For a flag to be toggled by this API it must have the 'command_line_flag' option set in RuntimeEnabledFeatures.in

Patch Set 1 #

Patch Set 2 : Require a 'command_line_flag' option in RuntimeEnabledFeatures.in #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -1 line) Patch
M Source/WebKit/chromium/src/WebRuntimeFeatures.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/page/RuntimeEnabledFeatures.in View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/scripts/make_runtime_features.py View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl View 1 1 chunk +13 lines, -0 lines 0 comments Download
M Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl View 2 chunks +3 lines, -0 lines 0 comments Download
M public/web/WebRuntimeFeatures.h View 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
dstockwell
7 years, 5 months ago (2013-07-08 03:33:43 UTC) #1
abarth-chromium
I'm not sure we want this CL. It's rare that we need to expose a ...
7 years, 5 months ago (2013-07-08 04:09:39 UTC) #2
dstockwell
On 2013/07/08 04:09:39, abarth wrote: > I'm not sure we want this CL. It's rare ...
7 years, 5 months ago (2013-07-08 04:34:07 UTC) #3
abarth-chromium
On 2013/07/08 04:34:07, dstockwell wrote: > The engineering effort required to add a new flag ...
7 years, 5 months ago (2013-07-08 04:41:11 UTC) #4
abarth-chromium
By way of context, we should probably remove almost all the entries in WebRuntimeFeatures.h. The ...
7 years, 5 months ago (2013-07-08 04:47:44 UTC) #5
dstockwell
On 2013/07/08 04:41:11, abarth wrote: > On 2013/07/08 04:34:07, dstockwell wrote: > > The engineering ...
7 years, 5 months ago (2013-07-08 05:11:02 UTC) #6
dstockwell
Perhaps we could expose only a subset of features to this API, the "oddballs" as ...
7 years, 5 months ago (2013-07-08 05:28:26 UTC) #7
eseidel
I'm not sure I understand the virtual test suite usecase. I would expect very few ...
7 years, 5 months ago (2013-07-08 19:13:29 UTC) #8
eseidel
For better or worse we're developing Animations on trunk. They need a way to test ...
7 years, 5 months ago (2013-07-08 21:02:02 UTC) #9
eseidel
This change doesn't seem that bad to me. I think we should discourage having these ...
7 years, 5 months ago (2013-07-08 21:03:05 UTC) #10
dstockwell
On 2013/07/08 21:03:05, eseidel wrote: > This change doesn't seem that bad to me. I ...
7 years, 5 months ago (2013-07-08 21:17:54 UTC) #11
eseidel
lgtm. Please wait for Adam's lgtm too.
7 years, 5 months ago (2013-07-08 21:24:47 UTC) #12
abarth-chromium
On 2013/07/08 05:11:02, dstockwell wrote: > On 2013/07/08 04:41:11, abarth wrote: > > Perhaps there's ...
7 years, 5 months ago (2013-07-08 22:28:21 UTC) #13
abarth-chromium
On 2013/07/08 21:02:02, eseidel wrote: > For better or worse we're developing Animations on trunk. ...
7 years, 5 months ago (2013-07-08 22:30:36 UTC) #14
abarth-chromium
7 years, 5 months ago (2013-07-08 22:38:30 UTC) #15
The updated CL is better, but I'd still prefer the TestRunner.dll approach.

The approach I'd recommend is the following:

1) When running a virtual test suite, run-webkit-test passes a
--test-blink-feature=foo flag to content_shell (or whatever name you like).
2) When content_shell receives an --test-blink-feature flag together with
--dump-render-tree, it calls into TestRunner.dll with the value of the
parameter.
3) TestRunner.dll then knows how to translate the string (e.g., "foo") to a
WebRuntimeFeatures call.

The work to add a new virtual test suite would be as follows:

A) Add a new WebRuntimeFeatures API.
B) Extend TestRunner's table to know how to set that WebRuntimeFeatures.

Notice that A and B can be done in one atomic commit because
WebRuntimeFeatures.h and TestRunner are in the same repo.  It's also now clear
in the API which configurations combinations are exposed to embedders.  It's
also clear that this functionality should be used only by tests.

Powered by Google App Engine
This is Rietveld 408576698