New issue
Advanced search Search tips

Issue 687046 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Animations: blend to identity is incorrect for transform: translate Z

Project Member Reported by ericwilligers@chromium.org, Jan 31 2017

Issue description

If we add the following interpolation test

assertInterpolation({
  property: 'transform',
  from: 'translate3D(100px, 200px, 300px)',
  to: 'none'
}, [
  {at: -1, is: 'matrix3d( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 200 , 400 , 600 , 1 )'},
  {at: 0, is: 'matrix3d( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 100 , 200 , 300 , 1 )'},
  {at: 0.25, is: 'matrix3d( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 75 , 150 , 225 , 1 )'},
  {at: 0.75, is: 'matrix3d( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 25 , 50 , 75 , 1 )'},
  {at: 1, is: 'matrix( 1 , 0 , 0 , 1 , 0 , 0 ) '},
  {at: 2, is: 'matrix3d( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , -100 , -200 , -300 , 1 )'},
]);

we experience the following failures:

FAIL CSS Transitions: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (-1) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 400, -300, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 200 , 400 , 600 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 200 , 400 , - 300 , 1 ) "
PASS CSS Transitions: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (0) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 200, 300, 1)] 
FAIL CSS Transitions: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (0.25) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 75, 150, 75, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 75 , 150 , 225 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 75 , 150 , 75 , 1 ) "
FAIL CSS Transitions: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (0.75) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 25, 50, 225, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 25 , 50 , 75 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 25 , 50 , 225 , 1 ) "
PASS CSS Transitions: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (1) is [matrix(1, 0, 0, 1, 0, 0)] 
FAIL CSS Transitions: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (2) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -100, -200, 600, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , - 100 , - 200 , - 300 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , - 100 , - 200 , 600 , 1 ) "

FAIL CSS Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (-1) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 400, -300, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 200 , 400 , 600 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 200 , 400 , - 300 , 1 ) "
PASS CSS Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (0) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 200, 300, 1)] 
FAIL CSS Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (0.25) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 75, 150, 75, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 75 , 150 , 225 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 75 , 150 , 75 , 1 ) "
FAIL CSS Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (0.75) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 25, 50, 225, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 25 , 50 , 75 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 25 , 50 , 225 , 1 ) "
PASS CSS Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (1) is [matrix(1, 0, 0, 1, 0, 0)] 
FAIL CSS Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (2) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -100, -200, 600, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , - 100 , - 200 , - 300 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , - 100 , - 200 , 600 , 1 ) "

FAIL Web Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (-1) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 400, -300, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 200 , 400 , 600 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 200 , 400 , - 300 , 1 ) "
PASS Web Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (0) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 200, 300, 1)] 
FAIL Web Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (0.25) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 75, 150, 75, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 75 , 150 , 225 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 75 , 150 , 75 , 1 ) "
FAIL Web Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (0.75) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 25, 50, 225, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 25 , 50 , 75 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 25 , 50 , 225 , 1 ) "
PASS Web Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (1) is [matrix(1, 0, 0, 1, 0, 0)] 
FAIL Web Animations: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (2) is [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -100, -200, 600, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , - 100 , - 200 , - 300 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , - 100 , - 200 , 600 , 1 ) "

Ignoring the keyframes at 0 and 1, we see that the Z translate is increasing instead of decreasing
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ca8fe116092372724468846c41bee8faaceacd8

commit 6ca8fe116092372724468846c41bee8faaceacd8
Author: ericwilligers <ericwilligers@chromium.org>
Date: Tue Jan 31 16:45:46 2017

Animations: Fix blend to identity for transform: translate Z

We now blend towards, not away from, 0 when blending to identity.

BUG= 687046 

Review-Url: https://codereview.chromium.org/2667923002
Cr-Commit-Position: refs/heads/master@{#447246}

[modify] https://crrev.com/6ca8fe116092372724468846c41bee8faaceacd8/third_party/WebKit/LayoutTests/animations/interpolation/transform-interpolation.html
[modify] https://crrev.com/6ca8fe116092372724468846c41bee8faaceacd8/third_party/WebKit/Source/platform/transforms/TranslateTransformOperation.cpp

Status: Fixed (was: Started)

Sign in to add a comment