[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:35:59 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 8a35608876e000e82ec766bdf65ff389a9d5e251
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Apr 10 16:52:34 2003 +0000

            Reviewed by Maciej.
    
            - fixed 3224077 -- REGRESSION: tables on MacNN forums messed up because we reject %% due to style parser
    
            * khtml/css/tokenizer.flex: Add a + sign after the % in the percentage rule so we allow
            any number of extra percent signs. This is a temporary hack.
    
            * khtml/css/Makefile.am: Add make rules to build tokenizer.cpp so we don't have to do it by hand.
            * khtml/css/maketokenizer: Added. Script used by the make rules.
            * khtml/css/tokenizer.cpp: Regenerated. The only substantive change is in the state tables.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4059 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 449fd01..3c9636e 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2003-04-10  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+        - fixed 3224077 -- REGRESSION: tables on MacNN forums messed up because we reject %% due to style parser
+
+        * khtml/css/tokenizer.flex: Add a + sign after the % in the percentage rule so we allow
+        any number of extra percent signs. This is a temporary hack.
+
+        * khtml/css/Makefile.am: Add make rules to build tokenizer.cpp so we don't have to do it by hand.
+        * khtml/css/maketokenizer: Added. Script used by the make rules.
+        * khtml/css/tokenizer.cpp: Regenerated. The only substantive change is in the state tables.
+
 2003-04-09  David Hyatt  <hyatt at apple.com>
 
         This first fix is a refinement of the patch I produced to fix <nobr>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 449fd01..3c9636e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2003-04-10  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+        - fixed 3224077 -- REGRESSION: tables on MacNN forums messed up because we reject %% due to style parser
+
+        * khtml/css/tokenizer.flex: Add a + sign after the % in the percentage rule so we allow
+        any number of extra percent signs. This is a temporary hack.
+
+        * khtml/css/Makefile.am: Add make rules to build tokenizer.cpp so we don't have to do it by hand.
+        * khtml/css/maketokenizer: Added. Script used by the make rules.
+        * khtml/css/tokenizer.cpp: Regenerated. The only substantive change is in the state tables.
+
 2003-04-09  David Hyatt  <hyatt at apple.com>
 
         This first fix is a refinement of the patch I produced to fix <nobr>
diff --git a/WebCore/khtml/css/Makefile.am b/WebCore/khtml/css/Makefile.am
index 83e76f4..d5d167b 100644
--- a/WebCore/khtml/css/Makefile.am
+++ b/WebCore/khtml/css/Makefile.am
@@ -12,10 +12,16 @@ parser.cpp: $(srcdir)/parser.y
 	else mv parser.tab.h parser.h; fi \
 	else :; fi
 
+tokenizer.cpp: maketokenizer tokenizer.flex
+	cd $(srcdir); \
+	flex tokenizer.flex && perl maketokenizer lex.yy.c > $@; \
+	rm -f lex.yy.c
+
 noinst_HEADERS = \
 	cssproperties.c \
 	cssvalues.c \
 	parser.cpp \
+	tokenizer.cpp \
 	$(NULL)
 
 VALUEFILES = \
diff --git a/WebCore/khtml/css/maketokenizer b/WebCore/khtml/css/maketokenizer
new file mode 100644
index 0000000..7a39e21
--- /dev/null
+++ b/WebCore/khtml/css/maketokenizer
@@ -0,0 +1,88 @@
+print <<END;
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 2003 Lars Knoll (knoll\@kde.org)
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* This file is mostly data generated by flex. Unfortunately flex
+   can't handle 16bit strings directly, so we just copy the part of
+   the code we need and modify it to our needs.
+
+   Most of the defines below are to make sure we can easily use the
+   flex generated code, using as little editing as possible.
+
+   The flex syntax to generate the lexer are more or less directly
+   copied from the CSS2.1 specs, with some fixes for comments and
+   the important symbol.
+
+   To regenerate, run flex on tokenizer.flex. After this, copy the
+   data tables and the YY_DECL method over to this file. Remove the
+   init code from YY_DECL and change the YY_END_OF_BUFFER to only call
+   yyterminate().
+
+*/
+
+// --------- begin generated code -------------------
+
+END
+
+while (<>) {
+    last if /YY_NUM_RULES/;
+}
+
+print;
+while (<>) {
+    last if /yy_last_accepting/;
+    print;
+}
+
+while (<>) {
+    last if /^YY_DECL/;
+}
+
+print;
+while (<>) {
+    s/char/unsigned short/;
+    print;
+    last if /yy_act/;
+}
+
+while (<>) {
+    last if /while \( 1 \)/;
+}
+
+print;
+while (<>) {
+    next if /^yy_match:/;
+    next if /^do_action:/;
+    last if /YY_END_OF_BUFFER/;
+    print;
+    print "case YY_END_OF_BUFFER:\n" if /^case YY_STATE_EOF\(INITIAL\):/;
+}
+
+while (<>) {
+    last if /default:/;
+}
+
+print;
+while (<>) {
+    print;
+    last if /end of yylex/;
+}
diff --git a/WebCore/khtml/css/tokenizer.cpp b/WebCore/khtml/css/tokenizer.cpp
index 773f48f..e018abd 100644
--- a/WebCore/khtml/css/tokenizer.cpp
+++ b/WebCore/khtml/css/tokenizer.cpp
@@ -3,7 +3,6 @@
  *
  * Copyright (C) 2003 Lars Knoll (knoll at kde.org)
  *
- * $Id$
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -125,10 +124,10 @@ static yyconst int yy_meta[57] =
 
 static yyconst short int yy_base[330] =
     {   0,
-        0,    0,  723, 1578,   55,   60,   65,   64,  694,  697,
-       60,  696,  700,  683,  687,   93,  695,   57,   75,  678,
-       63,   66,  677,  676,  113,  148,  656,   70, 1578,  185,
-      670,  126, 1578,   61,  219, 1578,  659,   60,  666, 1578,
+        0,    0,  731, 1578,   55,   60,   65,   64,  696,  698,
+       60,  697,  701,  697,  688,   93,  696,   57,   75,  679,
+       63,   66,  678,  677,  113,  148,  657,   70, 1578,  185,
+      671,  126, 1578,   61,  219, 1578,  673,   60,  667,  671,
       658,    0,  134,   55,  651,   58,   67,  121,  135,  143,
       148,   49,  150,  151,  144,  650,  658,  622,  624,  597,
       598,  603,  606,   84,  253, 1578, 1578,  158,  204,  268,
@@ -279,12 +278,12 @@ static yyconst short int yy_nxt[1635] =
       184,  184,  184,  185,  131,  131,  131,  131,  131,  186,
       111,  110,  185,  185,  185,  185,  185,  185,  186,  186,
       186,  186,  186,  186,  193,  109,   93,   93,   38,   93,
-      194,   89,   87,  193,  193,  193,  193,  193,  193,  194,
-      194,  194,  194,  194,  194,  195,   32,   74,   73,   72,
+      194,   40,   89,  193,  193,  193,  193,  193,  193,  194,
+      194,  194,  194,  194,  194,  195,   87,   32,   74,   73,
 
-       66,   57,   39,   38,  195,  195,  195,  195,  195,  195,
-      175,  175,  175,  175,  175,  214,  177,   37,   36,   33,
-       32,  178,  303,  179,  214,  214,  214,  214,  214,  214,
+       72,   66,   57,   39,  195,  195,  195,  195,  195,  195,
+      175,  175,  175,  175,  175,  214,  177,   38,   37,   36,
+       33,  178,   32,  179,  214,  214,  214,  214,  214,  214,
       303,  303,  303,  303,  303,  180,  201,  201,  201,  201,
       201,  215,  303,  303,  303,  303,  303,  303,  303,  179,
       215,  215,  215,  215,  215,  215,  303,  303,  303,  303,
@@ -463,13 +462,13 @@ static yyconst short int yy_chk[1635] =
       155,  155,  155,  158,  275,  275,  275,  275,  275,  159,
        59,   58,  158,  158,  158,  158,  158,  158,  159,  159,
       159,  159,  159,  159,  168,   57,   56,   45,   41,  275,
-      169,   39,   37,  168,  168,  168,  168,  168,  168,  169,
-      169,  169,  169,  169,  169,  170,   31,   27,   24,   23,
+      169,   40,   39,  168,  168,  168,  168,  168,  168,  169,
+      169,  169,  169,  169,  169,  170,   37,   31,   27,   24,
 
-       20,   17,   15,   14,  170,  170,  170,  170,  170,  170,
-      175,  175,  175,  175,  175,  182,  175,   13,   12,   10,
-        9,  175,    3,  175,  182,  182,  182,  182,  182,  182,
-        0,    0,    0,    0,    0,  175,  176,  176,  176,  176,
+       23,   20,   17,   15,  170,  170,  170,  170,  170,  170,
+      175,  175,  175,  175,  175,  182,  175,   14,   13,   12,
+       10,  175,    9,  175,  182,  182,  182,  182,  182,  182,
+        3,    0,    0,    0,    0,  175,  176,  176,  176,  176,
       176,  183,  176,    0,    0,    0,    0,  176,    0,  176,
       183,  183,  183,  183,  183,  183,    0,    0,    0,    0,
         0,  176,  180,  180,  180,  180,  180,    0,  180,    0,
@@ -571,7 +570,6 @@ static yyconst short int yy_chk[1635] =
       303,  303,  303,  303
     } ;
 
-
 YY_DECL
 	{
 	register yy_state_type yy_current_state;
@@ -621,6 +619,8 @@ yy_find_action:
 		YY_DO_BEFORE_ACTION;
 
 
+
+
 		switch ( yy_act )
 	{ /* beginning of action switch */
 			case 0: /* must back up */
@@ -867,7 +867,7 @@ ECHO;
 	YY_BREAK
 #line 1304 "lex.yy.c"
 case YY_STATE_EOF(INITIAL):
-	case YY_END_OF_BUFFER:
+case YY_END_OF_BUFFER:
 	yyterminate();
 
 	default:
@@ -876,5 +876,3 @@ case YY_STATE_EOF(INITIAL):
 	} /* end of action switch */
 		} /* end of scanning one token */
 	} /* end of yylex */
-
-
diff --git a/WebCore/khtml/css/tokenizer.flex b/WebCore/khtml/css/tokenizer.flex
index 604b6bf..9bb0726 100644
--- a/WebCore/khtml/css/tokenizer.flex
+++ b/WebCore/khtml/css/tokenizer.flex
@@ -68,7 +68,7 @@ range           \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|
 {num}Hz                 {yyTok = HERZ; return yyTok;}
 {num}kHz                {yyTok = KHERZ; return yyTok;}
 {num}{ident}            {yyTok = DIMEN; return yyTok;}
-{num}%                  {yyTok = PERCENTAGE; return yyTok;}
+{num}%+                 {yyTok = PERCENTAGE; return yyTok;}
 {num}                   {yyTok = NUMBER; return yyTok;}
 
 "url("{w}{string}{w}")" {yyTok = URI; return yyTok;}

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list