This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1355380 - Part 1: Have nsStyleImageOrientation::CreateAsAngleAndF…
…lip handle negative angles correctly. r=manishearth Previously we just took the input angle mod 2π, which will leave negative input angles as negative. By checking if the input mod 2π is negative and if so adding 2π and then taking that mod 2π again we can ensure that we end up with a an angle in the range [0, 2π]. We only do this if the result of the initial mod is negative because this adds rounding error that is enough to mess up whether 135 is determined to be closer to 90 or 180, for example. We add a test for this as well. Also fix property_database.js to account for this (we assert that -90deg should compute to the same value as the initial value, but it should actually compute to 270deg). MozReview-Commit-ID: Faf0f7wIEg3
- Loading branch information
Showing
3 changed files
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters