mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #18444 - ferjm:bug1384221.alias.errors, r=jdm
stylo: Fix error reporting for invalid values in property alias - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [bug 1384221](https://bugzilla.mozilla.org/show_bug.cgi?id=1384221) - [X] There are [tests](https://bug1384221.bmoattachments.org/attachment.cgi?id=8906527) for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18444) <!-- Reviewable:end -->
This commit is contained in:
commit
d2b689cf2e
4 changed files with 15 additions and 13 deletions
|
@ -951,7 +951,8 @@ pub fn parse_one_declaration_into<R>(declarations: &mut SourcePropertyDeclaratio
|
|||
let start_position = parser.position();
|
||||
let start_location = parser.current_source_location();
|
||||
parser.parse_entirely(|parser| {
|
||||
PropertyDeclaration::parse_into(declarations, id, &context, parser)
|
||||
let name = id.name().into();
|
||||
PropertyDeclaration::parse_into(declarations, id, name, &context, parser)
|
||||
.map_err(|e| e.into())
|
||||
}).map_err(|err| {
|
||||
let error = ContextualParseError::UnsupportedPropertyDeclaration(
|
||||
|
@ -1000,7 +1001,7 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for PropertyDeclarationParser<'a, 'b> {
|
|||
}
|
||||
};
|
||||
input.parse_until_before(Delimiter::Bang, |input| {
|
||||
PropertyDeclaration::parse_into(self.declarations, id, self.context, input)
|
||||
PropertyDeclaration::parse_into(self.declarations, id, name, self.context, input)
|
||||
.map_err(|e| e.into())
|
||||
})?;
|
||||
let importance = match input.try(parse_important) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue