Changeset 72672 in webkit
- Timestamp:
- Nov 24, 2010 7:51:54 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r72669 r72672 1 2010-11-24 Patrick Gansterer <paroga@webkit.org> 2 3 Reviewed by Csaba Osztrogonác. 4 5 Simplify makeprop.pl 6 https://bugs.webkit.org/show_bug.cgi?id=49925 7 8 Don't generate CSSPropertyNamesHash.h. 9 Instead generate CSSPropertyNames directly. 10 11 * GNUmakefile.am: Removed rule for CSSPropertyNamesHash.h. 12 * css/makeprop.pl: 13 1 14 2010-11-24 Patrick Gansterer <paroga@webkit.org> 2 15 -
trunk/WebCore/GNUmakefile.am
r72667 r72672 95 95 DerivedSources/WebCore/CSSPropertyNames.h \ 96 96 DerivedSources/WebCore/CSSPropertyNames.cpp \ 97 DerivedSources/WebCore/CSSPropertyNamesHash.h \98 97 DerivedSources/WebCore/CSSValueKeywords.h \ 99 98 DerivedSources/WebCore/CSSValueKeywords.cpp \ … … 4580 4579 endif # END ENABLE_BLOB 4581 4580 4582 DerivedSources/WebCore/CSSPropertyNamesHash.h: DerivedSources/WebCore/CSSPropertyNames.cpp4583 4581 DerivedSources/WebCore/CSSPropertyNames.cpp: DerivedSources/WebCore/CSSPropertyNames.h 4584 4582 DerivedSources/WebCore/CSSPropertyNames.h: $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/makeprop.pl -
trunk/WebCore/css/makeprop.pl
r68521 r72672 40 40 /* This file is automatically generated from CSSPropertyNames.in by makeprop, do not edit */ 41 41 #include \"CSSPropertyNames.h\" 42 #include \"HashTools.h\" 43 #include <string.h> 44 45 namespace WebCore { 42 46 %} 43 47 %struct-type … … 52 56 %define hash-function-name propery_hash_function 53 57 %define word-array-name property_wordlist 54 %includes55 58 %enum 56 59 %% … … 62 65 print GPERF $name . ", CSSProperty" . $id . "\n"; 63 66 } 64 print GPERF "%%\n"; 65 close GPERF; 67 68 print GPERF<< "EOF"; 69 %% 70 const Property* findProperty(register const char* str, register unsigned int len) 71 { 72 return CSSPropertyNamesHash::findPropertyImpl(str, len); 73 } 74 75 const char* getPropertyName(CSSPropertyID id) 76 { 77 if (id < firstCSSProperty) 78 return 0; 79 int index = id - firstCSSProperty; 80 if (index >= numCSSProperties) 81 return 0; 82 return propertyNameStrings[index]; 83 } 84 85 } // namespace WebCore 86 EOF 66 87 67 88 open HEADER, ">CSSPropertyNames.h" || die "Could not open CSSPropertyNames.h for writing"; … … 117 138 close HEADER; 118 139 119 system("gperf --key-positions=\"*\" -D -n -s 2 CSSPropertyNames.gperf > CSSPropertyNamesHash.h") == 0 || die "calling gperf failed: $?"; 120 121 open C, ">>CSSPropertyNamesHash.h" || die "Could not open CSSPropertyNamesHash.h for writing"; 122 print C << "EOF"; 123 124 EOF 125 126 close C; 127 128 my $propertyNamesImpl = "CSSPropertyNames.cpp"; 129 130 open PROPERTYNAMES, ">$propertyNamesImpl" || die "Could not open $propertyNamesImpl for writing"; 131 print PROPERTYNAMES << "EOF"; 132 /* This file is automatically generated by make-hash-tools.pl, do not edit */ 133 134 135 #include "CSSPropertyNames.h" 136 #include "HashTools.h" 137 138 namespace WebCore { 139 #include "CSSPropertyNamesHash.h" 140 141 const Property* findProperty (register const char* str, register unsigned int len) 142 { 143 return CSSPropertyNamesHash::findPropertyImpl(str, len); 144 } 145 146 const char* getPropertyName(CSSPropertyID id) 147 { 148 if (id < firstCSSProperty) 149 return 0; 150 int index = id - firstCSSProperty; 151 if (index >= numCSSProperties) 152 return 0; 153 return propertyNameStrings[index]; 154 } 155 156 } // namespace WebCore 157 158 EOF 159 160 close PROPERTYNAMES; 161 140 system("gperf --key-positions=\"*\" -D -n -s 2 CSSPropertyNames.gperf > CSSPropertyNames.cpp") == 0 || die "calling gperf failed: $?";
Note: See TracChangeset
for help on using the changeset viewer.