aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/context.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-12-15 12:15:06 -0800
committerGitHub <noreply@github.com>2016-12-15 12:15:06 -0800
commit5357f05ff785ee160d6b07de5d0e10aba199e578 (patch)
tree1fce6fc1ede31c0b58cfcee318c0872450e9e0c6 /components/layout/context.rs
parentb1337da1143dfe4d494c39cdce78e1469c200ff5 (diff)
parentca85221525962dce862a67600654d41fd744cf36 (diff)
downloadservo-5357f05ff785ee160d6b07de5d0e10aba199e578.tar.gz
servo-5357f05ff785ee160d6b07de5d0e10aba199e578.zip
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 -->
Diffstat (limited to 'components/layout/context.rs')
0 files changed, 0 insertions, 0 deletions