зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #19237 - Use InvalidRule for nested rule list (from upsuper:error-nested-rule); r=emilio
This fixes [bug 1417548](https://bugzilla.mozilla.org/show_bug.cgi?id=1417548). Apparently it makes no sense to have different error between top level rules and nested rules. Source-Repo: https://github.com/servo/servo Source-Revision: bf29f64bf699154c8cbb22a13495c43a49ed5f96 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 4c53e18163852c8eaaa9ad88f21e6d7d46222900
This commit is contained in:
Родитель
44a4072755
Коммит
f8d3415d25
|
@ -331,7 +331,7 @@ impl<'a, 'b, R: ParseErrorReporter> NestedRuleParser<'a, 'b, R> {
|
|||
Ok(rule) => rules.push(rule),
|
||||
Err((error, slice)) => {
|
||||
let location = error.location;
|
||||
let error = ContextualParseError::UnsupportedRule(slice, error);
|
||||
let error = ContextualParseError::InvalidRule(slice, error);
|
||||
self.context.log_css_error(self.error_context, location, error);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -354,9 +354,8 @@ fn test_report_error_stylesheet() {
|
|||
// When @font-feature-values is supported, this should be replaced with two errors
|
||||
(15, 25, "Invalid rule: '@font-feature-values "),
|
||||
|
||||
// FIXME: the message of these two should be consistent
|
||||
(16, 13, "Invalid rule: '@invalid'"),
|
||||
(17, 29, "Unsupported rule: '@invalid'"),
|
||||
(17, 29, "Invalid rule: '@invalid'"),
|
||||
|
||||
(18, 34, "Invalid rule: '@supports "),
|
||||
(19, 26, "Invalid keyframe rule: 'from invalid '"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче