mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Upgrade to rustc 1.18.0-nightly (5f13a3b54 2017-04-15)
This version enables [struct field reordering][1] which brings the size of the types for specified values of some CSS properties under the threshold such that they shouldn’t be boxed anymore, making unit tests fail. Simply unboxing them moves the test failure to Stylo’s unit tests, since the stable compiler used in that case does not do field re-ordering. Therefore, we manually reorder a couple fields to effectively bring this optimization to older compilers for a few specific types. [1]: https://github.com/rust-lang/rust/pull/40377
This commit is contained in:
parent
7ae9c96467
commit
daba02438d
11 changed files with 50 additions and 53 deletions
|
@ -649,16 +649,16 @@ impl LayoutElementHelpers for LayoutJS<Element> {
|
|||
let width_value = specified::BorderWidth::from_length(specified::Length::from_px(border as f32));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::BorderTopWidth(Box::new(width_value.clone()))));
|
||||
PropertyDeclaration::BorderTopWidth(width_value.clone())));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::BorderLeftWidth(Box::new(width_value.clone()))));
|
||||
PropertyDeclaration::BorderLeftWidth(width_value.clone())));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::BorderBottomWidth(Box::new(width_value.clone()))));
|
||||
PropertyDeclaration::BorderBottomWidth(width_value.clone())));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::BorderRightWidth(Box::new(width_value))));
|
||||
PropertyDeclaration::BorderRightWidth(width_value)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue