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

Normalize rotations in computed transforms #13265

Closed
Manishearth opened this issue Sep 14, 2016 · 0 comments
Closed

Normalize rotations in computed transforms #13265

Manishearth opened this issue Sep 14, 2016 · 0 comments
Assignees
Labels

Comments

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Sep 14, 2016

While the spec doesn't explicitly say this, it seems like the rotate3d() and rotate() 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); and rotate3d(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

@Manishearth Manishearth self-assigned this Sep 14, 2016
@canova canova mentioned this issue Sep 15, 2016
4 of 5 tasks complete
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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.