servo/components/style/properties
bors-servo 5357f05ff7 Auto merge of #14509 - canaltinova:position, r=Manishearth
Implement background-position-x/y

<!-- Please describe your changes on the following line: -->
This is a WIP PR. Just HorizontalPosition / VerticalPosition implementations are complete. I would like to get early feedbacks about this architecture. Here's some architectural topics to consider:

- I created `HorizontalPosition` and `VerticalPosition` structs for this and used them in `Position` as well. We have decided to split `Keyword` enum, but we need them as unified for `PositionComponent` enum. So I didn't split but I can split it if we prefer to change PositionComponent as well.
- If we prefer Keyword enum like this, we can create a SubPosition(or something like this) instead of HorizontalPosition/VerticalPosition enums since only difference is 2 lines in `parse` functions. We can create a `parse_horizontal` and `parse_vertical` instead and a lot of code duplication can be cleared.
- I couldn't find a good way to use HorizontalPosition/VerticalPosition's parse functions in `Position`'s parse function. It is a bit more complicated. I'm open to suggestions :)
- I don't know much about logical keywords so do I need to do something different? I placed some comments where logical keywords are processing.

Any advice about these?

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14458 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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/14509)
<!-- Reviewable:end -->
2016-12-15 12:15:06 -08:00
..
helpers Make background-position a shorthand instead of a longhand 2016-12-15 01:36:30 +03:00
longhand Auto merge of #14509 - canaltinova:position, r=Manishearth 2016-12-15 12:15:06 -08:00
shorthand Make background-position a shorthand instead of a longhand 2016-12-15 01:36:30 +03:00
build.py Use rust-phf to map strings to property IDs 2016-12-09 10:56:23 -10:00
data.py Support declaring keyword property Gecko coverage as inexhaustive. 2016-12-05 21:38:58 -10:00
declaration_block.rs Match on PropertyId (not strings) to parse a declaration. 2016-12-09 17:06:51 -10:00
gecko.mako.rs Auto merge of #14509 - canaltinova:position, r=Manishearth 2016-12-15 12:15:06 -08:00
helpers.mako.rs Introduce enums for identifying CSS properties. 2016-12-09 10:56:22 -10:00
Mako-0.9.1.zip Revert "Remove mako.zip" 2016-09-04 12:52:30 +08:00
properties.html.mako Move Mako-related files into a new sub-directory. 2016-04-20 14:49:27 +02:00
properties.mako.rs Auto merge of #14581 - bholley:dont_traverse_xbl, r=heycam 2016-12-14 19:41:12 -08:00