mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
Auto merge of #26104 - tipowol:fix-23704, r=paulrouget
Update parse_length to match spec <!-- 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 #23704 - [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. -->
This commit is contained in:
commit
95da6dbd6d
4 changed files with 4 additions and 171 deletions
|
@ -66,7 +66,8 @@ pub fn test_parse_length() {
|
|||
|
||||
check("0", LengthOrPercentageOrAuto::Length(Au::from_px(0)));
|
||||
check("0.000%", LengthOrPercentageOrAuto::Percentage(0.0));
|
||||
check("+5.82%", LengthOrPercentageOrAuto::Percentage(0.0582));
|
||||
check("+5.82%", LengthOrPercentageOrAuto::Auto);
|
||||
check("5.82%", LengthOrPercentageOrAuto::Percentage(0.0582));
|
||||
check(
|
||||
"5.82",
|
||||
LengthOrPercentageOrAuto::Length(Au::from_f64_px(5.82)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue