Roll out r35261
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Jul 2008 14:45:40 +0000 (14:45 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Jul 2008 14:45:40 +0000 (14:45 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35266 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/css2.1/t040105-import-01-b-expected.checksum
LayoutTests/platform/mac/css2.1/t040105-import-01-b-expected.png [deleted file]
LayoutTests/platform/mac/css2.1/t040105-import-01-b-expected.txt
LayoutTests/platform/mac/css2.1/t0402-syntax-05-f-expected.checksum
LayoutTests/platform/mac/css2.1/t0402-syntax-05-f-expected.png [deleted file]
LayoutTests/platform/mac/css2.1/t0402-syntax-05-f-expected.txt
LayoutTests/platform/mac/css2.1/t0402-syntax-06-f-expected.checksum
LayoutTests/platform/mac/css2.1/t0402-syntax-06-f-expected.png [deleted file]
LayoutTests/platform/mac/css2.1/t0402-syntax-06-f-expected.txt
WebCore/ChangeLog
WebCore/css/CSSGrammar.y

index 2d4f09606b23ac525cc03f2b53777fdcf7e4c209..8801c70b1aac2f6846694c792027a1cd43df749b 100644 (file)
@@ -1,20 +1,3 @@
-2008-07-21  Anatoli Papirovski  <apapirovski@mac.com>
-
-        Reviewed by Dave Hyatt.
-
-        Updated layout CSS2.1 test suite tests related to css parsing:
-        https://bugs.webkit.org/show_bug.cgi?id=14346
-
-        * platform/mac/css2.1/t040105-import-01-b-expected.checksum:
-        * platform/mac/css2.1/t040105-import-01-b-expected.png:
-        * platform/mac/css2.1/t040105-import-01-b-expected.txt:
-        * platform/mac/css2.1/t0402-syntax-05-f-expected.checksum:
-        * platform/mac/css2.1/t0402-syntax-05-f-expected.png:
-        * platform/mac/css2.1/t0402-syntax-05-f-expected.txt:
-        * platform/mac/css2.1/t0402-syntax-06-f-expected.checksum:
-        * platform/mac/css2.1/t0402-syntax-06-f-expected.png:
-        * platform/mac/css2.1/t0402-syntax-06-f-expected.txt:
-
 2008-07-20  Oliver Hunt  <oliver@apple.com>
 
         RS=Dan Bernstein.
index 484b81bccb937538ed183aa0ed787b7d8fcbbc52..bf95762a28fcb71350b085732bccff9c0024901e 100644 (file)
@@ -1 +1 @@
-7c6c531b985d3cf4a81611af231d0459
\ No newline at end of file
+48c586c471d31538fa826a547aa46c60
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/css2.1/t040105-import-01-b-expected.png b/LayoutTests/platform/mac/css2.1/t040105-import-01-b-expected.png
deleted file mode 100644 (file)
index 2901ac3..0000000
Binary files a/LayoutTests/platform/mac/css2.1/t040105-import-01-b-expected.png and /dev/null differ
index 342338142c5c131040f63fd182f1181524c218a9..a7a1558c3fe2fbe197760b7d5dc4105d0ae940c4 100644 (file)
@@ -3,6 +3,6 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x50
   RenderBlock {HTML} at (0,0) size 800x50
     RenderBody {BODY} at (8,16) size 784x18
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
+      RenderBlock {P} at (0,0) size 784x18
         RenderText {#text} at (0,0) size 136x18
           text run at (0,0) width 136: "This should be green."
index 45cf432dd3a9989e2705597e87a96f38b1fef02c..3bb17291f7d3050b614ddf8e9da27d2cc8cb6fda 100644 (file)
@@ -1 +1 @@
-17855c59caf75f290cd968f9b98ed820
\ No newline at end of file
+3445deb21395438f6e171e928bb89c2f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/css2.1/t0402-syntax-05-f-expected.png b/LayoutTests/platform/mac/css2.1/t0402-syntax-05-f-expected.png
deleted file mode 100644 (file)
index 9c68654..0000000
Binary files a/LayoutTests/platform/mac/css2.1/t0402-syntax-05-f-expected.png and /dev/null differ
index 5a17d6f4ea79a399ca8b583d6310f796aa1f451e..68c005a9b0436760afdd9cef5ce8293358ac86e8 100644 (file)
@@ -3,6 +3,6 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x50
   RenderBlock {HTML} at (0,0) size 800x50
     RenderBody {BODY} at (8,16) size 784x18
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
+      RenderBlock {P} at (0,0) size 784x18 [color=#800000]
         RenderText {#text} at (0,0) size 159x18
           text run at (0,0) width 159: "This text should be green"
index 45cf432dd3a9989e2705597e87a96f38b1fef02c..3bb17291f7d3050b614ddf8e9da27d2cc8cb6fda 100644 (file)
@@ -1 +1 @@
-17855c59caf75f290cd968f9b98ed820
\ No newline at end of file
+3445deb21395438f6e171e928bb89c2f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/css2.1/t0402-syntax-06-f-expected.png b/LayoutTests/platform/mac/css2.1/t0402-syntax-06-f-expected.png
deleted file mode 100644 (file)
index 9c68654..0000000
Binary files a/LayoutTests/platform/mac/css2.1/t0402-syntax-06-f-expected.png and /dev/null differ
index 5a17d6f4ea79a399ca8b583d6310f796aa1f451e..68c005a9b0436760afdd9cef5ce8293358ac86e8 100644 (file)
@@ -3,6 +3,6 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x50
   RenderBlock {HTML} at (0,0) size 800x50
     RenderBody {BODY} at (8,16) size 784x18
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
+      RenderBlock {P} at (0,0) size 784x18 [color=#800000]
         RenderText {#text} at (0,0) size 159x18
           text run at (0,0) width 159: "This text should be green"
index 49bc022f7ec1873baee4e60316bdb7c6cfba5ef8..912589504f6ca7e26dd9cc7c7a1740253ce8cf32 100644 (file)
         * plugins/win/PluginViewWin.cpp:
         (windowHandleForPlatformWidget):
 
-2008-07-21  Anatoli Papirovski  <apapirovski@mac.com>
-
-        Reviewed by Dave Hyatt.
-
-        Fix for https://bugs.webkit.org/show_bug.cgi?id=14346
-        Modified the css parser:
-        - not to fail when closing braces are not found for 
-          a declaration at the end of the file
-        - not to accept "!important fail" as valid
-        - to keep accepting @import when it comes after invalid @ rules
-        - not to drop the whole @media block when there's an error before the 
-          closing brace
-        + some other minor css parsing revisions.
-
-        * css/CSSGrammar.y:
-
 2008-07-20  Steve Falkenburg  <sfalken@apple.com>
 
         Touch file to force rebuild for vsprops change.
index 582f662ddae37ad90352d81badd013440cfc04de..f59a03208df962252bbdf81913ce5e58500a31f4 100644 (file)
@@ -85,12 +85,11 @@ static int cssyylex(YYSTYPE* yylval, void* parser)
 
 %}
 
-%expect 46
+%expect 44
 
 %left UNIMPORTANT_TOK
 
 %token WHITESPACE SGML_CD
-%token TOKEN_EOF 0
 
 %token INCLUDES
 %token DASHMATCH
@@ -169,14 +168,10 @@ static int cssyylex(YYSTYPE* yylval, void* parser)
 %type <rule> page
 %type <rule> font_face
 %type <rule> invalid_rule
-%type <rule> save_block
 %type <rule> invalid_at
 %type <rule> invalid_import
-%type <rule> invalid_media
 %type <rule> rule
 %type <rule> valid_rule
-%type <rule> block_rule
-%type <rule> block_valid_rule
 %type <rule> variables_rule
 
 %type <string> maybe_ns_prefix
@@ -198,7 +193,7 @@ static int cssyylex(YYSTYPE* yylval, void* parser)
 %type <mediaQueryExpList> media_query_exp_list
 %type <mediaQueryExpList> maybe_and_media_query_exp_list
 
-%type <ruleList> block_rule_list 
+%type <ruleList> ruleset_list
 
 %type <integer> property
 
@@ -305,12 +300,7 @@ maybe_charset:
    /* empty */
   | charset {
   }
-  ;
-
-closing_brace:
-    '}'
-  | %prec maybe_sgml TOKEN_EOF
-  ;
+;
 
 charset:
   CHARSET_SYM maybe_space STRING maybe_space ';' {
@@ -332,7 +322,6 @@ import_list:
      if ($2 && p->m_styleSheet)
          p->m_styleSheet->append($2);
  }
- | invalid_at_list
  ;
 
 variables_list:
@@ -372,46 +361,16 @@ rule:
   | invalid_import
   ;
 
-block_rule_list: 
-    /* empty */ { $$ = 0; }
-  | block_rule_list block_rule maybe_sgml {
-      $$ = $1;
-      if ($2) {
-          if (!$$)
-              $$ = static_cast<CSSParser*>(parser)->createRuleList();
-          $$->append($2);
-      }
-  }
-  ;
-
-block_valid_rule:
-    ruleset
-  | page
-  | font_face
-  ;
-
-block_rule:
-    block_valid_rule
-  | invalid_rule
-  | invalid_at
-  | invalid_import
-  | invalid_media
-  ;
-
-
 import:
     IMPORT_SYM maybe_space string_or_uri maybe_space maybe_media_list ';' {
         $$ = static_cast<CSSParser*>(parser)->createImportRule($3, $5);
     }
-  | IMPORT_SYM maybe_space string_or_uri maybe_space maybe_media_list invalid_block {
+  | IMPORT_SYM error invalid_block {
         $$ = 0;
     }
   | IMPORT_SYM error ';' {
         $$ = 0;
     }
-  | IMPORT_SYM error invalid_block {
-        $$ = 0;
-    }
   ;
 
 variables_rule:
@@ -611,14 +570,26 @@ media_list:
     ;
 
 media:
-    MEDIA_SYM maybe_space media_list '{' maybe_space block_rule_list save_block {
+    MEDIA_SYM maybe_space media_list '{' maybe_space ruleset_list '}' {
         $$ = static_cast<CSSParser*>(parser)->createMediaRule($3, $6);
     }
-    | MEDIA_SYM maybe_space '{' maybe_space block_rule_list save_block {
+    | MEDIA_SYM maybe_space '{' maybe_space ruleset_list '}' {
         $$ = static_cast<CSSParser*>(parser)->createMediaRule(0, $5);
     }
     ;
 
+ruleset_list:
+    /* empty */ { $$ = 0; }
+    | ruleset_list ruleset maybe_space {
+        $$ = $1;
+        if ($2) {
+            if (!$$)
+                $$ = static_cast<CSSParser*>(parser)->createRuleList();
+            $$->append($2);
+        }
+    }
+    ;
+
 medium:
   IDENT maybe_space {
       $$ = $1;
@@ -670,7 +641,7 @@ unary_operator:
   ;
 
 ruleset:
-    selector_list '{' maybe_space declaration_list closing_brace {
+    selector_list '{' maybe_space declaration_list '}' {
         $$ = static_cast<CSSParser*>(parser)->createStyleRule($1);
     }
   ;
@@ -1083,9 +1054,6 @@ declaration_list:
     | decl_list error {
         $$ = $1;
     }
-    | decl_list invalid_block_list {
-        $$ = $1;
-    }
     ;
 
 decl_list:
@@ -1140,11 +1108,6 @@ declaration:
         $$ = false;
     }
     |
-    property ':' maybe_space expr prio error {
-        /* When we encounter something like p {color: red !important fail;} we should drop the declaration */
-        $$ = false;
-    }
-    |
     IMPORTANT_SYM maybe_space {
         /* Handle this case: div { text-align: center; !important } Just reduce away the stray !important. */
         $$ = false;
@@ -1159,11 +1122,6 @@ declaration:
         /* if we come across rules with invalid values like this case: p { weight: *; }, just discard the rule */
         $$ = false;
     }
-    |
-    property invalid_block {
-        /* if we come across: div { color{;color:maroon} }, ignore everything within curly brackets */
-        $$ = false;
-    }
   ;
 
 property:
@@ -1298,15 +1256,6 @@ hexcolor:
 
 /* error handling rules */
 
-save_block:
-    closing_brace {
-        $$ = 0;
-    }
-  | error closing_brace {
-        $$ = 0;
-    }
-    ;
-
 invalid_at:
     ATKEYWORD error invalid_block {
         $$ = 0;
@@ -1316,28 +1265,16 @@ invalid_at:
     }
     ;
 
-invalid_at_list:
-  /* empty */
-  | invalid_at_list invalid_at maybe_sgml
-  ;
-
 invalid_import:
     import {
         $$ = 0;
     }
     ;
 
-invalid_media:
-    media {
-        $$ = 0;
-    }
-    ;
-
 invalid_rule:
     error invalid_block {
         $$ = 0;
     }
-
 /*
   Seems like the two rules below are trying too much and violating
   http://www.hixie.ch/tests/evil/mixed/csserrorhandling.html
@@ -1352,8 +1289,8 @@ invalid_rule:
     ;
 
 invalid_block:
-    '{' error invalid_block_list error closing_brace
-  | '{' error closing_brace
+    '{' error invalid_block_list error '}'
+  | '{' error '}'
     ;
 
 invalid_block_list: