Guest User

Untitled

a guest
May 25th, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 54.76 KB | None | 0 0
  1. diff --git a/WebCore/Android.derived.mk b/WebCore/Android.derived.mk
  2. index c678e60..9ee2eb0 100644
  3. --- a/WebCore/Android.derived.mk
  4. +++ b/WebCore/Android.derived.mk
  5. @@ -55,9 +55,10 @@ LOCAL_GENERATED_SOURCES += $(GEN)
  6.  
  7. # DOCTYPE strings
  8.  
  9. -GEN := $(intermediates)/html/DocTypeStrings.cpp
  10. -$(GEN): PRIVATE_CUSTOM_TOOL = gperf -CEot -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $< > $@
  11. +GEN := $(intermediates)/html/DocTypeStringsImpl.cpp
  12. +$(GEN): PRIVATE_CUSTOM_TOOL = perl $(LOCAL_PATH)/make-hash-tools.pl doctype $(dir $@) $(LOCAL_PATH)/html/DocTypeStrings.gperf
  13. $(GEN): $(LOCAL_PATH)/html/DocTypeStrings.gperf
  14. +$(GEN): SCRIPT := $(LOCAL_PATH)/make-hash-tools.pl
  15. $(transform-generated-source)
  16. # we have to do this dep by hand:
  17. $(intermediates)/html/HTMLDocument.o : $(GEN)
  18. @@ -65,18 +66,20 @@ $(intermediates)/html/HTMLDocument.o : $(GEN)
  19.  
  20. # HTML entity names
  21.  
  22. -GEN := $(intermediates)/html/HTMLEntityNames.c
  23. -$(GEN): PRIVATE_CUSTOM_TOOL = gperf -a -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 $< > $@
  24. +GEN := $(intermediates)/html/HTMLEntityNamesImpl.cpp
  25. +$(GEN): PRIVATE_CUSTOM_TOOL = perl $(LOCAL_PATH)/make-hash-tools.pl entities $(dir $@) $(LOCAL_PATH)/html/HTMLEntityNames.gperf
  26. $(GEN): $(LOCAL_PATH)/html/HTMLEntityNames.gperf
  27. +$(GEN): SCRIPT := $(LOCAL_PATH)/make-hash-tools.pl
  28. $(transform-generated-source)
  29. LOCAL_GENERATED_SOURCES += $(GEN)
  30.  
  31.  
  32. # color names
  33.  
  34. -GEN := $(intermediates)/platform/ColorData.c
  35. -$(GEN): PRIVATE_CUSTOM_TOOL = gperf -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 $< > $@
  36. +GEN := $(intermediates)/platform/ColorDataImpl.cpp
  37. +$(GEN): PRIVATE_CUSTOM_TOOL = perl $(LOCAL_PATH)/make-hash-tools.pl colordata $(dir $@) $(LOCAL_PATH)/platform/ColorData.gperf
  38. $(GEN): $(LOCAL_PATH)/platform/ColorData.gperf
  39. +$(GEN): SCRIPT := $(LOCAL_PATH)/make-hash-tools.pl
  40. $(transform-generated-source)
  41. LOCAL_GENERATED_SOURCES += $(GEN)
  42.  
  43. diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
  44. index 370c987..e465dc3 100644
  45. --- a/WebCore/ChangeLog
  46. +++ b/WebCore/ChangeLog
  47. @@ -1,3 +1,50 @@
  48. +2010-05-11 Andras Becsi <abecsi@inf.u-szeged.hu>
  49. +
  50. + Reviewed by NOBODY (OOPS!).
  51. +
  52. + Refactor gperf code generation and usage to fix the debug build with gcc>4.4.
  53. + webkit.org/b/29244
  54. +
  55. + Gperf code generation is done by a new script called WebCore/make-hash-tools.pl now,
  56. + and the generation options were moved into the gperf files, to make the options more understandable
  57. + and the generation process less redundant across the various ports.
  58. + Hitherto gperf generated C code, these files were included in multiple C++ files across WebCore
  59. + to access the functionality provided. This resulted in debug build failure with newer gcc versions
  60. + because of a new feature of gcc, which disables C style inlining in debug mode.
  61. + The make-hash-tools.pl script lets gperf generate C++ code for all gperf files now, which are compiled
  62. + in their own compilation unit.
  63. + The functionality provided by the generated code is wrapped behind HashTools.h, so there is no need
  64. + for multiple inclusions of generated C files to access these functions.
  65. +
  66. + No new functionality added, no new tests needed.
  67. +
  68. + * Android.derived.mk:
  69. + * DerivedSources.make:
  70. + * GNUmakefile.am:
  71. + * WebCore.gyp/scripts/rule_gperf.py:
  72. + * WebCore.gyp/WebCore.gyp:
  73. + * WebCore.pri:
  74. + * WebCore.xcodeproj/project.pbxproj:
  75. + * css/CSSComputedStyleDeclaration.cpp:
  76. + * css/CSSMutableStyleDeclaration.cpp:
  77. + * css/CSSParser.cpp:
  78. + (WebCore::cssPropertyID):
  79. + (WebCore::cssValueKeywordID):
  80. + * css/CSSPrimitiveValue.cpp:
  81. + * css/CSSProperty.cpp:
  82. + * css/CSSStyleDeclaration.cpp:
  83. + * css/makeprop.pl:
  84. + * css/makevalues.pl:
  85. + * html/DocTypeStrings.gperf:
  86. + * html/HTMLDocument.cpp:
  87. + * html/HTMLEntityNames.gperf:
  88. + * html/HTMLTokenizer.cpp:
  89. + * html/PreloadScanner.cpp:
  90. + * make-hash-tools.pl: Added.
  91. + * page/animation/ImplicitAnimation.cpp:
  92. + * platform/ColorData.gperf:
  93. + * platform/graphics/Color.cpp:
  94. +
  95. 2010-05-11 Benjamin Poulain <benjamin.poulain@nokia.com>
  96.  
  97. Reviewed by Kenneth Rohde Christiansen.
  98. diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
  99. index c267a6e..839e328 100644
  100. --- a/WebCore/DerivedSources.make
  101. +++ b/WebCore/DerivedSources.make
  102. @@ -462,10 +462,10 @@ all : \
  103. CSSGrammar.cpp \
  104. CSSPropertyNames.h \
  105. CSSValueKeywords.h \
  106. - ColorData.c \
  107. - DocTypeStrings.cpp \
  108. + ColorDataImpl.cpp \
  109. + DocTypeStringsImpl.cpp \
  110. HTMLElementFactory.cpp \
  111. - HTMLEntityNames.c \
  112. + HTMLEntityNamesImpl.cpp \
  113. HTMLNames.cpp \
  114. WMLElementFactory.cpp \
  115. WMLNames.cpp \
  116. @@ -553,22 +553,22 @@ CSSValueKeywords.h : $(WEBCORE_CSS_VALUE_KEYWORDS) css/makevalues.pl
  117.  
  118. # DOCTYPE strings
  119.  
  120. -DocTypeStrings.cpp : html/DocTypeStrings.gperf
  121. - gperf -CEot -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $< > $@
  122. +DocTypeStringsImpl.cpp : html/DocTypeStrings.gperf $(WebCore)/make-hash-tools.pl
  123. + perl $(WebCore)/make-hash-tools.pl doctype . $(WebCore)/html/DocTypeStrings.gperf
  124.  
  125. # --------
  126.  
  127. # HTML entity names
  128.  
  129. -HTMLEntityNames.c : html/HTMLEntityNames.gperf
  130. - gperf -a -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 $< > $@
  131. +HTMLEntityNamesImpl.cpp : html/HTMLEntityNames.gperf $(WebCore)/make-hash-tools.pl
  132. + perl $(WebCore)/make-hash-tools.pl entities . $(WebCore)/html/HTMLEntityNames.gperf
  133.  
  134. # --------
  135.  
  136. # color names
  137.  
  138. -ColorData.c : platform/ColorData.gperf
  139. - gperf -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 $< > $@
  140. +ColorDataImpl.cpp : platform/ColorData.gperf $(WebCore)/make-hash-tools.pl
  141. + perl $(WebCore)/make-hash-tools.pl colordata . $(WebCore)/platform/ColorData.gperf
  142.  
  143. # --------
  144.  
  145. diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
  146. index 4882e82..63d06c2 100644
  147. --- a/WebCore/GNUmakefile.am
  148. +++ b/WebCore/GNUmakefile.am
  149. @@ -79,9 +79,9 @@ webcoregtk_cppflags += \
  150. -I$(srcdir)/WebCore/platform/network/soup
  151.  
  152. webcore_built_nosources += \
  153. - DerivedSources/DocTypeStrings.cpp \
  154. + DerivedSources/DocTypeStringsImpl.cpp \
  155. DerivedSources/tokenizer.cpp \
  156. - DerivedSources/ColorData.c \
  157. + DerivedSources/ColorDataImpl.cpp \
  158. DerivedSources/webkit/webkitdomdummy.c
  159.  
  160. webcore_built_sources += \
  161. @@ -90,7 +90,7 @@ webcore_built_sources += \
  162. DerivedSources/CSSPropertyNames.h \
  163. DerivedSources/CSSValueKeywords.h \
  164. DerivedSources/HTMLElementFactory.cpp \
  165. - DerivedSources/HTMLEntityNames.c \
  166. + DerivedSources/HTMLEntityNamesImpl.cpp \
  167. DerivedSources/HTMLNames.cpp \
  168. DerivedSources/JSHTMLElementWrapperFactory.cpp \
  169. DerivedSources/UserAgentStyleSheets.h \
  170. @@ -3677,27 +3677,30 @@ DerivedSources/CSSPropertyNames.h: $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/
  171. if sort $(WEBCORE_CSS_PROPERTY_NAMES) | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
  172. cat $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in
  173. $(PERL) "$(WebCore)/css/makeprop.pl"
  174. - mv CSSPropertyNames.* $(GENSOURCES)
  175. + mv CSSPropertyNames.h $(GENSOURCES)
  176. + mv CSSPropertyNamesImpl.cpp $(GENSOURCES)
  177. + mv CSSPropertyNamesHash.hpp $(GENSOURCES)
  178.  
  179. # Lower case all the values, as CSS values are case-insensitive
  180. DerivedSources/CSSValueKeywords.h : $(WEBCORE_CSS_VALUE_KEYWORDS) $(WebCore)/css/makevalues.pl
  181. $(PERL) -ne 'print lc' $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in
  182. if sort CSSValueKeywords.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
  183. $(PERL) "$(WebCore)/css/makevalues.pl"
  184. - mv CSSValueKeywords.* $(GENSOURCES)
  185. + mv CSSValueKeywords.h $(GENSOURCES)
  186. + mv CSSValueKeywordsImpl.cpp $(GENSOURCES)
  187. + mv CSSValueKeywordsHash.hpp $(GENSOURCES)
  188.  
  189. # DOCTYPE strings
  190. -DerivedSources/DocTypeStrings.cpp : $(WebCore)/html/DocTypeStrings.gperf
  191. - $(AM_V_GEN)$(GPERF) -CEot -I -L ANSI-C -k "*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards $(WebCore)/html/DocTypeStrings.gperf > $@
  192. +DerivedSources/DocTypeStringsImpl.cpp : $(WebCore)/html/DocTypeStrings.gperf $(WebCore)/make-hash-tools.pl
  193. + $(PERL) $(WebCore)/make-hash-tools.pl doctype $(GENSOURCES) $(WebCore)/html/DocTypeStrings.gperf
  194.  
  195. # HTML entity names
  196. -DerivedSources/HTMLEntityNames.c : $(WebCore)/html/HTMLEntityNames.gperf
  197. - $(AM_V_GEN)$(GPERF) -a -I -L ANSI-C -C -G -c -o -t -k '*' -N findEntity -D -s 2 \
  198. - $(WebCore)/html/HTMLEntityNames.gperf > $@
  199. +DerivedSources/HTMLEntityNamesImpl.cpp : $(WebCore)/html/HTMLEntityNames.gperf $(WebCore)/make-hash-tools.pl
  200. + $(PERL) $(WebCore)/make-hash-tools.pl entities $(GENSOURCES) $(WebCore)/html/HTMLEntityNames.gperf
  201.  
  202. # color names
  203. -DerivedSources/ColorData.c: $(WebCore)/platform/ColorData.gperf
  204. - $(AM_V_GEN)$(GPERF) -CDEot -L ANSI-C -k '*' -N findColor -D -s 2 $< > $@
  205. +DerivedSources/ColorDataImpl.cpp: $(WebCore)/platform/ColorData.gperf $(WebCore)/make-hash-tools.pl
  206. + $(PERL) $(WebCore)/make-hash-tools.pl colordata $(GENSOURCES) $(WebCore)/platform/ColorData.gperf
  207.  
  208. # CSS tokenizer
  209. DerivedSources/tokenizer.cpp : $(WebCore)/css/tokenizer.flex $(WebCore)/css/maketokenizer
  210. diff --git a/WebCore/WebCore.gyp/WebCore.gyp b/WebCore/WebCore.gyp/WebCore.gyp
  211. index adf6d94..b577f72 100644
  212. --- a/WebCore/WebCore.gyp/WebCore.gyp
  213. +++ b/WebCore/WebCore.gyp/WebCore.gyp
  214. @@ -288,7 +288,8 @@
  215. '../css/CSSPropertyNames.in',
  216. ],
  217. 'outputs': [
  218. - '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
  219. + '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.hpp',
  220. + '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNamesImpl.cpp',
  221. '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.h',
  222. ],
  223. 'action': [
  224. @@ -313,7 +314,8 @@
  225. '../css/CSSValueKeywords.in',
  226. ],
  227. 'outputs': [
  228. - '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.c',
  229. + '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.hpp',
  230. + '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywordsImpl.cpp',
  231. '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.h',
  232. ],
  233. 'action': [
  234. @@ -530,18 +532,11 @@
  235. {
  236. 'rule_name': 'gperf',
  237. 'extension': 'gperf',
  238. - # gperf output is only ever #included by other source files. As
  239. - # such, process_outputs_as_sources is off. Some gperf output is
  240. - # #included as *.c and some as *.cpp. Since there's no way to tell
  241. - # which one will be needed in a rule definition, declare both as
  242. - # outputs. The harness script will generate one file and copy it to
  243. - # the other.
  244. #
  245. - # This rule places outputs in SHARED_INTERMEDIATE_DIR because glue
  246. - # needs access to HTMLEntityNames.c.
  247. + # gperf outputs are generated by WebCore/make-hash-tools.pl
  248. + #
  249. 'outputs': [
  250. - '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).c',
  251. - '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
  252. + '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT)Impl.cpp',
  253. ],
  254. 'action': [
  255. 'python',
  256. @@ -549,7 +544,6 @@
  257. '<(RULE_INPUT_PATH)',
  258. '<(SHARED_INTERMEDIATE_DIR)/webkit'
  259. ],
  260. - 'process_outputs_as_sources': 0,
  261. },
  262. # Rule to build generated JavaScript (V8) bindings from .idl source.
  263. {
  264. diff --git a/WebCore/WebCore.gyp/scripts/action_csspropertynames.py b/WebCore/WebCore.gyp/scripts/action_csspropertynames.py
  265. index 60314d7..0196ae3 100644
  266. --- a/WebCore/WebCore.gyp/scripts/action_csspropertynames.py
  267. +++ b/WebCore/WebCore.gyp/scripts/action_csspropertynames.py
  268. @@ -33,8 +33,8 @@
  269. #
  270. # usage: action_makenames.py OUTPUTS -- INPUTS
  271. #
  272. -# Exactly two outputs must be specified: a path to each of CSSPropertyNames.cpp
  273. -# and CSSPropertyNames.h.
  274. +# Exactly three outputs must be specified: a path to each of CSSPropertyNamesImpl.cpp,
  275. +# CSSPropertyNames.hpp and CSSPropertyNames.h.
  276. #
  277. # Multiple inputs may be specified. One input must have a basename of
  278. # makeprop.pl; this is taken as the path to makeprop.pl. All other inputs are
  279. diff --git a/WebCore/WebCore.gyp/scripts/action_cssvaluekeywords.py b/WebCore/WebCore.gyp/scripts/action_cssvaluekeywords.py
  280. index ebf895b..398d74b 100644
  281. --- a/WebCore/WebCore.gyp/scripts/action_cssvaluekeywords.py
  282. +++ b/WebCore/WebCore.gyp/scripts/action_cssvaluekeywords.py
  283. @@ -37,8 +37,8 @@
  284. #
  285. # usage: action_cssvaluekeywords.py OUTPUTS -- INPUTS
  286. #
  287. -# Exactly two outputs must be specified: a path to each of CSSValueKeywords.c
  288. -# and CSSValueKeywords.h.
  289. +# Exactly three outputs must be specified: a path to each of CSSValueKeywordsImpl.cpp,
  290. +# CSSValueKeywords.hpp, and CSSValueKeywords.h.
  291. #
  292. # Multiple inputs may be specified. One input must have a basename of
  293. # makevalues.pl; this is taken as the path to makevalues.pl. All other inputs
  294. diff --git a/WebCore/WebCore.gyp/scripts/rule_gperf.py b/WebCore/WebCore.gyp/scripts/rule_gperf.py
  295. index e76ed6f..ceeeab3 100644
  296. --- a/WebCore/WebCore.gyp/scripts/rule_gperf.py
  297. +++ b/WebCore/WebCore.gyp/scripts/rule_gperf.py
  298. @@ -40,7 +40,6 @@
  299. # to .c when done.
  300.  
  301. import posixpath
  302. -import shutil
  303. import subprocess
  304. import sys
  305.  
  306. @@ -50,36 +49,23 @@ inputFile = sys.argv[1]
  307. outputDir = sys.argv[2]
  308.  
  309. gperfCommands = {
  310. - 'DocTypeStrings.gperf': [
  311. - '-CEot', '-L', 'ANSI-C', '-k*', '-N', 'findDoctypeEntry',
  312. - '-F', ',PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards'
  313. - ],
  314. - 'HTMLEntityNames.gperf': [
  315. - '-a', '-L', 'ANSI-C', '-C', '-G', '-c', '-o', '-t', '-k*',
  316. - '-N', 'findEntity', '-D', '-s', '2'
  317. - ],
  318. - 'ColorData.gperf': [
  319. - '-CDEot', '-L', 'ANSI-C', '-k*', '-N', 'findColor', '-D', '-s', '2'
  320. - ],
  321. + 'DocTypeStrings.gperf': doctype,
  322. + 'HTMLEntityNames.gperf': entities,
  323. + 'ColorData.gperf': colordata,
  324. }
  325.  
  326. inputName = posixpath.basename(inputFile)
  327. assert inputName in gperfCommands
  328.  
  329. (inputRoot, inputExt) = posixpath.splitext(inputName)
  330. -outputCpp = posixpath.join(outputDir, inputRoot + '.cpp')
  331.  
  332. -#command = ['gperf', '--output-file', outputCpp]
  333. -command = ['gperf']
  334. -command.extend(gperfCommands[inputName])
  335. +command = ['perl']
  336. +command.append(gperfCommands[inputName])
  337. +command.append(outputDir)
  338. command.append(inputFile)
  339.  
  340. -ofile = open(outputCpp, 'w')
  341. -
  342. # Do it. check_call is new in 2.5, so simulate its behavior with call and
  343. # assert.
  344. -returnCode = subprocess.call(command, stdout=ofile.fileno())
  345. +returnCode = subprocess.call(command)
  346. assert returnCode == 0
  347.  
  348. -outputC = posixpath.join(outputDir, inputRoot + '.c')
  349. -shutil.copyfile(outputCpp, outputC)
  350. diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
  351. index ee69994..8f4a3d4 100644
  352. --- a/WebCore/WebCore.pri
  353. +++ b/WebCore/WebCore.pri
  354. @@ -177,7 +177,7 @@ XLINK_NAMES = $$PWD/svg/xlinkattrs.in
  355.  
  356. TOKENIZER = $$PWD/css/tokenizer.flex
  357.  
  358. -DOCTYPESTRINGS = $$PWD/html/DocTypeStrings.gperf
  359. +DOCTYPESTRINGS_GPERF = $$PWD/html/DocTypeStrings.gperf
  360.  
  361. CSSBISON = $$PWD/css/CSSGrammar.y
  362.  
  363. @@ -189,7 +189,7 @@ XMLNS_NAMES = $$PWD/xml/xmlnsattrs.in
  364.  
  365. ENTITIES_GPERF = $$PWD/html/HTMLEntityNames.gperf
  366.  
  367. -COLORDAT_GPERF = $$PWD/platform/ColorData.gperf
  368. +COLORDATA_GPERF = $$PWD/platform/ColorData.gperf
  369.  
  370. WALDOCSSPROPS = $$PWD/css/CSSPropertyNames.in
  371.  
  372. @@ -646,17 +646,17 @@ xlinknames.input = XLINK_NAMES
  373. addExtraCompiler(xlinknames)
  374.  
  375. # GENERATOR 6-A:
  376. -cssprops.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
  377. -cssprops.input = WALDOCSSPROPS
  378. cssprops.wkScript = $$PWD/css/makeprop.pl
  379. +cssprops.output = $${WC_GENERATED_SOURCES_DIR}/CSSPropertyNamesImpl.cpp
  380. +cssprops.input = WALDOCSSPROPS
  381. cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$cssprops.wkScript && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
  382. cssprops.depends = ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES}
  383. addExtraCompiler(cssprops)
  384.  
  385. # GENERATOR 6-B:
  386. -cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.c
  387. -cssvalues.input = WALDOCSSVALUES
  388. cssvalues.wkScript = $$PWD/css/makevalues.pl
  389. +cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/CSSValueKeywordsImpl.cpp
  390. +cssvalues.input = WALDOCSSVALUES
  391. cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$cssvalues.wkScript && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
  392. cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES}
  393. cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.h
  394. @@ -712,24 +712,28 @@ xmlnames.wkScript = $$PWD/dom/make_names.pl
  395. xmlnames.commands = perl -I$$PWD/bindings/scripts $$xmlnames.wkScript --attrs $$PWD/xml/xmlattrs.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir $$WC_GENERATED_SOURCES_DIR
  396. addExtraCompiler(xmlnames)
  397.  
  398. -# GENERATOR 8-A:
  399. -entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.c
  400. +# GENERATOR 8-entities:
  401. +entities.wkScript = $$PWD/make-hash-tools.pl
  402. +entities.output = $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNamesImpl.cpp
  403. entities.input = ENTITIES_GPERF
  404. -entities.commands = gperf -a -L ANSI-C -C -G -c -o -t --includes --key-positions="*" -N findEntity -D -s 2 < $$PWD/html/HTMLEntityNames.gperf > $${WC_GENERATED_SOURCES_DIR}/HTMLEntityNames.c
  405. +entities.commands = perl $$entities.wkScript entities $${WC_GENERATED_SOURCES_DIR} $$ENTITIES_GPERF
  406. entities.clean = ${QMAKE_FILE_OUT}
  407. addExtraCompiler(entities)
  408.  
  409. -# GENERATOR 8-B:
  410. -doctypestrings.output = $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.cpp
  411. -doctypestrings.input = DOCTYPESTRINGS
  412. -doctypestrings.commands = gperf -CEot -L ANSI-C --includes --key-positions="*" -N findDoctypeEntry -F ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
  413. -doctypestrings.clean = ${QMAKE_FILE_OUT}
  414. -addExtraCompiler(doctypestrings)
  415. -
  416. -# GENERATOR 8-C:
  417. -colordata.output = $${WC_GENERATED_SOURCES_DIR}/ColorData.c
  418. -colordata.input = COLORDAT_GPERF
  419. -colordata.commands = gperf -CDEot -L ANSI-C --includes --key-positions="*" -N findColor -D -s 2 < ${QMAKE_FILE_NAME} >> ${QMAKE_FILE_OUT}
  420. +# GENERATOR 8-doctype:
  421. +doctype.wkScript = $$PWD/make-hash-tools.pl
  422. +doctype.output = $${WC_GENERATED_SOURCES_DIR}/DocTypeStringsImpl.cpp
  423. +doctype.input = DOCTYPESTRINGS_GPERF
  424. +doctype.commands = perl $$doctype.wkScript doctype $${WC_GENERATED_SOURCES_DIR} $$DOCTYPESTRINGS_GPERF
  425. +doctype.clean = ${QMAKE_FILE_OUT}
  426. +addExtraCompiler(doctype)
  427. +
  428. +# GENERATOR 8-colordata:
  429. +colordata.wkScript = $$PWD/make-hash-tools.pl
  430. +colordata.output = $${WC_GENERATED_SOURCES_DIR}/ColorDataImpl.cpp
  431. +colordata.input = COLORDATA_GPERF
  432. +colordata.commands = perl $$colordata.wkScript colordata $${WC_GENERATED_SOURCES_DIR} $$COLORDATA_GPERF
  433. +colordata.clean = ${QMAKE_FILE_OUT}
  434. addExtraCompiler(colordata)
  435.  
  436. # GENERATOR 9:
  437. diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
  438. index a8f1b3b..3a5360e 100644
  439. --- a/WebCore/WebCore.xcodeproj/project.pbxproj
  440. +++ b/WebCore/WebCore.xcodeproj/project.pbxproj
  441. @@ -4903,8 +4903,13 @@
  442. E1F1E8300C3C2BB9006DB391 /* XSLTExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = E1F1E82E0C3C2BB9006DB391 /* XSLTExtensions.h */; };
  443. E1FF57A30F01255B00891EBB /* ThreadGlobalData.h in Headers */ = {isa = PBXBuildFile; fileRef = E1FF57A20F01255B00891EBB /* ThreadGlobalData.h */; settings = {ATTRIBUTES = (Private, ); }; };
  444. E1FF57A60F01256B00891EBB /* ThreadGlobalData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1FF57A50F01256B00891EBB /* ThreadGlobalData.cpp */; };
  445. + E406F3FC1198313C009D59D6 /* ColorDataImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E406F3FB1198307D009D59D6 /* ColorDataImpl.cpp */; };
  446. + E406F3FD1198313F009D59D6 /* DocTypeStringsImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E406F3FA1198304D009D59D6 /* DocTypeStringsImpl.cpp */; };
  447. + E406F403119832A5009D59D6 /* HTMLEntityNamesImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E406F4021198329A009D59D6 /* HTMLEntityNamesImpl.cpp */; };
  448. E415F1690D9A165D0033CE97 /* DOMElementTimeControl.h in Headers */ = {isa = PBXBuildFile; fileRef = E415F1680D9A165D0033CE97 /* DOMElementTimeControl.h */; };
  449. E415F1840D9A1A830033CE97 /* ElementTimeControl.h in Headers */ = {isa = PBXBuildFile; fileRef = E415F1830D9A1A830033CE97 /* ElementTimeControl.h */; };
  450. + E41EA03A1198377300710BC5 /* CSSPropertyNamesImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E41EA038119836DB00710BC5 /* CSSPropertyNamesImpl.cpp */; };
  451. + E41EA03B1198377900710BC5 /* CSSValueKeywordsImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E41EA0391198374900710BC5 /* CSSValueKeywordsImpl.cpp */; };
  452. E44613A10CD6331000FADA75 /* HTMLAudioElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E446138F0CD6331000FADA75 /* HTMLAudioElement.cpp */; };
  453. E44613A20CD6331000FADA75 /* HTMLAudioElement.h in Headers */ = {isa = PBXBuildFile; fileRef = E44613900CD6331000FADA75 /* HTMLAudioElement.h */; };
  454. E44613A40CD6331000FADA75 /* HTMLMediaElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E44613920CD6331000FADA75 /* HTMLMediaElement.cpp */; };
  455. @@ -6784,18 +6789,13 @@
  456. 65653F2A0D9727D200CA9723 /* SVGAltGlyphElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAltGlyphElement.cpp; sourceTree = "<group>"; };
  457. 65653F2B0D9727D200CA9723 /* SVGAltGlyphElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAltGlyphElement.h; sourceTree = "<group>"; };
  458. 65653F2C0D9727D200CA9723 /* SVGAltGlyphElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGAltGlyphElement.idl; sourceTree = "<group>"; };
  459. - 656580ED09D12B20000E61D7 /* CSSPropertyNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPropertyNames.cpp; sourceTree = "<group>"; };
  460. 656580EE09D12B20000E61D7 /* CSSPropertyNames.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSPropertyNames.gperf; sourceTree = "<group>"; };
  461. 656580EF09D12B20000E61D7 /* CSSPropertyNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSPropertyNames.h; sourceTree = "<group>"; };
  462. - 6565811C09D12DB2000E61D7 /* DocTypeStrings.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DocTypeStrings.cpp; sourceTree = "<group>"; };
  463. 6565814409D13043000E61D7 /* CSSGrammar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSGrammar.cpp; sourceTree = "<group>"; };
  464. - 6565814609D13043000E61D7 /* CSSValueKeywords.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = CSSValueKeywords.c; sourceTree = "<group>"; };
  465. 6565814709D13043000E61D7 /* CSSValueKeywords.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSValueKeywords.gperf; sourceTree = "<group>"; };
  466. 6565814809D13043000E61D7 /* CSSValueKeywords.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSValueKeywords.h; sourceTree = "<group>"; };
  467. - 6565814B09D13043000E61D7 /* HTMLEntityNames.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = HTMLEntityNames.c; sourceTree = "<group>"; };
  468. 6565814C09D13043000E61D7 /* tokenizer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = tokenizer.cpp; sourceTree = "<group>"; };
  469. 656581AC09D14EE6000E61D7 /* CharsetData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CharsetData.cpp; sourceTree = "<group>"; };
  470. - 656581AD09D14EE6000E61D7 /* ColorData.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = ColorData.c; sourceTree = "<group>"; };
  471. 656581AE09D14EE6000E61D7 /* UserAgentStyleSheets.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = UserAgentStyleSheets.h; sourceTree = "<group>"; };
  472. 656581AF09D14EE6000E61D7 /* UserAgentStyleSheetsData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = UserAgentStyleSheetsData.cpp; sourceTree = "<group>"; };
  473. 656581E609D1508D000E61D7 /* SVGElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGElementFactory.cpp; sourceTree = "<group>"; };
  474. @@ -10365,9 +10365,14 @@
  475. E1F1E82E0C3C2BB9006DB391 /* XSLTExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSLTExtensions.h; sourceTree = "<group>"; };
  476. E1FF57A20F01255B00891EBB /* ThreadGlobalData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadGlobalData.h; sourceTree = "<group>"; };
  477. E1FF57A50F01256B00891EBB /* ThreadGlobalData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadGlobalData.cpp; sourceTree = "<group>"; };
  478. + E406F3FA1198304D009D59D6 /* DocTypeStringsImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DocTypeStringsImpl.cpp; path = ../WebKitBuild/Release/DerivedSources/WebCore/DocTypeStringsImpl.cpp; sourceTree = SOURCE_ROOT; };
  479. + E406F3FB1198307D009D59D6 /* ColorDataImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ColorDataImpl.cpp; path = ../WebKitBuild/Release/DerivedSources/WebCore/ColorDataImpl.cpp; sourceTree = SOURCE_ROOT; };
  480. + E406F4021198329A009D59D6 /* HTMLEntityNamesImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLEntityNamesImpl.cpp; path = ../WebKitBuild/Release/DerivedSources/WebCore/HTMLEntityNamesImpl.cpp; sourceTree = SOURCE_ROOT; };
  481. E415F10C0D9A05870033CE97 /* ElementTimeControl.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ElementTimeControl.idl; sourceTree = "<group>"; };
  482. E415F1680D9A165D0033CE97 /* DOMElementTimeControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMElementTimeControl.h; sourceTree = "<group>"; };
  483. E415F1830D9A1A830033CE97 /* ElementTimeControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementTimeControl.h; sourceTree = "<group>"; };
  484. + E41EA038119836DB00710BC5 /* CSSPropertyNamesImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSPropertyNamesImpl.cpp; path = ../WebKitBuild/Release/DerivedSources/WebCore/CSSPropertyNamesImpl.cpp; sourceTree = SOURCE_ROOT; };
  485. + E41EA0391198374900710BC5 /* CSSValueKeywordsImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CSSValueKeywordsImpl.cpp; path = ../WebKitBuild/Release/DerivedSources/WebCore/CSSValueKeywordsImpl.cpp; sourceTree = SOURCE_ROOT; };
  486. E446138F0CD6331000FADA75 /* HTMLAudioElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLAudioElement.cpp; sourceTree = "<group>"; };
  487. E44613900CD6331000FADA75 /* HTMLAudioElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLAudioElement.h; sourceTree = "<group>"; };
  488. E44613910CD6331000FADA75 /* HTMLAudioElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLAudioElement.idl; sourceTree = "<group>"; };
  489. @@ -11634,20 +11639,20 @@
  490. 656580EC09D12B20000E61D7 /* Derived Sources */ = {
  491. isa = PBXGroup;
  492. children = (
  493. + E41EA0391198374900710BC5 /* CSSValueKeywordsImpl.cpp */,
  494. + E41EA038119836DB00710BC5 /* CSSPropertyNamesImpl.cpp */,
  495. + E406F4021198329A009D59D6 /* HTMLEntityNamesImpl.cpp */,
  496. + E406F3FB1198307D009D59D6 /* ColorDataImpl.cpp */,
  497. + E406F3FA1198304D009D59D6 /* DocTypeStringsImpl.cpp */,
  498. 656581AC09D14EE6000E61D7 /* CharsetData.cpp */,
  499. - 656581AD09D14EE6000E61D7 /* ColorData.c */,
  500. 6565814409D13043000E61D7 /* CSSGrammar.cpp */,
  501. 650F53DB09D15DDA00C9B0C8 /* CSSGrammar.h */,
  502. - 656580ED09D12B20000E61D7 /* CSSPropertyNames.cpp */,
  503. 656580EE09D12B20000E61D7 /* CSSPropertyNames.gperf */,
  504. 656580EF09D12B20000E61D7 /* CSSPropertyNames.h */,
  505. - 6565814609D13043000E61D7 /* CSSValueKeywords.c */,
  506. 6565814709D13043000E61D7 /* CSSValueKeywords.gperf */,
  507. 6565814809D13043000E61D7 /* CSSValueKeywords.h */,
  508. - 6565811C09D12DB2000E61D7 /* DocTypeStrings.cpp */,
  509. A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */,
  510. A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */,
  511. - 6565814B09D13043000E61D7 /* HTMLEntityNames.c */,
  512. A8D06B380A265DCD005E7203 /* HTMLNames.cpp */,
  513. A8D06B370A265DCD005E7203 /* HTMLNames.h */,
  514. 938E65F609F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp */,
  515. @@ -21405,6 +21410,11 @@
  516. C5F4F40C119306AC00FDFADD /* JSIDBRequest.cpp in Sources */,
  517. C5F4F410119306C000FDFADD /* JSIndexedDatabaseRequest.cpp in Sources */,
  518. C5956678119324C600FDCE47 /* JSIDBRequestCustom.cpp in Sources */,
  519. + E406F3FC1198313C009D59D6 /* ColorDataImpl.cpp in Sources */,
  520. + E406F3FD1198313F009D59D6 /* DocTypeStringsImpl.cpp in Sources */,
  521. + E406F403119832A5009D59D6 /* HTMLEntityNamesImpl.cpp in Sources */,
  522. + E41EA03A1198377300710BC5 /* CSSPropertyNamesImpl.cpp in Sources */,
  523. + E41EA03B1198377900710BC5 /* CSSValueKeywordsImpl.cpp in Sources */,
  524. );
  525. runOnlyForDeploymentPostprocessing = 0;
  526. };
  527. diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
  528. index ba503b8..b72ece6 100644
  529. --- a/WebCore/css/CSSComputedStyleDeclaration.cpp
  530. +++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
  531. @@ -36,6 +36,7 @@
  532. #include "CSSValueList.h"
  533. #include "Document.h"
  534. #include "ExceptionCode.h"
  535. +#include "HashTools.h"
  536. #include "Rect.h"
  537. #include "RenderBox.h"
  538. #include "RenderLayer.h"
  539. diff --git a/WebCore/css/CSSMutableStyleDeclaration.cpp b/WebCore/css/CSSMutableStyleDeclaration.cpp
  540. index 7c09f91..738cf7b 100644
  541. --- a/WebCore/css/CSSMutableStyleDeclaration.cpp
  542. +++ b/WebCore/css/CSSMutableStyleDeclaration.cpp
  543. @@ -31,6 +31,7 @@
  544. #include "CSSValueList.h"
  545. #include "Document.h"
  546. #include "ExceptionCode.h"
  547. +#include "HashTools.h"
  548. #include "StyledElement.h"
  549.  
  550. using namespace std;
  551. diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
  552. index 6f7cf12..3296370 100644
  553. --- a/WebCore/css/CSSParser.cpp
  554. +++ b/WebCore/css/CSSParser.cpp
  555. @@ -61,6 +61,7 @@
  556. #include "FloatConversion.h"
  557. #include "FontFamilyValue.h"
  558. #include "FontValue.h"
  559. +#include "HashTools.h"
  560. #include "MediaList.h"
  561. #include "MediaQueryExp.h"
  562. #include "Pair.h"
  563. @@ -88,9 +89,6 @@ extern int cssyyparse(void* parser);
  564. using namespace std;
  565. using namespace WTF;
  566.  
  567. -#include "CSSPropertyNames.cpp"
  568. -#include "CSSValueKeywords.c"
  569. -
  570. namespace WebCore {
  571.  
  572. static const unsigned INVALID_NUM_PARSED_PROPERTIES = UINT_MAX;
  573. @@ -5526,7 +5524,7 @@ static int cssPropertyID(const UChar* propertyName, unsigned length)
  574. }
  575. }
  576.  
  577. - const props* hashTableEntry = findProp(name, length);
  578. + const Property* hashTableEntry = findProperty(name, length);
  579. return hashTableEntry ? hashTableEntry->id : 0;
  580. }
  581.  
  582. @@ -5568,7 +5566,7 @@ int cssValueKeywordID(const CSSParserString& string)
  583. }
  584. }
  585.  
  586. - const css_value* hashTableEntry = findValue(buffer, length);
  587. + const Value* hashTableEntry = findValue(buffer, length);
  588. return hashTableEntry ? hashTableEntry->id : 0;
  589. }
  590.  
  591. diff --git a/WebCore/css/CSSPrimitiveValue.cpp b/WebCore/css/CSSPrimitiveValue.cpp
  592. index 210d6f5..337f0c5 100644
  593. --- a/WebCore/css/CSSPrimitiveValue.cpp
  594. +++ b/WebCore/css/CSSPrimitiveValue.cpp
  595. @@ -29,6 +29,7 @@
  596. #include "Color.h"
  597. #include "Counter.h"
  598. #include "ExceptionCode.h"
  599. +#include "HashTools.h"
  600. #include "Node.h"
  601. #include "Pair.h"
  602. #include "RGBColor.h"
  603. diff --git a/WebCore/css/CSSProperty.cpp b/WebCore/css/CSSProperty.cpp
  604. index d7f2175..9c8a51a 100644
  605. --- a/WebCore/css/CSSProperty.cpp
  606. +++ b/WebCore/css/CSSProperty.cpp
  607. @@ -22,6 +22,7 @@
  608. #include "CSSProperty.h"
  609.  
  610. #include "CSSPropertyNames.h"
  611. +#include "HashTools.h"
  612. #include "PlatformString.h"
  613.  
  614. namespace WebCore {
  615. diff --git a/WebCore/css/CSSStyleDeclaration.cpp b/WebCore/css/CSSStyleDeclaration.cpp
  616. index 404a978..e45d2ff 100644
  617. --- a/WebCore/css/CSSStyleDeclaration.cpp
  618. +++ b/WebCore/css/CSSStyleDeclaration.cpp
  619. @@ -26,6 +26,7 @@
  620. #include "CSSProperty.h"
  621. #include "CSSPropertyNames.h"
  622. #include "CSSRule.h"
  623. +#include "HashTools.h"
  624. #include <wtf/ASCIICType.h>
  625.  
  626. using namespace WTF;
  627. diff --git a/WebCore/css/makeprop.pl b/WebCore/css/makeprop.pl
  628. index 115969f..ef6a277 100644
  629. --- a/WebCore/css/makeprop.pl
  630. +++ b/WebCore/css/makeprop.pl
  631. @@ -5,6 +5,7 @@
  632. # Copyright (C) 1999 Waldo Bastian (bastian@kde.org)
  633. # Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
  634. # Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
  635. +# Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged
  636. #
  637. # This library is free software; you can redistribute it and/or
  638. # modify it under the terms of the GNU Library General Public
  639. @@ -37,12 +38,19 @@ open GPERF, ">CSSPropertyNames.gperf" || die "Could not open CSSPropertyNames.gp
  640. print GPERF << "EOF";
  641. %{
  642. /* This file is automatically generated from CSSPropertyNames.in by makeprop, do not edit */
  643. -#include \"CSSPropertyNames.h\"
  644. %}
  645. -struct props {
  646. - const char* name;
  647. - int id;
  648. -};
  649. +%struct-type
  650. +struct Property;
  651. +%omit-struct-type
  652. +%language=C++
  653. +%readonly-tables
  654. +%global-table
  655. +%compare-strncmp
  656. +%define class-name CSSPropertyNamesHash
  657. +%define lookup-function-name findPropertyImpl
  658. +%define hash-function-name propery_hash_function
  659. +%includes
  660. +%enum
  661. %%
  662. EOF
  663.  
  664. @@ -57,6 +65,7 @@ close GPERF;
  665. open HEADER, ">CSSPropertyNames.h" || die "Could not open CSSPropertyNames.h for writing";
  666. print HEADER << "EOF";
  667. /* This file is automatically generated from CSSPropertyNames.in by makeprop, do not edit */
  668. +#include "wtf/text/CString.h"
  669.  
  670. #ifndef CSSPropertyNames_h
  671. #define CSSPropertyNames_h
  672. @@ -86,16 +95,14 @@ print HEADER "const size_t maxCSSPropertyNameLength = $maxLen;\n";
  673.  
  674. print HEADER << "EOF";
  675.  
  676. -const char* getPropertyName(CSSPropertyID);
  677. -
  678. -#endif
  679. +#endif // CSSPropertyNames_h
  680. EOF
  681.  
  682. close HEADER;
  683.  
  684. -system("gperf -a -L ANSI-C -E -C -c -o -t --key-positions=\"*\" -NfindProp -Hhash_prop -Wwordlist_prop -D -s 2 CSSPropertyNames.gperf > CSSPropertyNames.cpp") == 0 || die "calling gperf failed: $?";
  685. +system("gperf --key-positions=\"*\" -D -s 2 CSSPropertyNames.gperf > CSSPropertyNamesHash.hpp") == 0 || die "calling gperf failed: $?";
  686.  
  687. -open C, ">>CSSPropertyNames.cpp" || die "Could not open CSSPropertyNames.cpp for writing";
  688. +open C, ">>CSSPropertyNamesHash.hpp" || die "Could not open CSSPropertyNamesHash.hpp for writing";
  689. print C "static const char * const propertyNameStrings[$num] = {\n";
  690.  
  691. foreach my $name (@names) {
  692. @@ -104,6 +111,28 @@ foreach my $name (@names) {
  693.  
  694. print C << "EOF";
  695. };
  696. +
  697. +EOF
  698. +
  699. +close C;
  700. +
  701. +my $propertyNamesImpl = "CSSPropertyNamesImpl.cpp";
  702. +
  703. +open PROPERTYNAMES, ">$propertyNamesImpl" || die "Could not open $propertyNamesImpl for writing";
  704. +print PROPERTYNAMES << "EOF";
  705. +/* This file is automatically generated by make-hash-tools.pl, do not edit */
  706. +
  707. +#include "config.h"
  708. +#include "HashTools.h"
  709. +
  710. +namespace WebCore {
  711. +#include "CSSPropertyNamesHash.hpp"
  712. +
  713. +const Property* findProperty (register const char* str, register unsigned int len)
  714. +{
  715. + return CSSPropertyNamesHash::findPropertyImpl(str, len);
  716. +}
  717. +
  718. const char* getPropertyName(CSSPropertyID id)
  719. {
  720. if (id < firstCSSProperty)
  721. @@ -113,7 +142,9 @@ const char* getPropertyName(CSSPropertyID id)
  722. return 0;
  723. return propertyNameStrings[index];
  724. }
  725. -EOF
  726.  
  727. -close C;
  728. +}
  729. +
  730. +EOF
  731. +close PROPERTYNAMES;
  732.  
  733. diff --git a/WebCore/css/makevalues.pl b/WebCore/css/makevalues.pl
  734. index e49981d..6880de7 100644
  735. --- a/WebCore/css/makevalues.pl
  736. +++ b/WebCore/css/makevalues.pl
  737. @@ -5,6 +5,7 @@
  738. # Copyright (C) 1999 Waldo Bastian (bastian@kde.org)
  739. # Copyright (C) 2007 Apple Inc. All rights reserved.
  740. # Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
  741. +# Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged
  742. #
  743. # This library is free software; you can redistribute it and/or
  744. # modify it under the terms of the GNU Library General Public
  745. @@ -37,13 +38,19 @@ open GPERF, ">CSSValueKeywords.gperf" || die "Could not open CSSValueKeywords.gp
  746. print GPERF << "EOF";
  747. %{
  748. /* This file is automatically generated from CSSValueKeywords.in by makevalues, do not edit */
  749. -
  750. -#include \"CSSValueKeywords.h\"
  751. %}
  752. -struct css_value {
  753. - const char* name;
  754. - int id;
  755. -};
  756. +%struct-type
  757. +struct Value;
  758. +%omit-struct-type
  759. +%language=C++
  760. +%readonly-tables
  761. +%global-table
  762. +%compare-strncmp
  763. +%define class-name CSSValueKeywordsHash
  764. +%define lookup-function-name findValueImpl
  765. +%define hash-function-name value_hash_function
  766. +%includes
  767. +%enum
  768. %%
  769. EOF
  770.  
  771. @@ -58,9 +65,10 @@ close GPERF;
  772. open HEADER, ">CSSValueKeywords.h" || die "Could not open CSSValueKeywords.h for writing";
  773. print HEADER << "EOF";
  774. /* This file is automatically generated from CSSValueKeywords.in by makevalues, do not edit */
  775. +#include "wtf/text/CString.h"
  776.  
  777. -#ifndef CSSValues_h
  778. -#define CSSValues_h
  779. +#ifndef CSSValueKeywords_h
  780. +#define CSSValueKeywords_h
  781.  
  782. const int CSSValueInvalid = 0;
  783. EOF
  784. @@ -80,15 +88,14 @@ print HEADER "const int numCSSValueKeywords = " . $i . ";\n";
  785. print HEADER "const size_t maxCSSValueKeywordLength = " . $maxLen . ";\n";
  786. print HEADER << "EOF";
  787.  
  788. -const char* getValueName(unsigned short id);
  789.  
  790. -#endif
  791. +#endif // CSSValueKeywords_h
  792. EOF
  793. close HEADER;
  794.  
  795. -system("gperf -L ANSI-C -E -C -n -o -t --key-positions=\"*\" -NfindValue -Hhash_val -Wwordlist_value -D CSSValueKeywords.gperf > CSSValueKeywords.c") == 0 || die "calling gperf failed: $?";
  796. +system("gperf --key-positions=\"*\" -D -s 2 CSSValueKeywords.gperf > CSSValueKeywordsHash.hpp") == 0 || die "calling gperf failed: $?";
  797.  
  798. -open C, ">>CSSValueKeywords.c" || die "Could not open CSSValueKeywords.c for writing";
  799. +open C, ">>CSSValueKeywordsHash.hpp" || die "Could not open CSSValueKeywordsHash.hpp for writing";
  800. print C "static const char * const valueList[] = {\n";
  801. print C "\"\",\n";
  802. foreach my $name (@names) {
  803. @@ -97,12 +104,35 @@ foreach my $name (@names) {
  804. print C << "EOF";
  805. 0
  806. };
  807. +
  808. +EOF
  809. +
  810. +close C;
  811. +
  812. +my $valueKeywordsImpl = "CSSValueKeywordsImpl.cpp";
  813. +
  814. +open VALUEKEYWORDS, ">$valueKeywordsImpl" || die "Could not open $valueKeywordsImpl for writing";
  815. +print VALUEKEYWORDS << "EOF";
  816. +/* This file is automatically generated by make-hash-tools.pl, do not edit */
  817. +
  818. +#include "config.h"
  819. +#include "HashTools.h"
  820. +
  821. +namespace WebCore {
  822. +#include "CSSValueKeywordsHash.hpp"
  823. +
  824. +const Value* findValue (register const char* str, register unsigned int len)
  825. +{
  826. + return CSSValueKeywordsHash::findValueImpl(str, len);
  827. +}
  828. +
  829. const char* getValueName(unsigned short id)
  830. {
  831. if (id >= numCSSValueKeywords || id <= 0)
  832. return 0;
  833. return valueList[id];
  834. }
  835. -EOF
  836.  
  837. -close C;
  838. +}
  839. +
  840. +EOF
  841. diff --git a/WebCore/html/DocTypeStrings.gperf b/WebCore/html/DocTypeStrings.gperf
  842. index 398626e..1c7411d 100644
  843. --- a/WebCore/html/DocTypeStrings.gperf
  844. +++ b/WebCore/html/DocTypeStrings.gperf
  845. @@ -1,14 +1,16 @@
  846. -struct PubIDInfo {
  847. - enum eMode {
  848. - eQuirks,
  849. - eQuirks3,
  850. - eAlmostStandards
  851. - };
  852. -
  853. - const char* name;
  854. - eMode mode_if_no_sysid;
  855. - eMode mode_if_sysid;
  856. -}
  857. +%struct-type
  858. +struct PubIDInfo;
  859. +%omit-struct-type
  860. +%language=C++
  861. +%readonly-tables
  862. +%global-table
  863. +%compare-strncmp
  864. +%define initializer-suffix ,PubIDInfo::eAlmostStandards,PubIDInfo::eAlmostStandards
  865. +%define class-name DocTypeStringsHash
  866. +%define lookup-function-name findDoctypeEntryImpl
  867. +%define hash-function-name doctype_hash_function
  868. +%includes
  869. +%enum
  870. %%
  871. "+//silmaril//dtd html pro v0r11 19970101//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
  872. "-//advasoft ltd//dtd html 3.0 aswedit + extensions//en", PubIDInfo::eQuirks3, PubIDInfo::eQuirks3
  873. diff --git a/WebCore/html/HTMLDocument.cpp b/WebCore/html/HTMLDocument.cpp
  874. index 3048ee9..a6c7e6e 100644
  875. --- a/WebCore/html/HTMLDocument.cpp
  876. +++ b/WebCore/html/HTMLDocument.cpp
  877. @@ -64,6 +64,7 @@
  878. #include "FrameLoader.h"
  879. #include "FrameTree.h"
  880. #include "FrameView.h"
  881. +#include "HashTools.h"
  882. #include "HTMLBodyElement.h"
  883. #include "HTMLElementFactory.h"
  884. #include "HTMLNames.h"
  885. @@ -73,8 +74,6 @@
  886. #include "Page.h"
  887. #include <wtf/text/CString.h>
  888.  
  889. -#include "DocTypeStrings.cpp"
  890. -
  891. namespace WebCore {
  892.  
  893. using namespace HTMLNames;
  894. diff --git a/WebCore/html/HTMLEntityNames.gperf b/WebCore/html/HTMLEntityNames.gperf
  895. index b16b3d8..d63d133 100644
  896. --- a/WebCore/html/HTMLEntityNames.gperf
  897. +++ b/WebCore/html/HTMLEntityNames.gperf
  898. @@ -2,6 +2,7 @@
  899. /*
  900. Copyright (C) 1999 Lars Knoll (knoll@mpi-hd.mpg.de)
  901. Copyright (C) 2002, 2003, 2004, 2005 Apple Inc. All rights reserved.
  902. + Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged
  903.  
  904. This library is free software; you can redistribute it and/or
  905. modify it under the terms of the GNU Library General Public
  906. @@ -21,15 +22,21 @@
  907. ----------------------------------------------------------------------------
  908.  
  909. HTMLEntityNames.gperf: input file to generate a hash table for entities
  910. - HTMLEntityNames.c: DO NOT EDIT! generated by the command
  911. - "gperf -a -L "ANSI-C" -C -G -c -o -t -k '*' -NfindEntity -D -s 2 HTMLEntityNames.gperf > entities.c"
  912. - from HTMLEntityNames.gperf
  913. + HTMLEntityNames.hpp: DO NOT EDIT! generated by WebCore/make_hash_tools.pl
  914. */
  915. %}
  916. -struct Entity {
  917. - const char *name;
  918. - int code;
  919. -};
  920. +%struct-type
  921. +struct Entity;
  922. +%omit-struct-type
  923. +%language=C++
  924. +%readonly-tables
  925. +%global-table
  926. +%compare-strncmp
  927. +%define class-name HTMLEntityHash
  928. +%define lookup-function-name findEntityImpl
  929. +%define hash-function-name entity_hash_function
  930. +%includes
  931. +%enum
  932. %%
  933. AElig, 0x00c6
  934. AMP, 38
  935. diff --git a/WebCore/html/HTMLTokenizer.cpp b/WebCore/html/HTMLTokenizer.cpp
  936. index c807a4f..a53cdf9 100644
  937. --- a/WebCore/html/HTMLTokenizer.cpp
  938. +++ b/WebCore/html/HTMLTokenizer.cpp
  939. @@ -38,6 +38,7 @@
  940. #include "Frame.h"
  941. #include "FrameLoader.h"
  942. #include "FrameView.h"
  943. +#include "HashTools.h"
  944. #include "HTMLElement.h"
  945. #include "HTMLNames.h"
  946. #include "HTMLParser.h"
  947. @@ -55,8 +56,6 @@
  948. #include <wtf/ASCIICType.h>
  949. #include <wtf/CurrentTime.h>
  950.  
  951. -#include "HTMLEntityNames.c"
  952. -
  953. #define PRELOAD_SCANNER_ENABLED 1
  954. // #define INSTRUMENT_LAYOUT_SCHEDULING 1
  955.  
  956. diff --git a/WebCore/html/PreloadScanner.cpp b/WebCore/html/PreloadScanner.cpp
  957. index cd84b20..eefa46f 100644
  958. --- a/WebCore/html/PreloadScanner.cpp
  959. +++ b/WebCore/html/PreloadScanner.cpp
  960. @@ -38,24 +38,13 @@
  961. #include "Document.h"
  962. #include "Frame.h"
  963. #include "FrameLoader.h"
  964. +#include "HashTools.h"
  965. #include "HTMLLinkElement.h"
  966. #include "HTMLNames.h"
  967. #include <wtf/text/CString.h>
  968. #include <wtf/CurrentTime.h>
  969. #include <wtf/unicode/Unicode.h>
  970.  
  971. -// Use __GNUC__ instead of PLATFORM(GCC) to stay consistent with the gperf generated c file
  972. -#ifdef __GNUC__
  973. -// The main tokenizer includes this too so we are getting two copies of the data. However, this way the code gets inlined.
  974. -#include "HTMLEntityNames.c"
  975. -#else
  976. -// Not inlined for non-GCC compilers
  977. -struct Entity {
  978. - const char* name;
  979. - int code;
  980. -};
  981. -const struct Entity* findEntity(register const char* str, register unsigned int len);
  982. -#endif
  983.  
  984. #define PRELOAD_DEBUG 0
  985.  
  986. diff --git a/WebCore/make-hash-tools.pl b/WebCore/make-hash-tools.pl
  987. new file mode 100644
  988. index 0000000..05c5a17
  989. --- /dev/null
  990. +++ b/WebCore/make-hash-tools.pl
  991. @@ -0,0 +1,191 @@
  992. +#! /usr/bin/perl
  993. +#
  994. +# This file is part of the WebKit project
  995. +#
  996. +# Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged
  997. +#
  998. +# This library is free software; you can redistribute it and/or
  999. +# modify it under the terms of the GNU Library General Public
  1000. +# License as published by the Free Software Foundation; either
  1001. +# version 2 of the License, or (at your option) any later version.
  1002. +#
  1003. +# This library is distributed in the hope that it will be useful,
  1004. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1005. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1006. +# Library General Public License for more details.
  1007. +#
  1008. +# You should have received a copy of the GNU Library General Public License
  1009. +# along with this library; see the file COPYING.LIB. If not, write to
  1010. +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  1011. +# Boston, MA 02110-1301, USA.
  1012. +
  1013. +use strict;
  1014. +use Switch;
  1015. +
  1016. +my $option = $ARGV[0];
  1017. +shift;
  1018. +my $outdir = $ARGV[0];
  1019. +shift;
  1020. +
  1021. +my $hashToolsHeader = "$outdir/HashTools.h";
  1022. +
  1023. +sub createHashToolsHeader() {
  1024. +
  1025. +open HEADER, ">$hashToolsHeader" || die "Could not open $hashToolsHeader for writing";
  1026. +print HEADER << "EOF";
  1027. +/* This file is automatically generated by make-hash-tools.pl, do not edit */
  1028. +
  1029. +#include "CSSValueKeywords.h"
  1030. +#include "CSSPropertyNames.h"
  1031. +
  1032. +#ifndef HashTools_h
  1033. +#define HashTools_h
  1034. +
  1035. +namespace WebCore {
  1036. +
  1037. +struct Entity {
  1038. + const char* name;
  1039. + int code;
  1040. +};
  1041. +
  1042. +struct PubIDInfo {
  1043. + enum eMode {
  1044. + eQuirks,
  1045. + eQuirks3,
  1046. + eAlmostStandards
  1047. + };
  1048. +
  1049. + const char* name;
  1050. + eMode mode_if_no_sysid;
  1051. + eMode mode_if_sysid;
  1052. +};
  1053. +
  1054. +struct NamedColor {
  1055. + const char* name;
  1056. + int RGBValue;
  1057. +};
  1058. +
  1059. +struct Property {
  1060. + const char* name;
  1061. + int id;
  1062. +};
  1063. +
  1064. +struct Value {
  1065. + const char* name;
  1066. + int id;
  1067. +};
  1068. +
  1069. +const Entity* findEntity(register const char* str, register unsigned int len);
  1070. +const PubIDInfo* findDoctypeEntry(register const char* str, register unsigned int len);
  1071. +const NamedColor* findColor(register const char* str, register unsigned int len);
  1072. +const Property* findProperty(register const char* str, register unsigned int len);
  1073. +const Value* findValue(register const char* str, register unsigned int len);
  1074. +
  1075. +const char* getPropertyName(CSSPropertyID);
  1076. +const char* getValueName(unsigned short id);
  1077. +
  1078. +}
  1079. +
  1080. +#endif // HashTools_h
  1081. +
  1082. +EOF
  1083. +close HEADER;
  1084. +
  1085. +}
  1086. +
  1087. +switch ($option) {
  1088. +
  1089. +case "entities" {
  1090. +
  1091. +# Create the following once in the HTMLEntityNames creation phase
  1092. +createHashToolsHeader();
  1093. +
  1094. +my $htmlEntityNamesImpl = "$outdir/HTMLEntityNamesImpl.cpp";
  1095. +my $htmlEntityNamesGenerated = "$outdir/HTMLEntityNamesHash.hpp";
  1096. +my $htmlEntityNamesGperf = $ARGV[0];
  1097. +shift;
  1098. +
  1099. +open ENTITIES, ">$htmlEntityNamesImpl" || die "Could not open $htmlEntityNamesImpl for writing";
  1100. +print ENTITIES << "EOF";
  1101. +/* This file is automatically generated by make-hash-tools.pl, do not edit */
  1102. +
  1103. +#include "config.h"
  1104. +#include "HashTools.h"
  1105. +
  1106. +namespace WebCore {
  1107. +#include "HTMLEntityNamesHash.hpp"
  1108. +
  1109. +const Entity* findEntity(register const char* str, register unsigned int len)
  1110. +{
  1111. + return HTMLEntityHash::findEntityImpl(str, len);
  1112. +}
  1113. +
  1114. +}
  1115. +
  1116. +EOF
  1117. +close ENTITIES;
  1118. +system("gperf --key-positions=\"*\" -D -s 2 $htmlEntityNamesGperf > $htmlEntityNamesGenerated") == 0 || die "calling gperf failed: $?";
  1119. +
  1120. +} # case "entities"
  1121. +
  1122. +case "doctype" {
  1123. +
  1124. +my $docTypeStringsImpl = "$outdir/DocTypeStringsImpl.cpp";
  1125. +my $docTypeStringsGenerated = "$outdir/DocTypeStringsHash.hpp";
  1126. +my $docTypeStringsGperf = $ARGV[0];
  1127. +shift;
  1128. +
  1129. +open DOCTYPESTRINGS, ">$docTypeStringsImpl" || die "Could not open $docTypeStringsImpl for writing";
  1130. +print DOCTYPESTRINGS << "EOF";
  1131. +/* This file is automatically generated by make-hash-tools.pl, do not edit */
  1132. +
  1133. +#include "config.h"
  1134. +#include "HashTools.h"
  1135. +
  1136. +namespace WebCore {
  1137. +#include "DocTypeStringsHash.hpp"
  1138. +
  1139. +const PubIDInfo* findDoctypeEntry (register const char* str, register unsigned int len)
  1140. +{
  1141. + return DocTypeStringsHash::findDoctypeEntryImpl(str, len);
  1142. +}
  1143. +
  1144. +}
  1145. +
  1146. +EOF
  1147. +close DOCTYPESTRINGS;
  1148. +system("gperf --key-positions=\"*\" -s 2 $docTypeStringsGperf > $docTypeStringsGenerated") == 0 || die "calling gperf failed: $?";
  1149. +
  1150. +} # case "doctype"
  1151. +
  1152. +case "colordata" {
  1153. +
  1154. +my $colorDataImpl = "$outdir/ColorDataImpl.cpp";
  1155. +my $colorDataGenerated = "$outdir/ColorDataHash.hpp";
  1156. +my $colorDataGperf = $ARGV[0];
  1157. +shift;
  1158. +
  1159. +open COLORDATA, ">$colorDataImpl" || die "Could not open $colorDataImpl for writing";
  1160. +print COLORDATA << "EOF";
  1161. +/* This file is automatically generated by make-hash-tools.pl, do not edit */
  1162. +
  1163. +#include "config.h"
  1164. +#include "HashTools.h"
  1165. +
  1166. +namespace WebCore {
  1167. +#include "ColorDataHash.hpp"
  1168. +
  1169. +const struct NamedColor* findColor (register const char* str, register unsigned int len)
  1170. +{
  1171. + return ColorDataHash::findColorImpl(str, len);
  1172. +}
  1173. +
  1174. +}
  1175. +
  1176. +EOF
  1177. +close COLORDATA;
  1178. +system("gperf --key-positions=\"*\" -D -s 2 $colorDataGperf > $colorDataGenerated") == 0 || die "calling gperf failed: $?";
  1179. +
  1180. +} # case "colordata"
  1181. +
  1182. +} # switch ($option)
  1183. diff --git a/WebCore/page/animation/ImplicitAnimation.cpp b/WebCore/page/animation/ImplicitAnimation.cpp
  1184. index 328fe0e..ceaebda 100644
  1185. --- a/WebCore/page/animation/ImplicitAnimation.cpp
  1186. +++ b/WebCore/page/animation/ImplicitAnimation.cpp
  1187. @@ -32,6 +32,7 @@
  1188. #include "CompositeAnimation.h"
  1189. #include "CSSPropertyNames.h"
  1190. #include "EventNames.h"
  1191. +#include "HashTools.h"
  1192. #include "ImplicitAnimation.h"
  1193. #include "KeyframeAnimation.h"
  1194. #include "RenderLayer.h"
  1195. diff --git a/WebCore/platform/ColorData.gperf b/WebCore/platform/ColorData.gperf
  1196. index 8a54916..d684cb9 100644
  1197. --- a/WebCore/platform/ColorData.gperf
  1198. +++ b/WebCore/platform/ColorData.gperf
  1199. @@ -1,4 +1,15 @@
  1200. -struct NamedColor { const char *name; int RGBValue; };
  1201. +%struct-type
  1202. +struct NamedColor;
  1203. +%omit-struct-type
  1204. +%language=C++
  1205. +%readonly-tables
  1206. +%global-table
  1207. +%compare-strncmp
  1208. +%define class-name ColorDataHash
  1209. +%define lookup-function-name findColorImpl
  1210. +%define hash-function-name colordata_hash_function
  1211. +%includes
  1212. +%enum
  1213. %%
  1214. aliceblue, 0xf0f8ff
  1215. antiquewhite, 0xfaebd7
  1216. diff --git a/WebCore/platform/graphics/Color.cpp b/WebCore/platform/graphics/Color.cpp
  1217. index d98b202..a87dafd 100644
  1218. --- a/WebCore/platform/graphics/Color.cpp
  1219. +++ b/WebCore/platform/graphics/Color.cpp
  1220. @@ -26,13 +26,12 @@
  1221. #include "config.h"
  1222. #include "Color.h"
  1223.  
  1224. +#include "HashTools.h"
  1225. #include "PlatformString.h"
  1226. #include <math.h>
  1227. #include <wtf/Assertions.h>
  1228. #include <wtf/MathExtras.h>
  1229.  
  1230. -#include "ColorData.c"
  1231. -
  1232. using namespace std;
  1233. using namespace WTF;
  1234.  
  1235. diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
  1236. index 474572e..611ffc9 100644
  1237. --- a/WebKit/chromium/ChangeLog
  1238. +++ b/WebKit/chromium/ChangeLog
  1239. @@ -1,3 +1,23 @@
  1240. +2010-05-11 Andras Becsi <abecsi@inf.u-szeged.hu>
  1241. +
  1242. + Reviewed by NOBODY (OOPS!).
  1243. +
  1244. + Refactor gperf code generation and usage to fix the debug build with gcc>4.4.
  1245. + webkit.org/b/29244
  1246. +
  1247. + Gperf code generation is done by a new script called WebCore/make-hash-tools.pl now,
  1248. + and the generation options were moved into the gperf files, to make the options more understandable
  1249. + and the generation process less redundant across the various ports.
  1250. + Hitherto gperf generated C code, these files were included in multiple C++ files across WebCore
  1251. + to access the functionality provided. This resulted in debug build failure with newer gcc versions
  1252. + because of a new feature of gcc, which disables C style inlining in debug mode.
  1253. + The make-hash-tools.pl script lets gperf generate C++ code for all gperf files now, which are compiled
  1254. + in their own compilation unit.
  1255. + The functionality provided by the generated code is wrapped behind HashTools.h, so there is no need
  1256. + for multiple inclusions of generated C files to access these functions.
  1257. +
  1258. + * src/WebEntities.cpp:
  1259. +
  1260. 2010-05-10 Tony Chang <tony@chromium.org>
  1261.  
  1262. Reviewed by Kent Tamura.
  1263. diff --git a/WebKit/chromium/src/WebEntities.cpp b/WebKit/chromium/src/WebEntities.cpp
  1264. index b9143d9..a880671 100644
  1265. --- a/WebKit/chromium/src/WebEntities.cpp
  1266. +++ b/WebKit/chromium/src/WebEntities.cpp
  1267. @@ -33,6 +33,7 @@
  1268.  
  1269. #include <string.h>
  1270.  
  1271. +#include "HashTools.h"
  1272. #include "PlatformString.h"
  1273. #include "StringBuilder.h"
  1274. #include <wtf/HashMap.h>
  1275. @@ -41,15 +42,6 @@
  1276.  
  1277. using namespace WebCore;
  1278.  
  1279. -namespace {
  1280. -// Note that this file is also included by HTMLTokenizer.cpp so we are getting
  1281. -// two copies of the data in memory. We can fix this by changing the script
  1282. -// that generated the array to create a static const that is its length, but
  1283. -// this is low priority since the data is less than 4K. We use anonymous
  1284. -// namespace to prevent name collisions.
  1285. -#include "HTMLEntityNames.c" // NOLINT
  1286. -}
  1287. -
  1288. namespace WebKit {
  1289.  
  1290. void populateMap(WTF::HashMap<int, WebCore::String>& map,
  1291. diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
  1292. index 385d581..6aac739 100644
  1293. --- a/WebKit/qt/ChangeLog
  1294. +++ b/WebKit/qt/ChangeLog
  1295. @@ -1,3 +1,24 @@
  1296. +2010-05-11 Andras Becsi <abecsi@inf.u-szeged.hu>
  1297. +
  1298. + Reviewed by NOBODY (OOPS!).
  1299. +
  1300. + Refactor gperf code generation and usage to fix the debug build with gcc>4.4.
  1301. + webkit.org/b/29244
  1302. +
  1303. + Gperf code generation is done by a new script called WebCore/make-hash-tools.pl now,
  1304. + and the generation options were moved into the gperf files, to make the options more understandable
  1305. + and the generation process less redundant across the various ports.
  1306. + Hitherto gperf generated C code, these files were included in multiple C++ files across WebCore
  1307. + to access the functionality provided. This resulted in debug build failure with newer gcc versions
  1308. + because of a new feature of gcc, which disables C style inlining in debug mode.
  1309. + The make-hash-tools.pl script lets gperf generate C++ code for all gperf files now, which are compiled
  1310. + in their own compilation unit.
  1311. + The functionality provided by the generated code is wrapped behind HashTools.h, so there is no need
  1312. + for multiple inclusions of generated C files to access these functions.
  1313. +
  1314. + * WebCoreSupport/FrameLoaderClientQt.cpp:
  1315. + (WebCore::FrameLoaderClientQt::createPlugin):
  1316. +
  1317. 2010-05-09 Noam Rosenthal <noam.rosenthal@nokia.com>
  1318.  
  1319. Reviewed by Kenneth Rohde Christiansen.
  1320. diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
  1321. index a0b06fb..bab1d04 100644
  1322. --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
  1323. +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
  1324. @@ -32,7 +32,6 @@
  1325.  
  1326. #include "config.h"
  1327. #include "CSSComputedStyleDeclaration.h"
  1328. -#include "CSSPropertyNames.h"
  1329. #include "FormState.h"
  1330. #include "FrameLoaderClientQt.h"
  1331. #include "FrameTree.h"
  1332. @@ -46,6 +45,7 @@
  1333. #include "ProgressTracker.h"
  1334. #include "RenderPart.h"
  1335. #include "ResourceRequest.h"
  1336. +#include "HashTools.h"
  1337. #include "HistoryItem.h"
  1338. #include "HTMLAppletElement.h"
  1339. #include "HTMLFormElement.h"
  1340. @@ -1333,7 +1333,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
  1341. for (unsigned i = 0; i < numqStyleSheetProperties; ++i) {
  1342. CSSPropertyID property = qstyleSheetProperties[i];
  1343.  
  1344. - styleSheet += QString::fromLatin1(::getPropertyName(property));
  1345. + styleSheet += QString::fromLatin1(getPropertyName(property));
  1346. styleSheet += QLatin1Char(':');
  1347. styleSheet += computedStyle(element)->getPropertyValue(property);
  1348. styleSheet += QLatin1Char(';');
Add Comment
Please, Sign In to add comment