Commit 0413cb79 authored by kevino@webkit.org's avatar kevino@webkit.org

Reviewed by Dave Hyatt.

Gracefully handle a CSS rule containing an invalid value.
(Fixes http://bugs.webkit.org/show_bug.cgi?id=16898)


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 34b364b3
2008-03-02 Kevin Ollivier <kevino@theolliviers.com>
Reviewed by Dave Hyatt.
Gracefully handle a CSS rule containing an invalid value.
(Fixes http://bugs.webkit.org/show_bug.cgi?id=16898)
* fast/css/invalid-rule-value-expected.txt: Added.
* fast/css/invalid-rule-value.html: Added.
2008-03-01 Oliver Hunt <oliver@apple.com>
Reviewed by Sam Weinig.
This test checks that a rule with an invalid value does not halt other style rules from being applied.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.getElementById('test-invalid-rule').style.getPropertyValue('color') is 'rgb(0, 128, 0)'
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../js/resources/js-test-style.css">
<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<div id="test-invalid-rule" style="weight: *; color: rgb(0, 128, 0)"></div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This test checks that a rule with an invalid value does not halt other style rules from being applied.");
shouldBe("document.getElementById('test-invalid-rule').style.getPropertyValue('color')", "'rgb(0, 128, 0)'");
var successfullyParsed = true;
</script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>
2008-03-02 Kevin Ollivier <kevino@theolliviers.com>
Reviewed by Dave Hyatt.
Gracefully handle a CSS rule containing an invalid value.
(Fixes http://bugs.webkit.org/show_bug.cgi?id=16898)
* css/CSSGrammar.y:
2008-03-02 Alp Toker <alp@atoker.com>
Reviewed by Mark Rowe.
......@@ -985,6 +985,11 @@ declaration:
/* div { font-family: } Just reduce away this property with no value. */
$$ = false;
}
|
property ':' maybe_space error {
/* if we come across rules with invalid values like this case: p { weight: *; }, just discard the rule */
$$ = false;
}
;
property:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment