Repository navigation
Implement individual CSS transform properties: translate, rotate, scale - #19859
Conversation
|
Heads up! This PR modifies the following files:
|
|
These patches were written by @CJKu. I am just landing them on his behalf. They have been reviewed by @emilio and myself. I'll wait for the first part of the Gecko-side patches to be landed and merged to autoland before landing this (and I'll update the Gecko bindings at that time). I'm opening this for now so others can have a look and in case the automated tests pick up anything. |
|
@bors-servo try |
Implement individual CSS transform properties: translate, rotate, scale These are the servo-side changes for [Gecko bug 1207734](https://bugzilla.mozilla.org/show_bug.cgi?id=1207734). - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [Gecko bug 1207734](https://bugzilla.mozilla.org/show_bug.cgi?id=1207734) - [X] There are tests for these changes on the Gecko side including web-platform-tests <!-- 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/19859) <!-- Reviewable:end -->
|
💔 Test failed - arm32 |
|
Failure was:
|
|
@bors-servo retry
|
Implement individual CSS transform properties: translate, rotate, scale These are the servo-side changes for [Gecko bug 1207734](https://bugzilla.mozilla.org/show_bug.cgi?id=1207734). - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [Gecko bug 1207734](https://bugzilla.mozilla.org/show_bug.cgi?id=1207734) - [X] There are tests for these changes on the Gecko side including web-platform-tests <!-- 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/19859) <!-- Reviewable:end -->
|
As for the Taskcluster failure, the log just has:
? |
|
💔 Test failed - arm32 |
|
On 01/25/2018 07:45 AM, Brian Birtles wrote:
As for the Taskcluster failure, the log
<https://public-artifacts.taskcluster.net/EP2crE3RRIadSc_5scuT5A/0/public/logs/live_backing.log>
just has:
It looks like rustup is not installed. See instructions at
https://github.com/servo/servo/#setting-up-your-environment
?
Yeah, taskcluster doesn't block landing yet, just ignore that.
See:
https://groups.google.com/d/msg/mozilla.dev.servo/lttaOHEMzes/SYTcTk88AAAJ
|
|
@bors-servo retry |
Implement individual CSS transform properties: translate, rotate, scale These are the servo-side changes for [Gecko bug 1207734](https://bugzilla.mozilla.org/show_bug.cgi?id=1207734). - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [Gecko bug 1207734](https://bugzilla.mozilla.org/show_bug.cgi?id=1207734) - [X] There are tests for these changes on the Gecko side including web-platform-tests <!-- 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/19859) <!-- Reviewable:end -->
|
💔 Test failed - linux-rel-wpt |
|
1fb6ec1 to
8711efe
Compare
| sum.scale = self.scale.animate(&other.scale, procedure)?; | ||
| sum.skew = self.skew.animate(&other.skew, procedure)?; | ||
| sum.perspective = self.perspective.animate(&other.perspective, procedure)?; | ||
| sum.quaternion = MatrixDecomposed3D::slerp(&self.quaternion, |
There was a problem hiding this comment.
Why is this call not like the others? Can't the type of self.quaternion implement Animate and use MatrixDecomposed3D::slerp there? That would make this implementation for MatrixDecomposed3D derivable.
| /// <https://drafts.csswg.org/css-transforms/#interpolation-of-transforms> | ||
| impl ComputedRotate { | ||
| fn fill_unspecified(rotate: &ComputedRotate) | ||
| -> Result<(Number, Number, Number, Angle), ()>{ |
There was a problem hiding this comment.
Indentation is broken. Spacing is broken.
| pub fn set_${ident}(&mut self, other: values::computed::${type}) { | ||
| unsafe { self.gecko.${gecko_ffi_name}.clear() }; | ||
|
|
||
| match other.to_transform_operation() { |
There was a problem hiding this comment.
Nit: if let makes for more readable code here.
| /// <https://drafts.csswg.org/css-transforms/#interpolation-of-decomposed-3d-matrix-values> | ||
| fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()> { | ||
| impl MatrixDecomposed3D { | ||
| fn slerp(from: &Quaternion, to: &Quaternion, procedure: Procedure) -> Result<Quaternion, ()> { |
There was a problem hiding this comment.
Make this an implementation of Animatable for Quaternion instead of keeping it on MatrixDecomposed3D .
|
|
||
| /// <https://drafts.csswg.org/css-transforms/#interpolation-of-transforms> | ||
| impl ComputedRotate { | ||
| fn fill_unspecified(rotate: &ComputedRotate) |
There was a problem hiding this comment.
I don't understand the relation between that method name and the spec link just above.
| // | ||
| // Unspecified translations default to 0px | ||
| match translate { | ||
| &Translate::None => { |
There was a problem hiding this comment.
Nit: it's more readable to instead dereference the matched value *translate and not prefix every pattern with &.
|
Thanks for the review! |
|
@birtles ACK, didn't realise that! I think we can do follow-up issues if you don't have the bandwidth to make the changes. |
|
Thanks! I'll try to get to it. I think there were some test failures that I need to look into anyway. |
Implement individual CSS transform properties: translate, rotate, scale These are the servo-side changes for [Gecko bug 1207734](https://bugzilla.mozilla.org/show_bug.cgi?id=1207734). - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [Gecko bug 1207734](https://bugzilla.mozilla.org/show_bug.cgi?id=1207734) - [X] There are tests for these changes on the Gecko side including web-platform-tests <!-- 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/19859) <!-- Reviewable:end -->
|
💔 Test failed - linux-rel-wpt |
|
Oh, I didn't realize the PASSes that @jdm originally quoted were actually failures! |
So that we can reuse the code in ComputedRotate.
4bcf284 to
8a4661b
Compare
|
@bors-servo r=emilio |
|
📌 Commit 8a4661b has been approved by |
Implement individual CSS transform properties: translate, rotate, scale These are the servo-side changes for [Gecko bug 1207734](https://bugzilla.mozilla.org/show_bug.cgi?id=1207734). - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [Gecko bug 1207734](https://bugzilla.mozilla.org/show_bug.cgi?id=1207734) - [X] There are tests for these changes on the Gecko side including web-platform-tests <!-- 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/19859) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
These are the servo-side changes for Gecko bug 1207734.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is