Change parsing behavior and implement to_computed_value function

This commit is contained in:
Nazım Can Altınova 2016-08-27 21:49:35 +03:00
parent 4eb93c85bc
commit 8372f295b3
5 changed files with 227 additions and 106 deletions

View file

@ -728,8 +728,10 @@ mod shorthand_serialization {
let position = single_vec_value_typedef!(position,
Position {
horizontal: LengthOrPercentage::Length(Length::from_px(7f32)),
vertical: LengthOrPercentage::Length(Length::from_px(4f32))
horiz_keyword: None,
horiz_position: Some(LengthOrPercentage::Length(Length::from_px(7f32))),
vert_keyword: None,
vert_position: Some(LengthOrPercentage::Length(Length::from_px(4f32)))
}
);
@ -781,8 +783,10 @@ mod shorthand_serialization {
let position = single_vec_value_typedef!(position,
Position {
horizontal: LengthOrPercentage::Length(Length::from_px(7f32)),
vertical: LengthOrPercentage::Length(Length::from_px(4f32))
horiz_keyword: None,
horiz_position: Some(LengthOrPercentage::Length(Length::from_px(7f32))),
vert_keyword: None,
vert_position: Some(LengthOrPercentage::Length(Length::from_px(4f32)))
}
);
@ -833,8 +837,10 @@ mod shorthand_serialization {
let position = single_vec_value_typedef!(position,
Position {
horizontal: LengthOrPercentage::Length(Length::from_px(0f32)),
vertical: LengthOrPercentage::Length(Length::from_px(0f32))
horiz_keyword: None,
horiz_position: Some(LengthOrPercentage::Length(Length::from_px(0f32))),
vert_keyword: None,
vert_position: Some(LengthOrPercentage::Length(Length::from_px(0f32)))
}
);