Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upServo doesn't properly render img border-radius #17510
Comments
|
All of our tests for border-radius and images appear to use background-image rather than image elements. |
|
I looked a bit into this and found that at the moment the clipping region only gets adjusted for border radius in |
|
Sounds like a reasonable solution to me (possibly sharing the code in a |
|
Should the |
|
Yes, it should affect every element. |
|
I have another one last question. How should I test this PR, and where do I put the tests? |
|
I recommend adding a reference test. You can create a new one in tests/wpt/mozilla/css/ as described in the documentation. |
Apply border-radius to img, canvas, iframe <!-- Please describe your changes on the following line: --> Added some code that adjusts the clipping region of ```img```, ```canvas```, ```iframe``` elements for the ```border-radius``` property. --- <!-- 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 #17510 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/17589) <!-- Reviewable:end -->
|
This is fixed now. |
Example on: https://github.com/business
The face pictures are supposed to be circles but in Servo they are squares.
Image (Servo on top, Firefox on bottom):
The offending line appears to be:
<img src="https://assets-cdn.github.com/images/modules/site/avatars/hubspot-quote.jpg" alt="" style="border-radius:25px;" width="50" height="50">Tested in Windows 10.