mirror of
https://github.com/servo/servo.git
synced 2025-07-04 05:53:39 +01:00
Short-circuit and unindent
This commit is contained in:
parent
76166bce58
commit
c06e574c18
1 changed files with 29 additions and 31 deletions
|
@ -427,8 +427,8 @@ fn matches_simple_selector<E, F>(
|
||||||
never_matches,
|
never_matches,
|
||||||
} => {
|
} => {
|
||||||
if never_matches {
|
if never_matches {
|
||||||
false
|
return false
|
||||||
} else {
|
}
|
||||||
let is_html = element.is_html_element_in_html_document();
|
let is_html = element.is_html_element_in_html_document();
|
||||||
element.attr_matches(
|
element.attr_matches(
|
||||||
&NamespaceConstraint::Specific(&::parser::namespace_empty_string::<E::Impl>()),
|
&NamespaceConstraint::Specific(&::parser::namespace_empty_string::<E::Impl>()),
|
||||||
|
@ -440,11 +440,10 @@ fn matches_simple_selector<E, F>(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Component::AttributeOther(ref attr_sel) => {
|
Component::AttributeOther(ref attr_sel) => {
|
||||||
if attr_sel.never_matches {
|
if attr_sel.never_matches {
|
||||||
return false
|
return false
|
||||||
} else {
|
}
|
||||||
let is_html = element.is_html_element_in_html_document();
|
let is_html = element.is_html_element_in_html_document();
|
||||||
element.attr_matches(
|
element.attr_matches(
|
||||||
&attr_sel.namespace(),
|
&attr_sel.namespace(),
|
||||||
|
@ -465,7 +464,6 @@ fn matches_simple_selector<E, F>(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Component::NonTSPseudoClass(ref pc) => {
|
Component::NonTSPseudoClass(ref pc) => {
|
||||||
element.match_non_ts_pseudo_class(pc, context, flags_setter)
|
element.match_non_ts_pseudo_class(pc, context, flags_setter)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue