diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-08-05 06:27:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-05 06:27:24 -0500 |
commit | 0fc0db67c64bf8ab4593d1f84b8d1be517fa1b74 (patch) | |
tree | f86f144c877b3b1f0a25003cf30e2e256ae40f29 /components/layout/display_list_builder.rs | |
parent | 1086df67e04ce97fed080ba7c79ed8e1615202eb (diff) | |
parent | 234219cd842f1593c1eef3f39c91c5438f9f425e (diff) | |
download | servo-0fc0db67c64bf8ab4593d1f84b8d1be517fa1b74.tar.gz servo-0fc0db67c64bf8ab4593d1f84b8d1be517fa1b74.zip |
Auto merge of #12680 - Manishearth:basic-shape, r=SimonSapin
style: Add support for parsing and serialization of <basic-shape>s
Still WIP: I still need to use this somewhere and make serialization minimal. I'm not sure if I should do either in this PR.
The only other browser that handles basic shapes doesn't serialize correctly either (https://bugzilla.mozilla.org/show_bug.cgi?id=1290864), so that's not something we need to get done now.
As far as using this somewhere, I have the following options:
- Merge this now, work on using it in stylo in a followup.
- Just write extensive unit tests for parsing/serialization for now (stylo in a followup)
- Use this for clip-path in stylo only (which I intend to do anyway, just not sure if I should do it in this PR)
- Use this for clip-path in Servo (I'd rather not do this; this would be a huge change requiring a lot more layout knowledge than I currently have)
Thoughts? Review? @SimonSapin @bholley
<!-- 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/12680)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout/display_list_builder.rs')
-rw-r--r-- | components/layout/display_list_builder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index 58ff6d23e44..229f826b4e3 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -520,9 +520,9 @@ impl FragmentDisplayListBuilding for Fragment { }; // Use `background-position` to get the offset. - let horizontal_position = model::specified(background.background_position.horizontal, + let horizontal_position = model::specified(background.background_position.0.horizontal, bounds.size.width - image_size.width); - let vertical_position = model::specified(background.background_position.vertical, + let vertical_position = model::specified(background.background_position.0.vertical, bounds.size.height - image_size.height); let abs_x = border.left + virtual_origin_x + horizontal_position + origin_x; |