mirror of
https://github.com/servo/servo.git
synced 2025-06-19 14:48:59 +01:00
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 --> |
||
---|---|---|
.. | ||
animation.rs | ||
block.rs | ||
Cargo.toml | ||
construct.rs | ||
context.rs | ||
data.rs | ||
display_list_builder.rs | ||
flex.rs | ||
floats.rs | ||
flow.rs | ||
flow_list.rs | ||
flow_ref.rs | ||
fragment.rs | ||
generated_content.rs | ||
incremental.rs | ||
inline.rs | ||
layout_debug.rs | ||
lib.rs | ||
linked_list.rs | ||
list_item.rs | ||
model.rs | ||
multicol.rs | ||
opaque_node.rs | ||
parallel.rs | ||
persistent_list.rs | ||
query.rs | ||
sequential.rs | ||
table.rs | ||
table_caption.rs | ||
table_cell.rs | ||
table_colgroup.rs | ||
table_row.rs | ||
table_rowgroup.rs | ||
table_wrapper.rs | ||
text.rs | ||
traversal.rs | ||
webrender_helpers.rs | ||
wrapper.rs |