зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1711189 - Avoid returning fmt::Errors for things that are not formatting errors.
They are not. The serialization code already checks if the result is empty, which can happen for other reasons. This makes the code a bit more resilient to misuse. Differential Revision: https://phabricator.services.mozilla.com/D115133
This commit is contained in:
Родитель
1ba2a99de2
Коммит
df834cf40d
|
@ -1486,13 +1486,13 @@ impl ShorthandId {
|
|||
// shorthand, since it only accepts CSS-wide keywords (and
|
||||
// variable references), which will be handled in
|
||||
// get_shorthand_appendable_value.
|
||||
Err(fmt::Error)
|
||||
Ok(())
|
||||
}
|
||||
% for property in data.shorthands_except_all():
|
||||
ShorthandId::${property.camel_case} => {
|
||||
match shorthands::${property.ident}::LonghandsToSerialize::from_iter(declarations) {
|
||||
Ok(longhands) => longhands.to_css(dest),
|
||||
Err(_) => Err(fmt::Error)
|
||||
Err(_) => Ok(())
|
||||
}
|
||||
},
|
||||
% endfor
|
||||
|
|
Загрузка…
Ссылка в новой задаче