[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
simon.fraser at apple.com
simon.fraser at apple.com
Thu Oct 29 20:46:32 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit da8206f20e092e041feb97da507145d7f4244c95
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 17 00:20:45 2009 +0000
2009-10-16 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
Transform layer gets stuck with the wrong transform after an animation ends
<rdar://problem/7311662>
Work around a CoreAnimation bug which causes an animated transform layer to
end up with a stale transform.
Test: compositing/animation/state-at-end-event-transform-layer.html
* platform/graphics/mac/GraphicsLayerCA.mm:
(WebCore::bug7311367Workaround):
(WebCore::GraphicsLayerCA::removeAnimationFromLayer):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5a0bd4b..e082a50 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -2,6 +2,21 @@
Reviewed by Dan Bernstein.
+ Transform layer gets stuck with the wrong transform after an animation ends
+ <rdar://problem/7311662>
+
+ Testcase that runs a -webkit-transform animation on a preserve-3d element, and tests that the final
+ state is correct.
+
+ * compositing/animation/state-at-end-event-transform-layer.html: Added.
+ * platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.checksum: Added.
+ * platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.png: Added.
+ * platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.txt: Added.
+
+2009-10-16 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
After running a transition with an end event listener, can't change the transform
https://bugs.webkit.org/show_bug.cgi?id=30454
diff --git a/LayoutTests/compositing/animation/state-at-end-event-transform-layer.html b/LayoutTests/compositing/animation/state-at-end-event-transform-layer.html
new file mode 100644
index 0000000..b66f600
--- /dev/null
+++ b/LayoutTests/compositing/animation/state-at-end-event-transform-layer.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <style>
+ #container {
+ position: relative;
+ width: 400px;
+ height: 100px;
+ border: 1px solid black;
+ }
+
+ .box {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ }
+
+ .indicator {
+ left: 10px;
+ top: 0;
+ background-color: red;
+ }
+
+ #container.moved .hardware {
+ -webkit-animation: move 300ms linear;
+ }
+
+ .hardware {
+ -webkit-transform-style: preserve-3d;
+ -webkit-transform: translate3d(10px, 0, 0);
+ }
+
+ @-webkit-keyframes move {
+ from { -webkit-transform: translate3d(10px, 0, 0); }
+ to { -webkit-transform: translate3d(300px, 0, 0); }
+ }
+ </style>
+ <script type="text/javascript" charset="utf-8">
+
+ function testEnded()
+ {
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+
+ function startTest()
+ {
+ if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+
+ document.getElementById('tester').addEventListener('webkitAnimationEnd', testEnded, false);
+ document.getElementById('container').className = 'moved';
+ }
+
+ window.addEventListener('load', startTest, false);
+ </script>
+</head>
+<body>
+
+ <p>At the end of the test the green box should obscure the red box.</p>
+ <div id="container">
+ <div class="indicator box"></div>
+ <div id="tester" class="hardware box"></div>
+ </div>
+
+ <div id="result">
+ </div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.checksum b/LayoutTests/platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.checksum
new file mode 100644
index 0000000..48989bb
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.checksum
@@ -0,0 +1 @@
+b093aacfc56bfc49c511671a38121605
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.png b/LayoutTests/platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.png
new file mode 100644
index 0000000..ad08212
Binary files /dev/null and b/LayoutTests/platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.png differ
diff --git a/LayoutTests/platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.txt b/LayoutTests/platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.txt
new file mode 100644
index 0000000..dbefadb
--- /dev/null
+++ b/LayoutTests/platform/mac/compositing/animation/state-at-end-event-transform-layer-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x160
+ RenderBlock {HTML} at (0,0) size 800x160
+ RenderBody {BODY} at (8,16) size 784x136
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 399x18
+ text run at (0,0) width 399: "At the end of the test the green box should obscure the red box."
+ RenderBlock {DIV} at (0,136) size 784x0
+layer at (8,50) size 402x102
+ RenderBlock (relative positioned) {DIV} at (0,34) size 402x102 [border: (1px solid #000000)]
+layer at (19,51) size 100x100
+ RenderBlock (positioned) {DIV} at (11,1) size 100x100 [bgcolor=#FF0000]
+layer at (9,51) size 100x100
+ RenderBlock (positioned) {DIV} at (1,1) size 100x100 [bgcolor=#008000]
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4215948..f40b971 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,22 @@
Reviewed by Dan Bernstein.
+ Transform layer gets stuck with the wrong transform after an animation ends
+ <rdar://problem/7311662>
+
+ Work around a CoreAnimation bug which causes an animated transform layer to
+ end up with a stale transform.
+
+ Test: compositing/animation/state-at-end-event-transform-layer.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::bug7311367Workaround):
+ (WebCore::GraphicsLayerCA::removeAnimationFromLayer):
+
+2009-10-16 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
After running a transition with an end event listener, can't change the transform
https://bugs.webkit.org/show_bug.cgi?id=30454
diff --git a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
index e9960f1..eec9faa 100644
--- a/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
+++ b/WebCore/platform/graphics/mac/GraphicsLayerCA.mm
@@ -1245,6 +1245,21 @@ void GraphicsLayerCA::setAnimationOnLayer(CAPropertyAnimation* caAnim, AnimatedP
[layer addAnimation:caAnim forKey:animationName];
}
+// Workaround for <rdar://problem/7311367>
+static void bug7311367Workaround(CALayer* transformLayer, const TransformationMatrix& transform)
+{
+ if (!transformLayer)
+ return;
+
+ CATransform3D caTransform;
+ copyTransform(caTransform, transform);
+ caTransform.m41 += 1;
+ [transformLayer setTransform:caTransform];
+
+ caTransform.m41 -= 1;
+ [transformLayer setTransform:caTransform];
+}
+
bool GraphicsLayerCA::removeAnimationFromLayer(AnimatedPropertyID property, int index)
{
PlatformLayer* layer = animatedLayer(property);
@@ -1255,10 +1270,11 @@ bool GraphicsLayerCA::removeAnimationFromLayer(AnimatedPropertyID property, int
return false;
[layer removeAnimationForKey:animationName];
+
+ bug7311367Workaround(m_transformLayer.get(), m_transform);
return true;
}
-
static void copyAnimationProperties(CAPropertyAnimation* from, CAPropertyAnimation* to)
{
[to setBeginTime:[from beginTime]];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list