Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Make PercentageOrNumber also reject negative percentages. #16142

Merged
merged 2 commits into from Mar 27, 2017

Conversation

emilio
Copy link
Member

@emilio emilio commented Mar 26, 2017

It always returns true, so this is just stupid.


This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @bholley: components/style/values/specified/length.rs

@highfive
Copy link

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 26, 2017
@emilio
Copy link
Member Author

emilio commented Mar 26, 2017

This seems to come from da27b61, so r? @canaltinova

@highfive highfive assigned canova and unassigned glennw Mar 26, 2017
@emilio
Copy link
Member Author

emilio commented Mar 26, 2017

Actually, ImageRect needs to reject negative percentages, this was causing a non-fatal assertion on one bug I was working on, so let me just fix that.

@emilio emilio changed the title style: Avoid dumb AllowedNumericType::All::is_ok. style: Make PercentageOrNumber also reject negative percentages. Mar 26, 2017
@canova
Copy link
Contributor

canova commented Mar 26, 2017

Thanks!
@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 1ce9758 has been approved by canaltinova

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 26, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 1ce9758 with merge 7b64c3c...

bors-servo pushed a commit that referenced this pull request Mar 26, 2017
style: Make PercentageOrNumber also reject negative percentages.

It always returns true, so this is just stupid.

<!-- 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/16142)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-msvc-dev
Approved by: canaltinova
Pushing 7b64c3c to master...

@bors-servo bors-servo merged commit 1ce9758 into servo:master Mar 27, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 27, 2017
@upsuper
Copy link
Contributor

upsuper commented Mar 27, 2017

This seems to fix #15339.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants