Use the current parser location for CSS error

… rather than the start location of the current construct.
This likely places the error just *after* of the unexpected token
whereas before would be best, but that’s likely a much bigger change.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1378861
This commit is contained in:
Simon Sapin 2017-09-21 01:44:53 +02:00
parent bc0903c928
commit 056e599562
10 changed files with 34 additions and 31 deletions

View file

@ -333,7 +333,8 @@ impl<'a, 'b, R: ParseErrorReporter> NestedRuleParser<'a, 'b, R> {
Ok(rule) => rules.push(rule),
Err(err) => {
let error = ContextualParseError::UnsupportedRule(err.slice, err.error);
self.context.log_css_error(self.error_context, err.location, error);
let location = iter.input.current_source_location();
self.context.log_css_error(self.error_context, location, error);
}
}
}