Generate Settings from a .in file
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2012 21:41:07 +0000 (21:41 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2012 21:41:07 +0000 (21:41 +0000)
commit748226bed5c9be51b0e6595e310c53870436bf9c
tree93e9db57319eb1c6ab63154838b83fc4fb8a2c1e
parent0939f92b88cb1c5b9a426dfff65708f00e01a864
Generate Settings from a .in file
https://bugs.webkit.org/show_bug.cgi?id=100393

Reviewed by Adam Barth.

.:

Generate SettingsMacros.h for cmake.

* Source/cmake/WebKitMacros.cmake:

Source/WebCore:

Generate most settings from an .in file to reduce human mistakes and
to make it easier to add/remove new settings.

I only moved settings that are easy to move at this point.  There are many more that
have some minor naming inconsistencies that we can also move to Settings.in, but I'll
do that in a follow up patch.

This doesn't generate SettingInternals.* yet-- we can do that in a follow up patch.

No new tests, this is a refactor.

* CMakeLists.txt:
* DerivedSources.make: Run make_settings.pl.
* DerivedSources.pri: Run make_settings.pl.
* GNUmakefile.am: Run make_settings.pl.
* GNUmakefile.list.am:
* WebCore.exp.in: Remove functions that are now inline in the header.
* WebCore.gyp/WebCore.gyp: Run action_makenames.py, which will run make_settings.pl.
* WebCore.gyp/scripts/action_makenames.py:
(main): Allow make_settings.pl.
* WebCore.order: Remove functions that are now inline in the header.
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::setMessageDOMAndStartTimer): Fix a typo in "magnification".
* page/Settings.cpp:
(WebCore::Settings::Settings): Replace generated settings with SETTINGS_INITIALIZER_LIST.
* page/Settings.h:
(Settings): Replace generated settings with SETTINGS_GETTERS_AND_SETTERS and SETTINGS_MEMBER_VARIABLES.
* page/Settings.in: Added.
* page/make_settings.pl: Added.
(defaultItemFactory):
(generateCode):
(generateHeader): Use a similar model as make_names.pl.
(printConditionalMacros):
(printGettersAndSetters):
(printMemberVariables):
(printGetterAndSetter):
(printInitializerList):
(printInitializer):

Tools:

Add the generated WebCore files to the include dir.

* TestWebKitAPI/CMakeLists.txt:
* WebKitTestRunner/CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
ChangeLog
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/DerivedSources.pri
Source/WebCore/GNUmakefile.am
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/WebCore.gyp/scripts/action_makenames.py
Source/WebCore/WebCore.order
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/ValidationMessage.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/page/Settings.in [new file with mode: 0644]
Source/WebCore/page/make_settings.pl [new file with mode: 0755]
Source/cmake/WebKitMacros.cmake
Tools/ChangeLog
Tools/TestWebKitAPI/CMakeLists.txt
Tools/WebKitTestRunner/CMakeLists.txt