Changeset 223828 in webkit
- Timestamp:
- Oct 22, 2017 8:13:33 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 8 added
- 3 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r223779 r223828 4026 4026 4027 4027 4028 GENERATE_SETTINGS_MACROS(${WEBCORE_DIR}/page/Settings. inSettings.h)4028 GENERATE_SETTINGS_MACROS(${WEBCORE_DIR}/page/Settings.yaml Settings.h) 4029 4029 list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/Settings.h) 4030 4030 list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/Settings.cpp) -
trunk/Source/WebCore/ChangeLog
r223826 r223828 1 2017-10-22 Sam Weinig <sam@webkit.org> 2 3 [Settings] Replace current Settings generation with template file based approach 4 https://bugs.webkit.org/show_bug.cgi?id=178634 5 6 Reviewed by Joseph Pecoraro. 7 8 This replaces the recently added python based Settings generation with a generator 9 built in ruby, so we can take advantage of ERB for templating. The result has much 10 of the logic in the templates and as a result feels much easier to follow and cleaner. 11 12 Since I was moving things to ruby, I took the opertunity to switch the Settings definition 13 file from our .in format to yaml, which is quite a bit easier to read. 14 15 * CMakeLists.txt: 16 * DerivedSources.make: 17 * Scripts/GenerateSettings: Removed. 18 * Scripts/GenerateSettings.py: Removed. 19 * Scripts/GenerateSettings.rb: Added. 20 * Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py: Removed. 21 * Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py: Removed. 22 * Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py: Removed. 23 * Scripts/GenerateSettings/GenerateSettings.py: Removed. 24 * Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Removed. 25 * Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Removed. 26 * Scripts/GenerateSettings/Settings.py: Removed. 27 * Scripts/GenerateSettings/__init__.py: Removed. 28 * Scripts/SettingsTemplates: Added. 29 * Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb: Added. 30 * Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb: Added. 31 * Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb: Added. 32 * Scripts/SettingsTemplates/Settings.cpp.erb: Added. 33 * Scripts/SettingsTemplates/Settings.h.erb: Added. 34 * WebCore.xcodeproj/project.pbxproj: 35 * WebCoreMacros.cmake: 36 * page/Settings.in: Removed. 37 * page/Settings.yaml: Added. 38 1 39 2017-10-22 Joseph Pecoraro <pecoraro@apple.com> 2 40 -
trunk/Source/WebCore/DerivedSources.make
r223779 r223828 1373 1373 1374 1374 GENERATE_SETTINGS_SCRIPTS = \ 1375 $(WebCore)/Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py \ 1376 $(WebCore)/Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py \ 1377 $(WebCore)/Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py \ 1378 $(WebCore)/Scripts/GenerateSettings/GenerateSettings.py \ 1379 $(WebCore)/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py \ 1380 $(WebCore)/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py \ 1381 $(WebCore)/Scripts/GenerateSettings/Settings.py \ 1382 $(WebCore)/Scripts/GenerateSettings/__init__.py 1375 $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb \ 1376 $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb \ 1377 $(WebCore)/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb \ 1378 $(WebCore)/Scripts/SettingsTemplates/Settings.cpp.erb \ 1379 $(WebCore)/Scripts/SettingsTemplates/Settings.h.erb 1383 1380 1384 1381 all : InternalSettingsGenerated.idl InternalSettingsGenerated.cpp InternalSettingsGenerated.h Settings.cpp Settings.h 1385 InternalSettingsGenerated%idl InternalSettingsGenerated%cpp InternalSettingsGenerated%h Settings%cpp Settings%h : $(WebCore)/Scripts/GenerateSettings. py $(GENERATE_SETTINGS_SCRIPTS) page/Settings.in1386 $( PYTHON) $< --input $(WebCore)/page/Settings.in1382 InternalSettingsGenerated%idl InternalSettingsGenerated%cpp InternalSettingsGenerated%h Settings%cpp Settings%h : $(WebCore)/Scripts/GenerateSettings.rb $(GENERATE_SETTINGS_SCRIPTS) page/Settings.yaml 1383 $(RUBY) $< --input $(WebCore)/page/Settings.yaml 1387 1384 1388 1385 # -------- -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r223812 r223828 10909 10909 7C39C36F1DDBA3E000FEFB29 /* SVGPathSegListValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathSegListValues.h; sourceTree = "<group>"; }; 10910 10910 7C39C3701DDBA44000FEFB29 /* SVGPathSegList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathSegList.cpp; sourceTree = "<group>"; }; 10911 7C3A8C5E1F7D72B400F46E84 /* GenerateSettings */ = {isa = PBXFileReference; lastKnownFileType = folder; name = GenerateSettings; path = Scripts/GenerateSettings; sourceTree = "<group>"; };10912 7C3A8C601F7D72B500F46E84 /* GenerateSettings.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = GenerateSettings.py; path = Scripts/GenerateSettings.py; sourceTree = "<group>"; };10913 10911 7C3A91E51C963B8800D1A7E3 /* ClipboardAccessPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClipboardAccessPolicy.h; sourceTree = "<group>"; }; 10914 10912 7C3B796F1908757B00B47A2D /* UserMessageHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMessageHandler.cpp; sourceTree = "<group>"; }; … … 11122 11120 7CD494CA1A86EB1D000A87EC /* RenderAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderAttachment.cpp; sourceTree = "<group>"; }; 11123 11121 7CD494CB1A86EB1D000A87EC /* RenderAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderAttachment.h; sourceTree = "<group>"; }; 11122 7CDE73961F9BD59500390312 /* Settings.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Settings.yaml; sourceTree = "<group>"; }; 11124 11123 7CDE8EBC1F193BC500168FE7 /* CSSStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSStyleDeclaration.cpp; sourceTree = "<group>"; }; 11125 11124 7CE191471F2A98AF00272F78 /* FetchRequestInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FetchRequestInit.h; sourceTree = "<group>"; }; … … 14052 14051 BC5823F40C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLElementCustom.cpp; sourceTree = "<group>"; }; 14053 14052 BC5825F20C0B89380053F1B5 /* JSCSSStyleDeclarationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSStyleDeclarationCustom.cpp; sourceTree = "<group>"; }; 14054 BC59DEF8169DEDC30016AC34 /* Settings.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = Settings.in; sourceTree = "<group>"; };14055 14053 BC5A12DD0DC0414800C9AFAD /* CSSReflectValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSReflectValue.cpp; sourceTree = "<group>"; }; 14056 14054 BC5A12DE0DC0414800C9AFAD /* CSSReflectValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSReflectValue.h; sourceTree = "<group>"; }; … … 17533 17531 children = ( 17534 17532 F48389791E1DD23A0076B7EA /* EditingHistory */, 17535 7C3A8C5E1F7D72B400F46E84 /* GenerateSettings */,17536 17533 3717D7E517ECC3A6003C276D /* extract-localizable-strings.pl */, 17537 7C3A8C601F7D72B500F46E84 /* GenerateSettings.py */,17538 17534 37D456FB1A9A50B6003330A1 /* LocalizableStrings.pm */, 17539 17535 ); … … 19572 19568 974D2DA2146A535D00D51F8B /* SecurityPolicy.cpp */, 19573 19569 974D2DA3146A535D00D51F8B /* SecurityPolicy.h */, 19574 BC59DEF8169DEDC30016AC34 /* Settings.in*/,19570 7CDE73961F9BD59500390312 /* Settings.yaml */, 19575 19571 7CC6609B1F93057900D500E9 /* SettingsBase.cpp */, 19576 19572 7CC660991F93057800D500E9 /* SettingsBase.h */, -
trunk/Source/WebCore/WebCoreMacros.cmake
r223612 r223828 204 204 205 205 macro(GENERATE_SETTINGS_MACROS _infile _outfile) 206 set(NAMES_GENERATOR ${WEBCORE_DIR}/Scripts/GenerateSettings. py)206 set(NAMES_GENERATOR ${WEBCORE_DIR}/Scripts/GenerateSettings.rb) 207 207 208 208 # Do not list the output in more than one independent target that may … … 217 217 218 218 set(GENERATE_SETTINGS_SCRIPTS 219 ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py 220 ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py 221 ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py 222 ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateSettingsHeaderFile.py 223 ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateSettingsImplementationFile.py 224 ${WEBCORE_DIR}/Scripts/GenerateSettings/GenerateSettings.py 225 ${WEBCORE_DIR}/Scripts/GenerateSettings/Settings.py 226 ${WEBCORE_DIR}/Scripts/GenerateSettings/__init__.py 219 ${WEBCORE_DIR}/Scripts/SettingsTemplates/InternalSettingsGenerated.cpp.erb 220 ${WEBCORE_DIR}/Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb 221 ${WEBCORE_DIR}/Scripts/SettingsTemplates/InternalSettingsGenerated.h.erb 222 ${WEBCORE_DIR}/Scripts/SettingsTemplates/Settings.cpp.erb 223 ${WEBCORE_DIR}/Scripts/SettingsTemplates/Settings.h.erb 227 224 ) 228 225 … … 232 229 MAIN_DEPENDENCY ${_infile} 233 230 DEPENDS ${NAMES_GENERATOR} ${GENERATE_SETTINGS_SCRIPTS} ${SCRIPTS_BINDINGS} 234 COMMAND ${ PYTHON_EXECUTABLE} ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR}231 COMMAND ${RUBY_EXECUTABLE} ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR} 235 232 VERBATIM ${_args}) 236 233 endmacro()
Note: See TracChangeset
for help on using the changeset viewer.