Use the location in the error value when reporting a CSS error

This commit is contained in:
Simon Sapin 2017-10-05 19:00:48 +02:00
parent c0f8f15f39
commit c64374bc58
10 changed files with 34 additions and 27 deletions

View file

@ -263,10 +263,11 @@ where
},
Err(err) => {
media_queries.push(MediaQuery::never_matching());
let location = err.location;
let error = ContextualParseError::InvalidMediaRule(
input.slice_from(start_position), err);
let error_context = ParserErrorContext { error_reporter };
context.log_css_error(&error_context, input.current_source_location(), error);
context.log_css_error(&error_context, location, error);
},
}