RESOLVED FIXED 100393
Generate Settings from a .in file
https://bugs.webkit.org/show_bug.cgi?id=100393
Summary Generate Settings from a .in file
Tony Chang
Reported 2012-10-25 10:17:42 PDT
We can also use this to generate InternalSettings. The goal is to make it so adding a new setting is just adding a single line to an in file. Tests will then be able to use internals.settings to override the pref and we can make sure the generated code properly resets the setting at the end of the test. This would obsolete testRunner.overridePreference.
Attachments
Patch (79.88 KB, patch)
2012-11-09 17:12 PST, Tony Chang
no flags
generated SettingsMacros.h (40.10 KB, text/plain)
2012-11-09 17:14 PST, Tony Chang
no flags
Patch (82.17 KB, patch)
2012-11-12 10:27 PST, Tony Chang
no flags
Patch (93.08 KB, patch)
2012-11-12 12:26 PST, Tony Chang
no flags
Patch (95.63 KB, patch)
2012-11-12 13:03 PST, Tony Chang
no flags
Patch for landing (102.85 KB, patch)
2012-11-13 15:15 PST, Tony Chang
no flags
Patch (103.42 KB, patch)
2012-11-13 16:19 PST, Tony Chang
no flags
Patch (99.88 KB, patch)
2012-11-14 10:17 PST, Tony Chang
no flags
Tony Chang
Comment 1 2012-10-25 10:26:14 PDT
This is motivated by the discussion on webkit-dev: http://lists.webkit.org/pipermail/webkit-dev/2012-September/022323.html Oh, we could also try to automate or simplify adding exports.
Alexey Proskuryakov
Comment 2 2012-10-25 15:01:07 PDT
> This would obsolete testRunner.overridePreference. How would it obsolete that? We can't go directly to settings if we want to test how preferences work.
Tony Chang
Comment 3 2012-10-25 15:03:38 PDT
(In reply to comment #2) > > This would obsolete testRunner.overridePreference. > > How would it obsolete that? We can't go directly to settings if we want to test how preferences work. That's true, we should keep testRunner.overridePreference so we can test WebKit API methods. However, we should be able to remove some API methods that were added to overridePreference just for DRT testing.
Tony Chang
Comment 4 2012-11-09 17:12:23 PST
Tony Chang
Comment 5 2012-11-09 17:12:50 PST
Comment on attachment 173410 [details] Patch I expect some ews failures.
Tony Chang
Comment 6 2012-11-09 17:14:04 PST
Created attachment 173411 [details] generated SettingsMacros.h Here's what the generated file looks like.
Early Warning System Bot
Comment 7 2012-11-09 17:21:45 PST
EFL EWS Bot
Comment 8 2012-11-09 17:28:06 PST
Build Bot
Comment 9 2012-11-09 17:52:17 PST
kov's GTK+ EWS bot
Comment 10 2012-11-09 17:55:18 PST
Build Bot
Comment 11 2012-11-09 19:17:47 PST
Tony Chang
Comment 12 2012-11-12 10:27:08 PST
Build Bot
Comment 13 2012-11-12 10:44:59 PST
EFL EWS Bot
Comment 14 2012-11-12 12:01:40 PST
Tony Chang
Comment 15 2012-11-12 12:26:47 PST
EFL EWS Bot
Comment 16 2012-11-12 12:41:13 PST
Tony Chang
Comment 17 2012-11-12 13:03:54 PST
Tony Chang
Comment 18 2012-11-13 09:54:45 PST
Comment on attachment 173701 [details] Patch I'm not sure what's up with the Mac EWS bot, but I think this is ready for review now.
Adam Barth
Comment 19 2012-11-13 10:01:08 PST
Comment on attachment 173701 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=173701&action=review > Source/WebCore/page/make_settings.pl:3 > +# Copyright (C) 2011 Adam Barth <abarth@webkit.org> I wrote this file! I'm amazing. > Source/WebCore/page/make_settings.pl:208 > + substr($setterFunctionName, 3, 1) = uc(substr($setterFunctionName, 3, 1)); > + if (substr($settingName, 0, 3) eq "css" || substr($settingName, 0, 3) eq "xss" || substr($settingName, 0, 3) eq "ftp") { > + substr($setterFunctionName, 3, 3) = uc(substr($setterFunctionName, 3, 3)); > + } Yeah, this is probably better than writing a general camel-case converter.
Adam Barth
Comment 20 2012-11-13 10:01:35 PST
Comment on attachment 173701 [details] Patch InternalsSettings is next?
Tony Chang
Comment 21 2012-11-13 10:27:35 PST
(In reply to comment #20) > (From update of attachment 173701 [details]) > InternalsSettings is next? Soon. There are still lots of simple getters/setters in Settings.h that I'm going to fix up first (e.g., isScriptEnabled/setScriptEnabled, inApplicationChromeMode/setApplicationChromeMode, isCSSCustomFilterEnabled/setCSSCustomFilterEnabled, scrollAnimatorEnabled/setEnableScrollAnimator).
Build Bot
Comment 22 2012-11-13 13:19:31 PST
Tony Chang
Comment 23 2012-11-13 15:15:35 PST
Created attachment 174004 [details] Patch for landing
Build Bot
Comment 24 2012-11-13 15:51:22 PST
Comment on attachment 174004 [details] Patch for landing Attachment 174004 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14832087
Tony Chang
Comment 25 2012-11-13 16:19:11 PST
Tony Chang
Comment 26 2012-11-14 10:17:23 PST
Build Bot
Comment 27 2012-11-14 21:59:36 PST
Comment on attachment 174191 [details] Patch Attachment 174191 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14847254 New failing tests: inspector-protocol/nmi-webaudio.html
WebKit Review Bot
Comment 28 2012-11-15 13:41:42 PST
Comment on attachment 174191 [details] Patch Clearing flags on attachment: 174191 Committed r134828: <http://trac.webkit.org/changeset/134828>
WebKit Review Bot
Comment 29 2012-11-15 13:41:49 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.