Diff
Modified: branches/safari-537-branch/LayoutTests/ChangeLog (152468 => 152469)
--- branches/safari-537-branch/LayoutTests/ChangeLog 2013-07-08 23:02:14 UTC (rev 152468)
+++ branches/safari-537-branch/LayoutTests/ChangeLog 2013-07-08 23:32:04 UTC (rev 152469)
@@ -1,5 +1,9 @@
2013-07-08 Lucas Forschler <[email protected]>
+ Rollout r151510. <rdar://problem/14380353>
+
+2013-07-08 Lucas Forschler <[email protected]>
+
Merge r151737
2013-06-19 Robert Hogan <[email protected]>
Deleted: branches/safari-537-branch/LayoutTests/fast/css/parsing-expr-error-recovery-expected.txt (152468 => 152469)
--- branches/safari-537-branch/LayoutTests/fast/css/parsing-expr-error-recovery-expected.txt 2013-07-08 23:02:14 UTC (rev 152468)
+++ branches/safari-537-branch/LayoutTests/fast/css/parsing-expr-error-recovery-expected.txt 2013-07-08 23:32:04 UTC (rev 152469)
@@ -1,3 +0,0 @@
-Tests that CSS parser correctly recovers after {}, () and [] invalid blocks.
-All tests passed
-
Deleted: branches/safari-537-branch/LayoutTests/fast/css/parsing-expr-error-recovery.html (152468 => 152469)
--- branches/safari-537-branch/LayoutTests/fast/css/parsing-expr-error-recovery.html 2013-07-08 23:02:14 UTC (rev 152468)
+++ branches/safari-537-branch/LayoutTests/fast/css/parsing-expr-error-recovery.html 2013-07-08 23:32:04 UTC (rev 152469)
@@ -1,33 +0,0 @@
-<html>
-<body>
-<div>Tests that CSS parser correctly recovers after {}, () and [] invalid blocks.</div>
-<div id="result"></div>
-<div id="tests"></div>
-<script type="text/_javascript_">
-if (window.testRunner)
- testRunner.dumpAsText();
-
-var BASE_EXPR = "1px,\"x\",var(y) /calc(1px + (((5px)))),-webkit-min(1px,2px)";
-var INVALID_BLOCKS = ["#", "{}", "()", "[]", "{(){{}{{}}[]}}", "(})", "(])", "[}]", "[)]", "{)}", "{]}", "#({})"];
-
-var tests = document.getElementById("tests");
-for (var i = 0; i <= BASE_EXPR.length; i++) {
- for (var j = 0; j < INVALID_BLOCKS.length; j++) {
- var invalidExpr = BASE_EXPR.substr(0, i) + INVALID_BLOCKS[j] + BASE_EXPR.substr(i);
- var test = document.createElement("DIV");
- test.textContent = "failed: " + invalidExpr;
- test.style.cssText = "color:" + invalidExpr + "; display: none;";
- tests.appendChild(test);
- }
-}
-
-var failed = 0;
-for (var test = tests.firstChild; test; test = test.nextSibling) {
- if (getComputedStyle(test).display != "none")
- failed++;
-}
-
-document.getElementById("result").textContent = failed ? "Failed " + failed + " tests" : "All tests passed";
-
-</script>
-</body>
Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (152468 => 152469)
--- branches/safari-537-branch/Source/WebCore/ChangeLog 2013-07-08 23:02:14 UTC (rev 152468)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog 2013-07-08 23:32:04 UTC (rev 152469)
@@ -1,5 +1,9 @@
2013-07-08 Lucas Forschler <[email protected]>
+ Rollout r151510. <rdar://problem/14380353>
+
+2013-07-08 Lucas Forschler <[email protected]>
+
Merge r152306
2013-07-02 Geoffrey Garen <[email protected]>
Modified: branches/safari-537-branch/Source/WebCore/css/CSSGrammar.y.in (152468 => 152469)
--- branches/safari-537-branch/Source/WebCore/css/CSSGrammar.y.in 2013-07-08 23:02:14 UTC (rev 152468)
+++ branches/safari-537-branch/Source/WebCore/css/CSSGrammar.y.in 2013-07-08 23:32:04 UTC (rev 152469)
@@ -321,14 +321,12 @@
%type <character> operator
%type <valueList> expr
-%type <valueList> valid_expr
%type <value> term
%type <value> unary_term
%type <value> function
%type <value> calc_func_term
%type <character> calc_func_operator
%type <valueList> calc_func_expr
-%type <valueList> valid_calc_func_expr
%type <valueList> calc_func_expr_list
%type <valueList> calc_func_paren_expr
%type <value> calc_function
@@ -1640,16 +1638,11 @@
;
expr:
- valid_expr
- | valid_expr expr_recovery { $$ = 0; }
- ;
-
-valid_expr:
term {
$$ = parser->createFloatingValueList();
$$->addValue(parser->sinkFloatingValue($1));
}
- | valid_expr operator term {
+ | expr operator term {
$$ = $1;
if ($$) {
if ($2) {
@@ -1662,6 +1655,9 @@
$$->addValue(parser->sinkFloatingValue($3));
}
}
+ | expr expr_recovery {
+ $$ = 0;
+ }
;
expr_recovery:
@@ -1833,11 +1829,6 @@
;
calc_func_expr:
- valid_calc_func_expr
- | valid_calc_func_expr expr_recovery { $$ = 0; }
- ;
-
-valid_calc_func_expr:
calc_func_term {
$$ = parser->createFloatingValueList();
$$->addValue(parser->sinkFloatingValue($1));
@@ -1868,6 +1859,9 @@
$$ = 0;
}
| calc_func_paren_expr
+ | calc_func_expr error {
+ $$ = 0;
+ }
;
calc_func_expr_list:
@@ -1965,26 +1959,19 @@
;
invalid_block:
- '{' error_recovery closing_brace {
+ '{' error invalid_block_list error closing_brace {
parser->invalidBlockHit();
}
+ | '{' error closing_brace {
+ parser->invalidBlockHit();
+ }
;
-invalid_square_brackets_block:
- '[' error_recovery ']'
- | '[' error_recovery TOKEN_EOF
- ;
+invalid_block_list:
+ invalid_block
+ | invalid_block_list error invalid_block
+;
-invalid_parentheses_block:
- opening_parenthesis error_recovery closing_parenthesis;
-
-opening_parenthesis:
- '(' | FUNCTION | CALCFUNCTION | VARFUNCTION | MINFUNCTION | MAXFUNCTION | ANYFUNCTION | NOTFUNCTION
-#if ENABLE_VIDEO_TRACK
- | CUEFUNCTION
-#endif
- ;
-
error_location: {
$$ = parser->currentLocation();
}
@@ -1992,10 +1979,8 @@
error_recovery:
/* empty */
- | error_recovery error
| error_recovery invalid_block
- | error_recovery invalid_square_brackets_block
- | error_recovery invalid_parentheses_block
+ | error_recovery error
;
%%