Box CalcLengthOrPercentage to reduce inline size of PropertyDeclaration(s)

This commit is contained in:
Manish Goregaokar 2017-01-16 20:22:43 -08:00
parent 363f590019
commit f59557d2f2
20 changed files with 280 additions and 249 deletions

View file

@ -480,7 +480,7 @@ impl LayoutElementHelpers for LayoutJS<Element> {
hints.push(from_declaration(
PropertyDeclaration::BorderSpacing(DeclaredValue::Value(
border_spacing::SpecifiedValue {
horizontal: width_value,
horizontal: width_value.clone(),
vertical: width_value,
}))));
}
@ -625,11 +625,11 @@ impl LayoutElementHelpers for LayoutJS<Element> {
let width_value = specified::BorderWidth::from_length(
specified::Length::Absolute(Au::from_px(border as i32)));
hints.push(from_declaration(
PropertyDeclaration::BorderTopWidth(DeclaredValue::Value(width_value))));
PropertyDeclaration::BorderTopWidth(DeclaredValue::Value(width_value.clone()))));
hints.push(from_declaration(
PropertyDeclaration::BorderLeftWidth(DeclaredValue::Value(width_value))));
PropertyDeclaration::BorderLeftWidth(DeclaredValue::Value(width_value.clone()))));
hints.push(from_declaration(
PropertyDeclaration::BorderBottomWidth(DeclaredValue::Value(width_value))));
PropertyDeclaration::BorderBottomWidth(DeclaredValue::Value(width_value.clone()))));
hints.push(from_declaration(
PropertyDeclaration::BorderRightWidth(DeclaredValue::Value(width_value))));
}