Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
REGRESSION (r289032): rotate animation doesn't interpolate between 0 …
…and 1turn without forced 50% https://bugs.webkit.org/show_bug.cgi?id=239906 Reviewed by Simon Fraser. When using CoreAnimation non-matrix animations to animate rotations, CoreAnimation will use the shortest direction between two rotation angles. This means that a rotation from 0 to 360 will not rotate at all. This is different from how CSS works, where it expects the animation to do a full turn. In order to avoid problems with this difference, when an animation includes larger angles (> 180 degrees), fall back to software animation. No new tests. It is difficult to make a test for this because when pausing animations the software path is used. * LayoutTests/animations/3d/full-rotation-animation-expected.html: Added. * LayoutTests/animations/3d/full-rotation-animation.html: Added. * Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::transformationAnimationValueAt): (WebCore::hasBigRotationAngle): (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints): * Source/WebCore/platform/graphics/transforms/TransformOperations.h: (WebCore::SharedPrimitivesPrefix::primitives const): (WebCore::SharedPrimitivesPrefix::primitives): Deleted. Canonical link: https://commits.webkit.org/250920@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
4 changed files
with
108 additions
and
12 deletions.
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
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
|
||
<html> | ||
<head> | ||
<style> | ||
.test { | ||
height: 80px; | ||
width: 80px; | ||
perspective: 250px; | ||
border: 1px solid black; | ||
background: green; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="test"></div> | ||
|
||
</body> | ||
</html> |
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
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE html> | ||
|
||
<html> | ||
<head> | ||
<style> | ||
.box { | ||
height: 80px; | ||
width: 80px; | ||
background-color: red; | ||
|
||
animation-name: animation; | ||
animation-duration: 1000000000s; | ||
animation-delay: -250000000s; | ||
animation-timing-function: linear; | ||
} | ||
|
||
.test { | ||
height: 80px; | ||
width: 80px; | ||
perspective: 250px; | ||
border: 1px solid black; | ||
background: green; | ||
} | ||
|
||
@keyframes animation { | ||
0% { transform: rotateY(0); } | ||
100% { transform: rotateY(-1turn); } | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="test"> | ||
<div class="inner box"> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
</html> |
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