Auto merge of #13042 - canaltinova:position, r=Manishearth

Handle 3- and 4- valued <position>s in style

<!-- Please describe your changes on the following line: -->
This is first part of fix #12690 and covers just specified style part for now.

r? @Manishearth

---
- [X] These changes fix #12690 (github issue number if applicable).

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/13042)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-29 08:48:57 -05:00 committed by GitHub
commit b8d725d207
6 changed files with 330 additions and 75 deletions

View file

@ -107,8 +107,10 @@ ${helpers.predefined_type("background-color", "CSSColor",
pub fn get_initial_specified_value() -> SpecifiedValue {
use values::specified::Percentage;
Position {
horizontal: specified::LengthOrPercentage::Percentage(Percentage(0.0)),
vertical: specified::LengthOrPercentage::Percentage(Percentage(0.0)),
horiz_keyword: None,
horiz_position: Some(specified::LengthOrPercentage::Percentage(Percentage(0.0))),
vert_keyword: None,
vert_position: Some(specified::LengthOrPercentage::Percentage(Percentage(0.0))),
}
}