Repository navigation
layout: background-origin attribute for gradients - #19568
Conversation
|
Heads up! This PR modifies the following files:
|
|
@bors-servo try |
layout: background-origin attribute for gradients Fixes the glitches mentioned in #19554. Now gradient tiles are placed in the whole bounding box. <!-- Please describe your changes on the following line: --> --- <!-- 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 <!-- Either: --> - [X] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/19568) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-css2 |
|
linux-rel-css: Details |
26dfa64 to
5a3c827
Compare
|
Fixed the zero division bug. |
|
@bors-servo try |
layout: background-origin attribute for gradients Fixes the glitches mentioned in #19554. Now gradient tiles are placed in the whole bounding box. <!-- Please describe your changes on the following line: --> --- <!-- 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 <!-- Either: --> - [X] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/19568) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
mbrubeck
left a comment
There was a problem hiding this comment.
This looks great, thanks! A couple of minor things below:
| } | ||
|
|
||
| bounds.origin.x = bounds.origin.x + bg_position_x.to_used_value(bounds.size.width); | ||
| bounds.origin.y = bounds.origin.y + bg_position_y.to_used_value(bounds.size.height); |
There was a problem hiding this comment.
Could you change all the above code to use += and -= operators, instead of a = a + b?
I know the previous code used the long form, but I find the += form much easier to read and review.
| // * tile is the length of the "tile" | ||
| // Returns a difference between start and new start. | ||
| // It holds that base - tile < start - diff <= base | ||
| fn get_first_tile(base: i32, start: i32, tile: i32) -> i32 { |
There was a problem hiding this comment.
Perhaps this should take and return Au instead of i32. This would be more straightforward with servo/app_units#40.
5a3c827 to
6695141
Compare
|
updated |
| use dom_struct::dom_struct; | ||
| #[cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))] | ||
| use gecko_media::{CanPlayType, GeckoMedia}; | ||
| //#[cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))] |
There was a problem hiding this comment.
These changes should be reverted.
Fixes the glitches mentioned in servo#19554. Now gradient tiles are placed in the whole bounding box.
6695141 to
b0492f5
Compare
|
Removed files accidentally committed. |
|
@bors-servo r+ |
|
📌 Commit b0492f5 has been approved by |
layout: background-origin attribute for gradients Fixes the glitches mentioned in #19554. Now gradient tiles are placed in the whole bounding box. <!-- Please describe your changes on the following line: --> --- <!-- 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 <!-- Either: --> - [X] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/19568) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
Fixes the glitches mentioned in #19554. Now gradient tiles are placed in the whole bounding box. Upstreamed from servo/servo#19568 [ci skip]
Fixes the glitches mentioned in #19554.
Now gradient tiles are placed in the whole bounding box.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is