mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Rustfmt has changed its default style :/
This commit is contained in:
parent
82fc6d9f49
commit
be69f9c3e6
207 changed files with 1200 additions and 1339 deletions
|
@ -261,10 +261,11 @@ where
|
|||
let iter = selector.iter_from(selector.len() - from_offset);
|
||||
debug_assert!(
|
||||
iter.clone().next().is_some() ||
|
||||
(from_offset != selector.len() && matches!(
|
||||
selector.combinator_at_parse_order(from_offset),
|
||||
Combinator::SlotAssignment | Combinator::PseudoElement
|
||||
)),
|
||||
(from_offset != selector.len() &&
|
||||
matches!(
|
||||
selector.combinator_at_parse_order(from_offset),
|
||||
Combinator::SlotAssignment | Combinator::PseudoElement
|
||||
)),
|
||||
"Got the math wrong: {:?} | {:?} | {} {}",
|
||||
selector,
|
||||
selector.iter_raw_match_order().as_slice(),
|
||||
|
@ -454,11 +455,9 @@ where
|
|||
context.current_host.is_some(),
|
||||
"Should not be trying to match slotted rules in a non-shadow-tree context"
|
||||
);
|
||||
debug_assert!(
|
||||
element
|
||||
.assigned_slot()
|
||||
.map_or(true, |s| s.is_html_slot_element())
|
||||
);
|
||||
debug_assert!(element
|
||||
.assigned_slot()
|
||||
.map_or(true, |s| s.is_html_slot_element()));
|
||||
let scope = context.current_host?;
|
||||
let mut current_slot = element.assigned_slot()?;
|
||||
while current_slot.containing_shadow_host().unwrap().opaque() != scope {
|
||||
|
@ -674,9 +673,9 @@ where
|
|||
Component::Combinator(_) => unreachable!(),
|
||||
Component::Slotted(ref selector) => {
|
||||
// <slots> are never flattened tree slottables.
|
||||
!element.is_html_slot_element() && element.assigned_slot().is_some() && context
|
||||
.shared
|
||||
.nest(|context| {
|
||||
!element.is_html_slot_element() &&
|
||||
element.assigned_slot().is_some() &&
|
||||
context.shared.nest(|context| {
|
||||
matches_complex_selector(selector.iter(), element, context, flags_setter)
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue