mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #22385 - servo:rustup, r=SimonSapin
Upgrade to rustc 1.33.0-nightly (fb86d604b 2018-12-27) <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22385) <!-- Reviewable:end -->
This commit is contained in:
commit
8de1b8d3f4
217 changed files with 1218 additions and 1366 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)
|
||||
})
|
||||
},
|
||||
|
|
|
@ -449,9 +449,7 @@ where
|
|||
ref local_name,
|
||||
never_matches,
|
||||
..
|
||||
}
|
||||
if !never_matches =>
|
||||
{
|
||||
} if !never_matches => {
|
||||
if !visitor.visit_attribute_selector(
|
||||
&NamespaceConstraint::Specific(&namespace_empty_string::<Impl>()),
|
||||
local_name,
|
||||
|
@ -459,7 +457,7 @@ where
|
|||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
AttributeOther(ref attr_selector) if !attr_selector.never_matches => {
|
||||
let empty_string;
|
||||
let namespace = match attr_selector.namespace() {
|
||||
|
@ -1366,7 +1364,7 @@ where
|
|||
SelectorParseErrorKind::DanglingCombinator
|
||||
} else {
|
||||
SelectorParseErrorKind::EmptySelector
|
||||
}))
|
||||
}));
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -1634,7 +1632,7 @@ where
|
|||
OptionalQName::None(t) => {
|
||||
return Err(input.new_custom_error(
|
||||
SelectorParseErrorKind::NoQualifiedNameInAttributeSelector(t),
|
||||
))
|
||||
));
|
||||
},
|
||||
OptionalQName::Some(_, None) => unreachable!(),
|
||||
OptionalQName::Some(ns, Some(ln)) => {
|
||||
|
@ -1691,7 +1689,7 @@ where
|
|||
Ok(t) => {
|
||||
return Err(location.new_custom_error(
|
||||
SelectorParseErrorKind::UnexpectedTokenInAttributeSelector(t.clone()),
|
||||
))
|
||||
));
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -1768,11 +1766,12 @@ impl AttributeFlags {
|
|||
AttributeFlags::CaseSensitive => ParsedCaseSensitivity::ExplicitCaseSensitive,
|
||||
AttributeFlags::AsciiCaseInsensitive => ParsedCaseSensitivity::AsciiCaseInsensitive,
|
||||
AttributeFlags::CaseSensitivityDependsOnName => {
|
||||
if !have_namespace && include!(concat!(
|
||||
env!("OUT_DIR"),
|
||||
"/ascii_case_insensitive_html_attributes.rs"
|
||||
))
|
||||
.contains(local_name)
|
||||
if !have_namespace &&
|
||||
include!(concat!(
|
||||
env!("OUT_DIR"),
|
||||
"/ascii_case_insensitive_html_attributes.rs"
|
||||
))
|
||||
.contains(local_name)
|
||||
{
|
||||
ParsedCaseSensitivity::AsciiCaseInsensitiveIfInHtmlElementInHtmlDocument
|
||||
} else {
|
||||
|
@ -1961,7 +1960,7 @@ where
|
|||
&Token::Ident(ref name) => name.clone(),
|
||||
t => {
|
||||
return Err(location
|
||||
.new_custom_error(SelectorParseErrorKind::NoIdentForPseudo(t.clone())))
|
||||
.new_custom_error(SelectorParseErrorKind::NoIdentForPseudo(t.clone())));
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue