style: Deindent the serialization loop.

Bug: 1471063
Reviewed-by: xidorn
MozReview-Commit-ID: GPlUAx7YXVb
This commit is contained in:
Emilio Cobos Álvarez 2018-06-26 00:30:52 +02:00
parent aca724ec79
commit 84280c5203
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -1007,8 +1007,10 @@ impl<Impl: SelectorImpl> ToCss for Selector<Impl> {
debug_assert!(!combinators_exhausted); debug_assert!(!combinators_exhausted);
// https://drafts.csswg.org/cssom/#serializing-selectors // https://drafts.csswg.org/cssom/#serializing-selectors
if compound.is_empty() {
continue;
}
if !compound.is_empty() {
// 1. If there is only one simple selector in the compound selectors // 1. If there is only one simple selector in the compound selectors
// which is a universal selector, append the result of // which is a universal selector, append the result of
// serializing the universal selector to s. // serializing the universal selector to s.
@ -1019,11 +1021,11 @@ impl<Impl: SelectorImpl> ToCss for Selector<Impl> {
// //
// If we are in this case, after we have serialized the universal // If we are in this case, after we have serialized the universal
// selector, we skip Step 2 and continue with the algorithm. // selector, we skip Step 2 and continue with the algorithm.
let (can_elide_namespace, first_non_namespace) = match &compound[0] { let (can_elide_namespace, first_non_namespace) = match compound[0] {
&Component::ExplicitAnyNamespace | Component::ExplicitAnyNamespace |
&Component::ExplicitNoNamespace | Component::ExplicitNoNamespace |
&Component::Namespace(_, _) => (false, 1), Component::Namespace(..) => (false, 1),
&Component::DefaultNamespace(_) => (true, 1), Component::DefaultNamespace(..) => (true, 1),
_ => (true, 0), _ => (true, 0),
}; };
let mut perform_step_2 = true; let mut perform_step_2 = true;
@ -1074,7 +1076,6 @@ impl<Impl: SelectorImpl> ToCss for Selector<Impl> {
simple.to_css(dest)?; simple.to_css(dest)?;
} }
} }
}
// 3. If this is not the last part of the chain of the selector // 3. If this is not the last part of the chain of the selector
// append a single SPACE (U+0020), followed by the combinator // append a single SPACE (U+0020), followed by the combinator