Bug 589672. Parsing of malformed namespace rules can skip over too many tokens while recovering. r=dbaron, a=dbaron

This commit is contained in:
Boris Zbarsky 2010-08-25 14:54:48 -04:00
parent 93fcecfc48
commit ea10f33cc0
4 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<style>
body { color: green; }
</style>
</head>
<body>This should be green</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<style>
body { color: red; }
</style>
<style>
@namespace;
body { color: green }
</style>
</head>
<body>This should be green</body>
</html>

View File

@ -1494,4 +1494,5 @@ random-if(d2d) == 555388-1.html 555388-1-ref.html
== 582037-2b.html 582037-2-ref.html
== 584400-dash-length.svg 584400-dash-length-ref.svg
== 585598-2.xhtml 585598-2-ref.xhtml
== 589672-1.html 589672-1-ref.html
== 586400-1.html 586400-1-ref.html

View File

@ -2084,6 +2084,7 @@ CSSParserImpl::ParseNameSpaceRule(RuleAppendFunc aAppendFunc, void* aData)
}
}
REPORT_UNEXPECTED_TOKEN(PEAtNSUnexpected);
UngetToken();
return PR_FALSE;
}