servo/components/script
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
..
docs Rename Reflectable to DomObject. 2016-12-08 08:50:35 -10:00
dom Auto merge of #14509 - canaltinova:position, r=Manishearth 2016-12-15 12:15:06 -08:00
task_source Properly implement TaskSource for NetworkingTaskSource 2016-11-11 14:50:42 -08:00
body.rs Rename Reflectable to DomObject. 2016-12-08 08:50:35 -10:00
build.rs Native MSVC windows build, convert to cmake 2016-08-17 09:50:51 -04:00
Cargo.toml Removed util. 2016-12-14 18:04:37 -06:00
clipboard_provider.rs Remove ConstellationChan. 2016-05-19 17:13:44 +02:00
CMakeLists.txt Fix doc build by resurrecting generation of supported DOM APIs.h 2016-09-24 15:06:06 -04:00
devtools.rs Rename Reflectable to DomObject. 2016-12-08 08:50:35 -10:00
document_loader.rs Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
fetch.rs Rename Reflectable to DomObject. 2016-12-08 08:50:35 -10:00
layout_wrapper.rs Bug 1322945 - Improve ergonomics and share more code for style crate DOM tree logging. r=heycam 2016-12-12 18:50:33 -08:00
lib.rs Removed util. 2016-12-14 18:04:37 -06:00
mem.rs Rename Reflectable to DomObject. 2016-12-08 08:50:35 -10:00
network_listener.rs Properly implement TaskSource for NetworkingTaskSource 2016-11-11 14:50:42 -08:00
origin.rs Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
script_runtime.rs Removed util. 2016-12-14 18:04:37 -06:00
script_thread.rs Removed util. 2016-12-14 18:04:37 -06:00
serviceworker_manager.rs Removed util. 2016-12-14 18:04:37 -06:00
serviceworkerjob.rs Rename Reflectable to DomObject. 2016-12-08 08:50:35 -10:00
textinput.rs Return KeyReaction::Nothing for a Tab event 2016-11-12 15:49:00 +01:00
timers.rs Removed util. 2016-12-14 18:04:37 -06:00
unpremultiplytable.rs
webdriver_handlers.rs Remove redundant url clones 2016-11-18 12:39:22 +08:00