mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Update nightly rustc.
This commit is contained in:
parent
74f1eb199e
commit
01681e79c4
20 changed files with 33 additions and 28 deletions
|
@ -143,7 +143,7 @@ impl NetworkListener {
|
||||||
//
|
//
|
||||||
// Ideally the Fetch code would handle manual redirects on its own
|
// Ideally the Fetch code would handle manual redirects on its own
|
||||||
self.initiate_fetch(None);
|
self.initiate_fetch(None);
|
||||||
}
|
},
|
||||||
_ => {
|
_ => {
|
||||||
// Response should be processed by script thread.
|
// Response should be processed by script thread.
|
||||||
self.should_send = true;
|
self.should_send = true;
|
||||||
|
|
|
@ -1787,7 +1787,7 @@ impl Fragment {
|
||||||
clip,
|
clip,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
SpecificFragmentInfo::ScannedText(ref text_fragment) => {
|
SpecificFragmentInfo::ScannedText(ref text_fragment) => {
|
||||||
// Create the main text display item.
|
// Create the main text display item.
|
||||||
self.build_display_list_for_text_fragment(
|
self.build_display_list_for_text_fragment(
|
||||||
|
|
|
@ -217,7 +217,7 @@ impl Floats {
|
||||||
max_inline_start is {:?}",
|
max_inline_start is {:?}",
|
||||||
max_inline_start
|
max_inline_start
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
FloatKind::Right
|
FloatKind::Right
|
||||||
if float_pos.i < min_inline_end &&
|
if float_pos.i < min_inline_end &&
|
||||||
float_pos.b + float_size.block > block_start &&
|
float_pos.b + float_size.block > block_start &&
|
||||||
|
@ -232,7 +232,7 @@ impl Floats {
|
||||||
is {:?}",
|
is {:?}",
|
||||||
min_inline_end
|
min_inline_end
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
FloatKind::Left | FloatKind::Right => {},
|
FloatKind::Left | FloatKind::Right => {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1037,7 +1037,7 @@ fn process_resolved_style_request_internal<'dom>(
|
||||||
.result
|
.result
|
||||||
.map(|r| r.to_css_string())
|
.map(|r| r.to_css_string())
|
||||||
.unwrap_or(String::new())
|
.unwrap_or(String::new())
|
||||||
}
|
},
|
||||||
|
|
||||||
LonghandId::Bottom | LonghandId::Top | LonghandId::Right | LonghandId::Left
|
LonghandId::Bottom | LonghandId::Top | LonghandId::Right | LonghandId::Left
|
||||||
if applies && positioned && style.get_box().display != Display::None =>
|
if applies && positioned && style.get_box().display != Display::None =>
|
||||||
|
|
|
@ -547,7 +547,7 @@ fn process_offset_parent_query_inner(
|
||||||
Au::from_f32_px(padding_box_corner.y.px()),
|
Au::from_f32_px(padding_box_corner.y.px()),
|
||||||
);
|
);
|
||||||
Some(padding_box_corner)
|
Some(padding_box_corner)
|
||||||
}
|
},
|
||||||
Fragment::AbsoluteOrFixedPositioned(_) |
|
Fragment::AbsoluteOrFixedPositioned(_) |
|
||||||
Fragment::Box(_) |
|
Fragment::Box(_) |
|
||||||
Fragment::Text(_) |
|
Fragment::Text(_) |
|
||||||
|
|
|
@ -347,7 +347,7 @@ pub fn main_fetch(
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(name, _)| name.as_str().to_owned())
|
.map(|(name, _)| name.as_str().to_owned())
|
||||||
.collect();
|
.collect();
|
||||||
}
|
},
|
||||||
// Subsubstep 3.
|
// Subsubstep 3.
|
||||||
Some(list) => {
|
Some(list) => {
|
||||||
response.cors_exposed_header_name_list =
|
response.cors_exposed_header_name_list =
|
||||||
|
|
|
@ -427,7 +427,7 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
|
||||||
if url.host().is_none() || url.cannot_be_a_base() || url.scheme() == "file" =>
|
if url.host().is_none() || url.cannot_be_a_base() || url.scheme() == "file" =>
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
},
|
||||||
None => return,
|
None => return,
|
||||||
// Step 4.
|
// Step 4.
|
||||||
Some(url) => {
|
Some(url) => {
|
||||||
|
|
|
@ -695,13 +695,13 @@ impl HTMLInputElement {
|
||||||
{
|
{
|
||||||
let intervals_from_base = ((value - step_base) / allowed_value_step).floor();
|
let intervals_from_base = ((value - step_base) / allowed_value_step).floor();
|
||||||
intervals_from_base * allowed_value_step + step_base
|
intervals_from_base * allowed_value_step + step_base
|
||||||
}
|
},
|
||||||
StepDirection::Up =>
|
StepDirection::Up =>
|
||||||
// step up a fractional step to be on a step multiple
|
// step up a fractional step to be on a step multiple
|
||||||
{
|
{
|
||||||
let intervals_from_base = ((value - step_base) / allowed_value_step).ceil();
|
let intervals_from_base = ((value - step_base) / allowed_value_step).ceil();
|
||||||
intervals_from_base * allowed_value_step + step_base
|
intervals_from_base * allowed_value_step + step_base
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
value = value +
|
value = value +
|
||||||
|
@ -2371,7 +2371,7 @@ impl VirtualMethods for HTMLInputElement {
|
||||||
{
|
{
|
||||||
self.SetValue(DOMString::from(""))
|
self.SetValue(DOMString::from(""))
|
||||||
.expect("Failed to set input value on type change to ValueMode::Filename.");
|
.expect("Failed to set input value on type change to ValueMode::Filename.");
|
||||||
}
|
},
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,7 @@ impl VideoFrameRenderer for MediaFrameRenderer {
|
||||||
if let Some(old_image_key) = self.old_frame.take() {
|
if let Some(old_image_key) = self.old_frame.take() {
|
||||||
updates.push(ImageUpdate::DeleteImage(old_image_key));
|
updates.push(ImageUpdate::DeleteImage(old_image_key));
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
Some((ref mut image_key, ref mut width, ref mut height)) => {
|
Some((ref mut image_key, ref mut width, ref mut height)) => {
|
||||||
self.old_frame = Some(*image_key);
|
self.old_frame = Some(*image_key);
|
||||||
|
|
||||||
|
|
|
@ -2893,13 +2893,13 @@ impl NodeMethods for Node {
|
||||||
if !is_equal_processinginstruction(this, node) =>
|
if !is_equal_processinginstruction(this, node) =>
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
},
|
||||||
NodeTypeId::CharacterData(CharacterDataTypeId::Text(_)) |
|
NodeTypeId::CharacterData(CharacterDataTypeId::Text(_)) |
|
||||||
NodeTypeId::CharacterData(CharacterDataTypeId::Comment)
|
NodeTypeId::CharacterData(CharacterDataTypeId::Comment)
|
||||||
if !is_equal_characterdata(this, node) =>
|
if !is_equal_characterdata(this, node) =>
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
},
|
||||||
// Step 4.
|
// Step 4.
|
||||||
NodeTypeId::Element(..) if !is_equal_element_attrs(this, node) => return false,
|
NodeTypeId::Element(..) if !is_equal_element_attrs(this, node) => return false,
|
||||||
NodeTypeId::Attr if !is_equal_attr(this, node) => return false,
|
NodeTypeId::Attr if !is_equal_attr(this, node) => return false,
|
||||||
|
|
|
@ -187,7 +187,7 @@ impl TreeWalkerMethods for TreeWalker {
|
||||||
// outside of the tree rooted at the original root.
|
// outside of the tree rooted at the original root.
|
||||||
{
|
{
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
},
|
||||||
Some(n) => node = n,
|
Some(n) => node = n,
|
||||||
}
|
}
|
||||||
// "5. Filter node and if the return value is FILTER_ACCEPT, then
|
// "5. Filter node and if the return value is FILTER_ACCEPT, then
|
||||||
|
@ -319,7 +319,7 @@ impl TreeWalker {
|
||||||
if self.is_root_node(&parent) || self.is_current_node(&parent) =>
|
if self.is_root_node(&parent) || self.is_current_node(&parent) =>
|
||||||
{
|
{
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
},
|
||||||
// "5. Otherwise, set node to parent."
|
// "5. Otherwise, set node to parent."
|
||||||
Some(parent) => node = parent,
|
Some(parent) => node = parent,
|
||||||
}
|
}
|
||||||
|
@ -467,7 +467,7 @@ impl<'a> Iterator for &'a TreeWalker {
|
||||||
// which cannot produce an Err result.
|
// which cannot produce an Err result.
|
||||||
{
|
{
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ impl URL {
|
||||||
return Err(Error::Type(format!("could not parse base: {}", error)));
|
return Err(Error::Type(format!("could not parse base: {}", error)));
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
// Step 3.
|
// Step 3.
|
||||||
let parsed_url = match ServoUrl::parse_with_base(parsed_base.as_ref(), &url.0) {
|
let parsed_url = match ServoUrl::parse_with_base(parsed_base.as_ref(), &url.0) {
|
||||||
|
|
|
@ -356,7 +356,7 @@ impl<'a> WebGLValidator for TexImage2DValidator<'a> {
|
||||||
{
|
{
|
||||||
context.webgl_error(InvalidOperation);
|
context.webgl_error(InvalidOperation);
|
||||||
return Err(TexImageValidationError::InvalidTypeForFormat);
|
return Err(TexImageValidationError::InvalidTypeForFormat);
|
||||||
}
|
},
|
||||||
TexDataType::UnsignedShort565 if format != TexFormat::RGB => {
|
TexDataType::UnsignedShort565 if format != TexFormat::RGB => {
|
||||||
context.webgl_error(InvalidOperation);
|
context.webgl_error(InvalidOperation);
|
||||||
return Err(TexImageValidationError::InvalidTypeForFormat);
|
return Err(TexImageValidationError::InvalidTypeForFormat);
|
||||||
|
|
|
@ -1412,7 +1412,7 @@ impl XMLHttpRequest {
|
||||||
if has_no_child_nodes {
|
if has_no_child_nodes {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
// Step 3
|
// Step 3
|
||||||
_ => {
|
_ => {
|
||||||
return None;
|
return None;
|
||||||
|
|
|
@ -92,9 +92,14 @@ fn has_lint_attr(sym: &Symbols, attrs: &[Attribute], name: Symbol) -> bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks if a type is unrooted or contains any owned unrooted types
|
/// Checks if a type is unrooted or contains any owned unrooted types
|
||||||
fn is_unrooted_ty(sym: &Symbols, cx: &LateContext, ty: &ty::TyS, in_new_function: bool) -> bool {
|
fn is_unrooted_ty<'tcx>(
|
||||||
|
sym: &'_ Symbols,
|
||||||
|
cx: &LateContext<'tcx>,
|
||||||
|
ty: &'tcx ty::TyS<'tcx>,
|
||||||
|
in_new_function: bool,
|
||||||
|
) -> bool {
|
||||||
let mut ret = false;
|
let mut ret = false;
|
||||||
let mut walker = ty.walk();
|
let mut walker = ty.walk(cx.tcx);
|
||||||
while let Some(generic_arg) = walker.next() {
|
while let Some(generic_arg) = walker.next() {
|
||||||
let t = match generic_arg.unpack() {
|
let t = match generic_arg.unpack() {
|
||||||
rustc_middle::ty::subst::GenericArgKind::Type(t) => t,
|
rustc_middle::ty::subst::GenericArgKind::Type(t) => t,
|
||||||
|
|
|
@ -108,7 +108,7 @@ pub fn parse_counter_style_body<'i, 't>(
|
||||||
Some(ContextualParseError::InvalidCounterStyleWithoutSymbols(
|
Some(ContextualParseError::InvalidCounterStyleWithoutSymbols(
|
||||||
system,
|
system,
|
||||||
))
|
))
|
||||||
}
|
},
|
||||||
ref system @ System::Alphabetic | ref system @ System::Numeric
|
ref system @ System::Alphabetic | ref system @ System::Numeric
|
||||||
if rule.symbols().unwrap().0.len() < 2 =>
|
if rule.symbols().unwrap().0.len() < 2 =>
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ pub fn parse_counter_style_body<'i, 't>(
|
||||||
Some(ContextualParseError::InvalidCounterStyleNotEnoughSymbols(
|
Some(ContextualParseError::InvalidCounterStyleNotEnoughSymbols(
|
||||||
system,
|
system,
|
||||||
))
|
))
|
||||||
}
|
},
|
||||||
System::Additive if rule.additive_symbols.is_none() => {
|
System::Additive if rule.additive_symbols.is_none() => {
|
||||||
Some(ContextualParseError::InvalidCounterStyleWithoutAdditiveSymbols)
|
Some(ContextualParseError::InvalidCounterStyleWithoutAdditiveSymbols)
|
||||||
},
|
},
|
||||||
|
|
|
@ -1016,7 +1016,7 @@ fn substitute_block<'i>(
|
||||||
Ok(())
|
Ok(())
|
||||||
})?;
|
})?;
|
||||||
set_position_at_next_iteration = true
|
set_position_at_next_iteration = true
|
||||||
}
|
},
|
||||||
Token::Function(_) |
|
Token::Function(_) |
|
||||||
Token::ParenthesisBlock |
|
Token::ParenthesisBlock |
|
||||||
Token::CurlyBracketBlock |
|
Token::CurlyBracketBlock |
|
||||||
|
|
|
@ -1009,7 +1009,7 @@ impl LengthPercentage {
|
||||||
return Ok(LengthPercentage::Percentage(computed::Percentage(
|
return Ok(LengthPercentage::Percentage(computed::Percentage(
|
||||||
unit_value,
|
unit_value,
|
||||||
)));
|
)));
|
||||||
}
|
},
|
||||||
Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
|
Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
|
||||||
if value != 0. &&
|
if value != 0. &&
|
||||||
!context.parsing_mode.allows_unitless_lengths() &&
|
!context.parsing_mode.allows_unitless_lengths() &&
|
||||||
|
|
|
@ -249,7 +249,7 @@ pub unsafe extern "C" fn move_servo(servo: *mut ServoInstance, x: f32, y: f32) {
|
||||||
if (start - point).square_length() < DRAG_CUTOFF_SQUARED =>
|
if (start - point).square_length() < DRAG_CUTOFF_SQUARED =>
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
},
|
||||||
ScrollState::TriggerDown(start) => {
|
ScrollState::TriggerDown(start) => {
|
||||||
servo.scroll_state = ScrollState::TriggerDragging(start, point);
|
servo.scroll_state = ScrollState::TriggerDragging(start, point);
|
||||||
let _ = call(|s| s.mouse_move(x, y));
|
let _ = call(|s| s.mouse_move(x, y));
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2021-08-13
|
nightly-2021-10-31
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue