[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

paroga at webkit.org paroga at webkit.org
Wed Dec 22 16:28:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 4be1ce5ad28feea6b0de129f0a54eef829ac6bb1
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 24 14:51:14 2010 +0000

    2010-11-24  Patrick Gansterer  <paroga at webkit.org>
    
            Reviewed by Csaba Osztrogonác.
    
            Simplify makevalues.pl
            https://bugs.webkit.org/show_bug.cgi?id=49926
    
            Don't generate CSSValueKeywordsHash.h.
            Instead generate CSSValueKeywords.cpp directly.
    
            * GNUmakefile.am: Removed rule for CSSValueKeywordsHash.h.
            * css/makevalues.pl:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72667 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fda3973..dd05e14 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-24  Patrick Gansterer  <paroga at webkit.org>
+
+        Reviewed by Csaba Osztrogonác.
+
+        Simplify makevalues.pl
+        https://bugs.webkit.org/show_bug.cgi?id=49926
+
+        Don't generate CSSValueKeywordsHash.h.
+        Instead generate CSSValueKeywords.cpp directly. 
+
+        * GNUmakefile.am: Removed rule for CSSValueKeywordsHash.h.
+        * css/makevalues.pl:
+
 2010-11-24  Andras Becsi  <abecsi at inf.u-szeged.hu>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 6541fe1..9e6e192 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -97,7 +97,6 @@ webcore_built_sources += \
 	DerivedSources/WebCore/CSSPropertyNamesHash.h \
 	DerivedSources/WebCore/CSSValueKeywords.h \
 	DerivedSources/WebCore/CSSValueKeywords.cpp \
-	DerivedSources/WebCore/CSSValueKeywordsHash.h \
 	DerivedSources/WebCore/ColorData.cpp \
 	DerivedSources/WebCore/DocTypeStrings.cpp \
 	DerivedSources/WebCore/HashTools.h \
@@ -4589,7 +4588,6 @@ DerivedSources/WebCore/CSSPropertyNames.h: $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCo
 	mv CSSPropertyNames* $(GENSOURCES_WEBCORE)
 
 # Lower case all the values, as CSS values are case-insensitive
-DerivedSources/WebCore/CSSValueKeywordsHash.h: DerivedSources/WebCore/CSSValueKeywords.cpp
 DerivedSources/WebCore/CSSValueKeywords.cpp: DerivedSources/WebCore/CSSValueKeywords.h
 DerivedSources/WebCore/CSSValueKeywords.h: $(WEBCORE_CSS_VALUE_KEYWORDS) $(WebCore)/css/makevalues.pl
 	$(PERL) -ne 'print lc' $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in
diff --git a/WebCore/css/makevalues.pl b/WebCore/css/makevalues.pl
index c9f7f70..183cd35 100644
--- a/WebCore/css/makevalues.pl
+++ b/WebCore/css/makevalues.pl
@@ -40,6 +40,10 @@ print GPERF << "EOF";
 /* This file is automatically generated from CSSValueKeywords.in by makevalues, do not edit */
 
 #include \"CSSValueKeywords.h\"
+#include \"HashTools.h\"
+#include <string.h>
+
+namespace WebCore {
 %}
 %struct-type
 struct Value;
@@ -51,7 +55,6 @@ struct Value;
 %define lookup-function-name findValueImpl
 %define hash-function-name value_hash_function
 %define word-array-name value_word_list
-%includes
 %enum
 %%
 EOF
@@ -61,9 +64,38 @@ foreach my $name (@names) {
   $id =~ s/(^[^-])|-(.)/uc($1||$2)/ge;
   print GPERF $name . ", CSSValue" . $id . "\n";
 }
-print GPERF "%%\n";
+
+print GPERF << "EOF";
+%%
+static const char* const valueList[] = {
+    "",
+EOF
+
+foreach my $name (@names) {
+  print GPERF "    \"" . $name . "\",\n";
+}
+
+print GPERF << "EOF";
+    0
+};
+
+const Value* findValue(register const char* str, register unsigned int len)
+{
+    return CSSValueKeywordsHash::findValueImpl(str, len);
+}
+
+const char* getValueName(unsigned short id)
+{
+    if (id >= numCSSValueKeywords || id <= 0)
+        return 0;
+    return valueList[id];
+}
+
+} // namespace WebCore
+EOF
 close GPERF;
 
+
 open HEADER, ">CSSValueKeywords.h" || die "Could not open CSSValueKeywords.h for writing";
 print HEADER << "EOF";
 /* This file is automatically generated from CSSValueKeywords.in by makevalues, do not edit */
@@ -102,49 +134,4 @@ const char* getValueName(unsigned short id);
 EOF
 close HEADER;
 
-system("gperf --key-positions=\"*\" -D -n -s 2 CSSValueKeywords.gperf > CSSValueKeywordsHash.h") == 0 || die "calling gperf failed: $?";
-
-open C, ">>CSSValueKeywordsHash.h" || die "Could not open CSSValueKeywordsHash.h for writing";
-print C  "static const char * const valueList[] = {\n";
-print C  "\"\",\n";
-foreach my $name (@names) {
-  print C  "\"" . $name . "\", \n";
-}
-print C << "EOF";
-    0
-};
-
-EOF
-
-close C;
-
-my $valueKeywordsImpl = "CSSValueKeywords.cpp";
-
-open VALUEKEYWORDS, ">$valueKeywordsImpl" || die "Could not open $valueKeywordsImpl for writing";
-print VALUEKEYWORDS << "EOF";
-/* This file is automatically generated by make-hash-tools.pl, do not edit */
-
-#include "CSSValueKeywords.h"
-#include "HashTools.h"
-
-namespace WebCore {
-#include "CSSValueKeywordsHash.h"
-
-const Value* findValue (register const char* str, register unsigned int len)
-{
-    return CSSValueKeywordsHash::findValueImpl(str, len);
-}
-
-const char* getValueName(unsigned short id)
-{
-    if (id >= numCSSValueKeywords || id <= 0)
-        return 0;
-    return valueList[id];
-}
-
-} // namespace WebCore
-
-EOF
-
-close VALUEKEYWORDS;
-
+system("gperf --key-positions=\"*\" -D -n -s 2 CSSValueKeywords.gperf > CSSValueKeywords.cpp") == 0 || die "calling gperf failed: $?";

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list