mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Use the location in the error value when reporting a CSS error
This commit is contained in:
parent
c0f8f15f39
commit
c64374bc58
10 changed files with 34 additions and 27 deletions
|
@ -525,8 +525,9 @@ impl<'a, 'i, R: ParseErrorReporter> QualifiedRuleParser<'i> for KeyframeListPars
|
|||
})
|
||||
},
|
||||
Err(e) => {
|
||||
let location = e.location;
|
||||
let error = ContextualParseError::InvalidKeyframeRule(input.slice_from(start_position), e.clone());
|
||||
self.context.log_css_error(self.error_context, input.current_source_location(), error);
|
||||
self.context.log_css_error(self.error_context, location, error);
|
||||
Err(e)
|
||||
}
|
||||
}
|
||||
|
@ -554,8 +555,9 @@ impl<'a, 'i, R: ParseErrorReporter> QualifiedRuleParser<'i> for KeyframeListPars
|
|||
}
|
||||
Err((error, slice)) => {
|
||||
iter.parser.declarations.clear();
|
||||
let location = error.location;
|
||||
let error = ContextualParseError::UnsupportedKeyframePropertyDeclaration(slice, error);
|
||||
context.log_css_error(self.error_context, iter.input.current_source_location(), error);
|
||||
context.log_css_error(self.error_context, location, error);
|
||||
}
|
||||
}
|
||||
// `parse_important` is not called here, `!important` is not allowed in keyframe blocks.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue