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 upNormalize rotations in computed transforms #13265
Closed
Labels
Comments
bors-servo
added a commit
that referenced
this issue
Sep 15, 2016
Normalize rotations in computed transforms <!-- Please describe your changes on the following line: --> Normalize rotations in computed transforms. --- <!-- 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 #13265 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo
added a commit
that referenced
this issue
Sep 15, 2016
Normalize rotations in computed transforms <!-- Please describe your changes on the following line: --> Normalize rotations in computed transforms. --- <!-- 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 #13265 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/13275) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While the spec doesn't explicitly say this, it seems like the
rotate3d()androtate()primitives should be stored in normalized form.https://drafts.csswg.org/css-transforms/#funcdef-rotate3d
It refers to them as "direction vectors" which are by definition normalized. Current servo behavior is that
rotate3d(0.707,0.707,0,45deg);androtate3d(1,1,0,45deg);are different, which doesn't match other browsers.We should probably just normalize before we create a
ComputedOperation::Rotate.cc @canaltinova