Title: [166309] trunk
- Revision
- 166309
- Author
- simon.fra...@apple.com
- Date
- 2014-03-26 12:36:51 -0700 (Wed, 26 Mar 2014)
Log Message
REGRESSION (r155977): matrix animations no longer animate
https://bugs.webkit.org/show_bug.cgi?id=130789
<rdar://problem/15650946>
Source/WebCore:
Reviewed by Dean Jackson.
r155977 erroneously removed two lines that set the end points for
matrix animations (used when transform lists don't match), so
put them back.
Also don't repaint when updateContentsScale()
is called and doesn't change the contents scale.
Test: compositing/animation/matrix-animation.html
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateRootRelativeScale):
(WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
(WebCore::GraphicsLayerCA::updateContentsScale):
LayoutTests:
Reviewed by Dean Jackson.
Add test for fill-fowards animation with mismatched transform lists.
* compositing/animation/matrix-animation-expected.html: Added.
* compositing/animation/matrix-animation.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (166308 => 166309)
--- trunk/LayoutTests/ChangeLog 2014-03-26 19:36:49 UTC (rev 166308)
+++ trunk/LayoutTests/ChangeLog 2014-03-26 19:36:51 UTC (rev 166309)
@@ -1,3 +1,16 @@
+2014-03-26 Simon Fraser <simon.fra...@apple.com>
+
+ REGRESSION (r155977): matrix animations no longer animate
+ https://bugs.webkit.org/show_bug.cgi?id=130789
+ <rdar://problem/15650946>
+
+ Reviewed by Dean Jackson.
+
+ Add test for fill-fowards animation with mismatched transform lists.
+
+ * compositing/animation/matrix-animation-expected.html: Added.
+ * compositing/animation/matrix-animation.html: Added.
+
2014-03-26 Antti Koivisto <an...@apple.com>
Render tree construction is O(N^2) in number of siblings
Added: trunk/LayoutTests/compositing/animation/matrix-animation-expected.html (0 => 166309)
--- trunk/LayoutTests/compositing/animation/matrix-animation-expected.html (rev 0)
+++ trunk/LayoutTests/compositing/animation/matrix-animation-expected.html 2014-03-26 19:36:51 UTC (rev 166309)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .box {
+ height: 100px;
+ width: 100px;
+ background-color: blue;
+ -webkit-transform: scale(1, 1) translate3d(10px, 10px, 0);
+ }
+ </style>
+</head>
+<body>
+ <div class="box"></div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/compositing/animation/matrix-animation-expected.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Added: trunk/LayoutTests/compositing/animation/matrix-animation.html (0 => 166309)
--- trunk/LayoutTests/compositing/animation/matrix-animation.html (rev 0)
+++ trunk/LayoutTests/compositing/animation/matrix-animation.html 2014-03-26 19:36:51 UTC (rev 166309)
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ #box {
+ height: 100px;
+ width: 100px;
+ background-color: blue;
+ -webkit-transform: scale(0.1, 0.1);
+ }
+
+ .animating {
+ -webkit-animation: zoom 1 0.05s forwards;
+ }
+
+ @-webkit-keyframes zoom {
+ from { }
+ to { -webkit-transform: scale(1, 1) translate(10px, 10px); }
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ function doTest()
+ {
+ var box = document.getElementById('box');
+ box.addEventListener('webkitAnimationEnd', function() {
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, false);
+ box.classList.add('animating');
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+ <div id="box">
+ </div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/compositing/animation/matrix-animation.html
___________________________________________________________________
Added: svn:mime-type
Added: svn:keywords
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (166308 => 166309)
--- trunk/Source/WebCore/ChangeLog 2014-03-26 19:36:49 UTC (rev 166308)
+++ trunk/Source/WebCore/ChangeLog 2014-03-26 19:36:51 UTC (rev 166309)
@@ -1,5 +1,27 @@
2014-03-26 Simon Fraser <simon.fra...@apple.com>
+ REGRESSION (r155977): matrix animations no longer animate
+ https://bugs.webkit.org/show_bug.cgi?id=130789
+ <rdar://problem/15650946>
+
+ Reviewed by Dean Jackson.
+
+ r155977 erroneously removed two lines that set the end points for
+ matrix animations (used when transform lists don't match), so
+ put them back.
+
+ Also don't repaint when updateContentsScale()
+ is called and doesn't change the contents scale.
+
+ Test: compositing/animation/matrix-animation.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::updateRootRelativeScale):
+ (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
+ (WebCore::GraphicsLayerCA::updateContentsScale):
+
+2014-03-26 Simon Fraser <simon.fra...@apple.com>
+
Add a custom behavior flag to GraphicsLayer, piped down to PlatformCALayer, for scrolling layers
https://bugs.webkit.org/show_bug.cgi?id=130778
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (166308 => 166309)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2014-03-26 19:36:49 UTC (rev 166308)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2014-03-26 19:36:51 UTC (rev 166309)
@@ -1165,7 +1165,7 @@
transformFromRoot->multiply(unanimatedTransform);
rootRelativeScaleFactor = maxScaleFromTransform(*transformFromRoot);
}
-
+
if (rootRelativeScaleFactor != m_rootRelativeScaleFactor) {
m_rootRelativeScaleFactor = rootRelativeScaleFactor;
m_uncommittedChanges |= ContentsScaleChanged | ContentsOpaqueChanged;
@@ -2703,6 +2703,9 @@
// If any matrix is singular, CA won't animate it correctly. So fall back to software animation
if (!fromTransform.isInvertible() || !toTransform.isInvertible())
return false;
+
+ basicAnim->setFromValue(fromTransform);
+ basicAnim->setToValue(toTransform);
} else {
if (isTransformTypeNumber(transformOpType)) {
float fromValue;
@@ -2945,6 +2948,9 @@
void GraphicsLayerCA::updateContentsScale(float pageScaleFactor)
{
float contentsScale = clampedContentsScaleForScale(m_rootRelativeScaleFactor * pageScaleFactor * deviceScaleFactor());
+ if (contentsScale == m_layer->contentsScale())
+ return;
+
m_layer->setContentsScale(contentsScale);
if (drawsContent())
m_layer->setNeedsDisplay();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes