Reviewed by Darin.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Mar 2006 15:57:20 +0000 (15:57 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Mar 2006 15:57:20 +0000 (15:57 +0000)
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7157
          An asterisk in a CSS property name breaks CSS handling
          (Many layout problems at letras.terra.com.br)

        Test: fast/css/error-in-last-decl.html

        * css/CSSGrammar.y: Added a rule for the case when the last CSS rule
          has a syntax error, and doesn't end with a semicolon.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13559 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/css/error-in-last-decl-expected.checksum [new file with mode: 0644]
LayoutTests/fast/css/error-in-last-decl-expected.png [new file with mode: 0644]
LayoutTests/fast/css/error-in-last-decl-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/error-in-last-decl.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/CSSGrammar.y

index 44564bb69db544841cbab27c8eaa25e83142e00d..d60650e27c45002083a7c8bf9f17e03e267ce20d 100644 (file)
@@ -1,3 +1,16 @@
+2006-03-29  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Darin.
+
+        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7157
+          An asterisk in a CSS property name breaks CSS handling 
+          (Many layout problems at letras.terra.com.br)
+
+        * fast/css/error-in-last-decl-expected.checksum: Added.
+        * fast/css/error-in-last-decl-expected.png: Added.
+        * fast/css/error-in-last-decl-expected.txt: Added.
+        * fast/css/error-in-last-decl.html: Added.
+
 2006-03-29  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Anders.
diff --git a/LayoutTests/fast/css/error-in-last-decl-expected.checksum b/LayoutTests/fast/css/error-in-last-decl-expected.checksum
new file mode 100644 (file)
index 0000000..d6ef0aa
--- /dev/null
@@ -0,0 +1 @@
+4879fd111819c1651e09f3cc91cb7916
\ No newline at end of file
diff --git a/LayoutTests/fast/css/error-in-last-decl-expected.png b/LayoutTests/fast/css/error-in-last-decl-expected.png
new file mode 100644 (file)
index 0000000..8cb7965
Binary files /dev/null and b/LayoutTests/fast/css/error-in-last-decl-expected.png differ
diff --git a/LayoutTests/fast/css/error-in-last-decl-expected.txt b/LayoutTests/fast/css/error-in-last-decl-expected.txt
new file mode 100644 (file)
index 0000000..02c9361
--- /dev/null
@@ -0,0 +1,22 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {TEXT} at (0,0) size 47x18
+          text run at (0,0) width 47: "test for "
+        RenderInline {A} at (0,0) size 60x18 [color=#0000EE]
+          RenderText {TEXT} at (47,0) size 60x18
+            text run at (47,0) width 60: "bug 7157"
+        RenderText {TEXT} at (107,0) size 659x18
+          text run at (107,0) width 659: ": An asterisk in a CSS property name breaks CSS handling (Many layout problems at letras.terra.com.br)"
+      RenderBlock {P} at (0,34) size 784x18 [color=#008000]
+        RenderText {TEXT} at (0,0) size 166x18
+          text run at (0,0) width 166: "Should be green on white."
+      RenderBlock {P} at (0,68) size 784x18 [color=#008000]
+        RenderText {TEXT} at (0,0) size 166x18
+          text run at (0,0) width 166: "Should be green on white."
+      RenderBlock {P} at (0,102) size 784x18 [color=#008000]
+        RenderText {TEXT} at (0,0) size 166x18
+          text run at (0,0) width 166: "Should be green on white."
diff --git a/LayoutTests/fast/css/error-in-last-decl.html b/LayoutTests/fast/css/error-in-last-decl.html
new file mode 100644 (file)
index 0000000..ed0d718
--- /dev/null
@@ -0,0 +1,29 @@
+<html>
+<head>
+<style>
+  #id1 {
+     color:green;
+     *background:black
+  }
+
+  #id2 {color:green;}
+</style> 
+<style>
+  #id3 {
+     *background:black
+  }
+
+  #id3 {color:green;}
+</style> 
+</head>
+
+<body>
+<p>test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=7157">bug 7157</a>:
+An asterisk in a CSS property name breaks CSS handling (Many layout problems at letras.terra.com.br)</p>
+
+<p id="id1">Should be green on white.</p>
+<p id="id2">Should be green on white.</p>
+<p id="id3">Should be green on white.</p>
+
+</body>
+</html>
index 58889ecb0c45c820ffa9fd7c89891c5c8bfc966f..78e6639f609f076183c8c25934bcb438eb91dece 100644 (file)
@@ -1,3 +1,16 @@
+2006-03-29  Alexey Proskuryakov  <ap@nypop.com>
+
+        Reviewed by Darin.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7157
+          An asterisk in a CSS property name breaks CSS handling 
+          (Many layout problems at letras.terra.com.br)
+
+        Test: fast/css/error-in-last-decl.html
+
+        * css/CSSGrammar.y: Added a rule for the case when the last CSS rule 
+          has a syntax error, and doesn't end with a semicolon.
+
 2006-03-29  Darin Adler  <darin@apple.com>
 
         Reviewed by Anders.
index aec0fe6c9756355251da09e54917d2f317b36d90..17a0f331b68253addfe987257e456eb7b9c5cefd 100644 (file)
@@ -4,6 +4,7 @@
  *  This file is part of the KDE libraries
  *  Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org)
  *  Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ *  Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
  * 
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -763,6 +764,9 @@ declaration_list:
     | error {
         $$ = false;
     }
+    | decl_list error {
+        $$ = $1;
+    }
     ;
 
 decl_list: