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.
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.
> 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.
(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.
Created attachment 173410 [details] Patch
Comment on attachment 173410 [details] Patch I expect some ews failures.
Created attachment 173411 [details] generated SettingsMacros.h Here's what the generated file looks like.
Comment on attachment 173410 [details] Patch Attachment 173410 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/14790292
Comment on attachment 173410 [details] Patch Attachment 173410 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/14778610
Comment on attachment 173410 [details] Patch Attachment 173410 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/14785382
Comment on attachment 173410 [details] Patch Attachment 173410 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/14779632
Comment on attachment 173410 [details] Patch Attachment 173410 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14781492
Created attachment 173668 [details] Patch
Comment on attachment 173668 [details] Patch Attachment 173668 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14813428
Comment on attachment 173668 [details] Patch Attachment 173668 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/14818248
Created attachment 173686 [details] Patch
Comment on attachment 173686 [details] Patch Attachment 173686 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/14811526
Created attachment 173701 [details] Patch
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.
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.
Comment on attachment 173701 [details] Patch InternalsSettings is next?
(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).
Comment on attachment 173701 [details] Patch Attachment 173701 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14826292
Created attachment 174004 [details] Patch for landing
Comment on attachment 174004 [details] Patch for landing Attachment 174004 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/14832087
Created attachment 174021 [details] Patch
Created attachment 174191 [details] Patch
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
Comment on attachment 174191 [details] Patch Clearing flags on attachment: 174191 Committed r134828: <http://trac.webkit.org/changeset/134828>
All reviewed patches have been landed. Closing bug.