mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Run rustfmt on selectors, servo_arc, and style.
This was generated with: ./mach cargo fmt --package selectors && ./mach cargo fmt --package servo_arc && ./mach cargo fmt --package style Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
This commit is contained in:
parent
f7ae1a37e3
commit
c99bcdd4b8
181 changed files with 9981 additions and 7933 deletions
|
@ -16,7 +16,7 @@ use sharing::{StyleSharingCandidate, StyleSharingTarget};
|
|||
/// sharing.
|
||||
pub fn parents_allow_sharing<E>(
|
||||
target: &mut StyleSharingTarget<E>,
|
||||
candidate: &mut StyleSharingCandidate<E>
|
||||
candidate: &mut StyleSharingCandidate<E>,
|
||||
) -> bool
|
||||
where
|
||||
E: TElement,
|
||||
|
@ -58,7 +58,7 @@ where
|
|||
/// Whether two elements have the same same style attribute (by pointer identity).
|
||||
pub fn have_same_style_attribute<E>(
|
||||
target: &mut StyleSharingTarget<E>,
|
||||
candidate: &mut StyleSharingCandidate<E>
|
||||
candidate: &mut StyleSharingCandidate<E>,
|
||||
) -> bool
|
||||
where
|
||||
E: TElement,
|
||||
|
@ -66,14 +66,14 @@ where
|
|||
match (target.style_attribute(), candidate.style_attribute()) {
|
||||
(None, None) => true,
|
||||
(Some(_), None) | (None, Some(_)) => false,
|
||||
(Some(a), Some(b)) => &*a as *const _ == &*b as *const _
|
||||
(Some(a), Some(b)) => &*a as *const _ == &*b as *const _,
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether two elements have the same same presentational attributes.
|
||||
pub fn have_same_presentational_hints<E>(
|
||||
target: &mut StyleSharingTarget<E>,
|
||||
candidate: &mut StyleSharingCandidate<E>
|
||||
candidate: &mut StyleSharingCandidate<E>,
|
||||
) -> bool
|
||||
where
|
||||
E: TElement,
|
||||
|
@ -114,18 +114,10 @@ where
|
|||
{
|
||||
let stylist = &shared_context.stylist;
|
||||
|
||||
let for_element = target.revalidation_match_results(
|
||||
stylist,
|
||||
bloom,
|
||||
nth_index_cache,
|
||||
selector_flags_map,
|
||||
);
|
||||
let for_element =
|
||||
target.revalidation_match_results(stylist, bloom, nth_index_cache, selector_flags_map);
|
||||
|
||||
let for_candidate = candidate.revalidation_match_results(
|
||||
stylist,
|
||||
bloom,
|
||||
nth_index_cache,
|
||||
);
|
||||
let for_candidate = candidate.revalidation_match_results(stylist, bloom, nth_index_cache);
|
||||
|
||||
// This assert "ensures", to some extent, that the two candidates have
|
||||
// matched the same rulehash buckets, and as such, that the bits we're
|
||||
|
@ -156,7 +148,7 @@ where
|
|||
|
||||
let may_have_rules_for_element = match element_id {
|
||||
Some(id) => stylist.may_have_rules_for_id(id, element),
|
||||
None => false
|
||||
None => false,
|
||||
};
|
||||
|
||||
if may_have_rules_for_element {
|
||||
|
@ -165,6 +157,6 @@ where
|
|||
|
||||
match candidate_id {
|
||||
Some(id) => stylist.may_have_rules_for_id(id, candidate),
|
||||
None => false
|
||||
None => false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue