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 upSerialization of border-radius and -moz-outline-radius shorthand is wrong #15169
Comments
|
Please make a comment here if you intend to work on this issue. Thank you! |
|
Note that, this also affects Gecko-only |
<div style="border-radius: 1px 2px 3px 4px / 5px 6px 7px 8px">
<script>console.log(document.querySelector('div').style.borderRadius)</script> |
|
Hi, I intend to work on this issue |
|
Great! Feel free to ask any questions. |
|
In addition to the |
|
@Aaron-Tang have you made progress? Any questions? |
|
Sorry I haven't been able to sit down and work on it that much, I'll probably get to it this weekend. Quick question however, which part of the code should I be working on? There doesn't seem to be anything linked in the issue. |
|
Um I have a few questions about the linked code; I'm new to rust and I'm trying to understand the code first:
|
|
|
@Aaron-Tang ping? |
|
Sorry I'm still very confused on how to fix this bug. I understand that the issue now is that the to_css function gets both the height and width of the borderradius into the dest object, which is then written using write. I'm trying to figure out how to access the height and width attributes of BorderRadiusSize before this occurs so I can run checks to see if it can be shortened. I can't seem to find a way to do so. I don't think I mentioned before that I'm totally new to rust which is why a lot of this is confusing to me. Any help would be greatly appreciated. |
|
You don't really need to worry about everything. Let's go through some stuff. We know that the parsing code which uses the existing |
|
@wafflespeanut is this issue now open for someone else to pick up? (I saw that you removed the assigned label, and the discussion has been stale for a while) If so, I'd like to work on it, though it'd probably be until next weekend before I'd have time to make progress. (Busy school week for me) |
|
@austinprete Let us know when you start working on it then. In the meantime, this issue is still open! |
|
cc @emilio |
|
Hello! I would like to work on this issue. I am new to the language: my only experience is a couple small applications that use APIs from services like Slack, Asana and my company's own backends. I think with the comments on this wall and some effort I'll be able to tackle it, though! |
|
Great! Please ask questions if anything is unclear! |
|
Wonderful. I never noticed that this addresses #12655. |
…tion, r=Wafflespeanut Fix -moz-outline-radius shorthand serialization <!-- Please describe your changes on the following line: --> These changes aim to solve #15169 correcting the `ToCss` implementation for `LonghandsToSerialize` for the `border-radius` shorthands. They also reduce redundant values like `1px 2px 1px 2px` to `1px 2px` to either sides of the slash. --- <!-- 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 #15169 (github issue number if applicable). <!-- 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/16340) <!-- Reviewable:end -->
For example,
border-radius: 1px 2px 3px 4px / 5px 6px 7px 8pxis incorrectly serialized asborder-radius: 1px 5px 2px 6px 3px 7px 4px 8px.