[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
simon.fraser at apple.com
simon.fraser at apple.com
Wed Dec 22 15:02:01 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 4c723aa19576f393261c00e73be7f531a0bdb050
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 27 16:47:46 2010 +0000
2010-10-27 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
Accelerated animation with missing values in keyframes is broken
https://bugs.webkit.org/show_bug.cgi?id=48395
r66339 changed the behavior of keyframe animations such that if a property
is missing from a keyframe, the property will be interpolated between those
keyframes that do have a value for the property. If a value is missing
from the first or last keyframes, the element's unanimated style supplies
that value.
However, accelerated animations had a bug where if a value was missing
from the first (and maybe subsequent) or last (and maybe preceding) keyframes,
the animation data given to the GraphicsLayer would be missing the style from the
first or final keyframe.
Tests: animations/missing-values-first-keyframe.html
animations/missing-values-last-keyframe.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7dff911..27b6c43 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,22 @@
+2010-10-27 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Accelerated animation with missing values in keyframes is broken
+ https://bugs.webkit.org/show_bug.cgi?id=48395
+
+ Testcases with keyframe animations that are missing an accelerated property
+ from a given keyframe and all earlier, or later keyframes.
+
+ * animations/missing-values-first-keyframe-expected.checksum: Added.
+ * animations/missing-values-first-keyframe-expected.png: Added.
+ * animations/missing-values-first-keyframe-expected.txt: Added.
+ * animations/missing-values-first-keyframe.html: Added.
+ * animations/missing-values-last-keyframe-expected.checksum: Added.
+ * animations/missing-values-last-keyframe-expected.png: Added.
+ * animations/missing-values-last-keyframe-expected.txt: Added.
+ * animations/missing-values-last-keyframe.html: Added.
+
2010-10-27 Ryosuke Niwa <rniwa at webkit.org>
Unreviewed.
diff --git a/LayoutTests/animations/missing-values-first-keyframe-expected.checksum b/LayoutTests/animations/missing-values-first-keyframe-expected.checksum
new file mode 100644
index 0000000..68fd44c
--- /dev/null
+++ b/LayoutTests/animations/missing-values-first-keyframe-expected.checksum
@@ -0,0 +1 @@
+65d6445fb482f959b53d010ffeb4a00d
\ No newline at end of file
diff --git a/LayoutTests/animations/missing-values-first-keyframe-expected.png b/LayoutTests/animations/missing-values-first-keyframe-expected.png
new file mode 100644
index 0000000..4adc0e4
Binary files /dev/null and b/LayoutTests/animations/missing-values-first-keyframe-expected.png differ
diff --git a/LayoutTests/animations/missing-values-first-keyframe-expected.txt b/LayoutTests/animations/missing-values-first-keyframe-expected.txt
new file mode 100644
index 0000000..8a9b184
--- /dev/null
+++ b/LayoutTests/animations/missing-values-first-keyframe-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x236
+ RenderBlock {HTML} at (0,0) size 800x236
+ RenderBody {BODY} at (0,0) size 800x236
+ RenderBlock {DIV} at (0,200) size 800x36
+ RenderText {#text} at (0,0) size 495x18
+ text run at (0,0) width 495: "PASS - \"left\" property for \"box1\" element at 0.5s saw something close to: 100"
+ RenderBR {BR} at (495,0) size 0x18
+ RenderText {#text} at (0,18) size 596x18
+ text run at (0,18) width 596: "PASS - \"webkitTransform.4\" property for \"box2\" element at 0.5s saw something close to: 100"
+ RenderBR {BR} at (596,18) size 0x18
+layer at (100,0) size 100x100
+ RenderBlock (positioned) {DIV} at (100,0) size 100x100 [bgcolor=#FF0000]
+layer at (100,100) size 100x100
+ RenderBlock (positioned) {DIV} at (100,100) size 100x100 [bgcolor=#FF0000]
+layer at (100,0) size 100x100
+ RenderBlock (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000]
+layer at (0,100) size 100x100
+ RenderBlock (relative positioned) {DIV} at (0,100) size 100x100 [bgcolor=#008000]
diff --git a/LayoutTests/animations/missing-values-first-keyframe.html b/LayoutTests/animations/missing-values-first-keyframe.html
new file mode 100644
index 0000000..0bf05c6
--- /dev/null
+++ b/LayoutTests/animations/missing-values-first-keyframe.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css" media="screen">
+ body {
+ margin: 0;
+ }
+
+ .box {
+ position: relative;
+ width: 100px;
+ height: 100px;
+ left: 0;
+ background-color: green;
+ }
+
+ .indicator {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ left: 100px;
+ background-color: red;
+ }
+ #indicator1 {
+ top: 0;
+ }
+ #indicator2 {
+ top: 100px;
+ }
+
+ #box1 {
+ left: 200px;
+ -webkit-animation: move-left 2s linear;
+ }
+
+ #box2 {
+ -webkit-transform: translateX(200px);
+ -webkit-animation: move-transform 2s linear;
+ }
+
+ @-webkit-keyframes move-left {
+ 0% {
+ opacity: 1;
+ }
+ 25% {
+ opacity: 1;
+ }
+ 50% {
+ left: 0;
+ opacity: 1;
+ }
+ 100% {
+ left: 0;
+ opacity: 0;
+ }
+ }
+
+ @-webkit-keyframes move-transform {
+ 0% {
+ opacity: 1;
+ }
+ 25% {
+ opacity: 1;
+ }
+ 50% {
+ -webkit-transform: translateX(0);
+ opacity: 1;
+ }
+ 100% {
+ -webkit-transform: translateX(0);
+ opacity: 0;
+ }
+ }
+
+ #result {
+ visibility: hidden; /* hide from pixel results */
+ }
+ </style>
+ <script src="animation-test-helpers.js" type="text/javascript"></script>
+ <script type="text/javascript">
+
+ const expectedValues = [
+ ["move-left", 0.5, "box1", "left", 100, 15],
+ ["move-transform", 0.5, "box2", "webkitTransform.4", 100, 15],
+ ];
+
+ var doPixelTest = true;
+ var disablePauseAPI = false;
+ runAnimationTest(expectedValues, null, undefined, disablePauseAPI, doPixelTest);
+ </script>
+</head>
+<body>
+ <!-- In the pixel result, you should see two vertically adjacent green squares. There should be no red.
+ Test is only reliable when run in DRT. -->
+ <div class="indicator" id="indicator1"></div>
+ <div class="indicator" id="indicator2"></div>
+
+ <div class="box" id="box1"></div>
+ <div class="box" id="box2"></div>
+
+ <div id="result"></div>
+</body>
+</html>
diff --git a/LayoutTests/animations/missing-values-last-keyframe-expected.checksum b/LayoutTests/animations/missing-values-last-keyframe-expected.checksum
new file mode 100644
index 0000000..5c41f45
--- /dev/null
+++ b/LayoutTests/animations/missing-values-last-keyframe-expected.checksum
@@ -0,0 +1 @@
+e5bfddb344303f74d469f805d2b002ae
\ No newline at end of file
diff --git a/LayoutTests/animations/missing-values-last-keyframe-expected.png b/LayoutTests/animations/missing-values-last-keyframe-expected.png
new file mode 100644
index 0000000..ed60c32
Binary files /dev/null and b/LayoutTests/animations/missing-values-last-keyframe-expected.png differ
diff --git a/LayoutTests/animations/missing-values-last-keyframe-expected.txt b/LayoutTests/animations/missing-values-last-keyframe-expected.txt
new file mode 100644
index 0000000..0ff6d82
--- /dev/null
+++ b/LayoutTests/animations/missing-values-last-keyframe-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x236
+ RenderBlock {HTML} at (0,0) size 800x236
+ RenderBody {BODY} at (0,0) size 800x236
+ RenderBlock {DIV} at (0,200) size 800x36
+ RenderText {#text} at (0,0) size 495x18
+ text run at (0,0) width 495: "PASS - \"left\" property for \"box1\" element at 1.5s saw something close to: 100"
+ RenderBR {BR} at (495,0) size 0x18
+ RenderText {#text} at (0,18) size 596x18
+ text run at (0,18) width 596: "PASS - \"webkitTransform.4\" property for \"box2\" element at 1.5s saw something close to: 100"
+ RenderBR {BR} at (596,18) size 0x18
+layer at (100,0) size 100x100
+ RenderBlock (positioned) {DIV} at (100,0) size 100x100 [bgcolor=#FF0000]
+layer at (100,100) size 100x100
+ RenderBlock (positioned) {DIV} at (100,100) size 100x100 [bgcolor=#FF0000]
+layer at (100,0) size 100x100
+ RenderBlock (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000]
+layer at (0,100) size 100x100
+ RenderBlock (relative positioned) {DIV} at (0,100) size 100x100 [bgcolor=#008000]
diff --git a/LayoutTests/animations/missing-values-last-keyframe.html b/LayoutTests/animations/missing-values-last-keyframe.html
new file mode 100644
index 0000000..c6ecbff
--- /dev/null
+++ b/LayoutTests/animations/missing-values-last-keyframe.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css" media="screen">
+ body {
+ margin: 0;
+ }
+
+ .box {
+ position: relative;
+ width: 100px;
+ height: 100px;
+ left: 0;
+ background-color: green;
+ }
+
+ .indicator {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ left: 100px;
+ background-color: red;
+ }
+ #indicator1 {
+ top: 0;
+ }
+ #indicator2 {
+ top: 100px;
+ }
+
+ #box1 {
+ left: 200px;
+ -webkit-animation: move-left 2s linear;
+ }
+
+ #box2 {
+ -webkit-transform: translateX(200px);
+ -webkit-animation: move-transform 2s linear;
+ }
+
+ @-webkit-keyframes move-left {
+ 0% {
+ left: 0;
+ opacity: 0;
+ }
+ 50% {
+ left: 0;
+ opacity: 1;
+ }
+ 75% {
+ opacity: 1;
+ }
+ 100% {
+ opacity: 1;
+ }
+ }
+
+ @-webkit-keyframes move-transform {
+ 0% {
+ -webkit-transform: translateX(0);
+ opacity: 0;
+ }
+ 50% {
+ -webkit-transform: translateX(0);
+ opacity: 1;
+ }
+ 75% {
+ opacity: 1;
+ }
+ 100% {
+ opacity: 1;
+ }
+ }
+
+ #result {
+ visibility: hidden; /* hide from pixel results */
+ }
+ </style>
+ <script src="animation-test-helpers.js" type="text/javascript"></script>
+ <script type="text/javascript">
+
+ const expectedValues = [
+ ["move-left", 1.5, "box1", "left", 100, 15],
+ ["move-transform", 1.5, "box2", "webkitTransform.4", 100, 15],
+ ];
+
+ var doPixelTest = true;
+ var disablePauseAPI = false;
+ runAnimationTest(expectedValues, null, undefined, disablePauseAPI, doPixelTest);
+ </script>
+</head>
+<body>
+ <!-- In the pixel result, you should see two vertically adjacent green squares. There should be no red.
+ Test is only reliable when run in DRT. -->
+ <div class="indicator" id="indicator1"></div>
+ <div class="indicator" id="indicator2"></div>
+
+ <div class="box" id="box1"></div>
+ <div class="box" id="box2"></div>
+
+ <div id="result"></div>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 65d8b1a..fbd273c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-10-27 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Accelerated animation with missing values in keyframes is broken
+ https://bugs.webkit.org/show_bug.cgi?id=48395
+
+ r66339 changed the behavior of keyframe animations such that if a property
+ is missing from a keyframe, the property will be interpolated between those
+ keyframes that do have a value for the property. If a value is missing
+ from the first or last keyframes, the element's unanimated style supplies
+ that value.
+
+ However, accelerated animations had a bug where if a value was missing
+ from the first (and maybe subsequent) or last (and maybe preceding) keyframes,
+ the animation data given to the GraphicsLayer would be missing the style from the
+ first or final keyframe.
+
+ Tests: animations/missing-values-first-keyframe.html
+ animations/missing-values-last-keyframe.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::startAnimation):
+
2010-10-27 Renata Hodovan <reni at inf.u-szeged.hu>
Reviewed by Dirk Schulze.
diff --git a/WebCore/rendering/RenderLayerBacking.cpp b/WebCore/rendering/RenderLayerBacking.cpp
index d37c080..777d07f 100644
--- a/WebCore/rendering/RenderLayerBacking.cpp
+++ b/WebCore/rendering/RenderLayerBacking.cpp
@@ -1115,13 +1115,14 @@ bool RenderLayerBacking::startAnimation(double timeOffset, const Animation* anim
if (!keyframeStyle)
continue;
- // get timing function
+ // Get timing function.
RefPtr<TimingFunction> tf = keyframeStyle->hasAnimations() ? (*keyframeStyle->animations()).animation(0)->timingFunction() : 0;
- if (currentKeyframe.containsProperty(CSSPropertyWebkitTransform))
+ bool isFirstOrLastKeyframe = key == 0 || key == 1;
+ if ((hasTransform && isFirstOrLastKeyframe) || currentKeyframe.containsProperty(CSSPropertyWebkitTransform))
transformVector.insert(new TransformAnimationValue(key, &(keyframeStyle->transform()), tf));
- if (currentKeyframe.containsProperty(CSSPropertyOpacity))
+ if ((hasOpacity && isFirstOrLastKeyframe) || currentKeyframe.containsProperty(CSSPropertyOpacity))
opacityVector.insert(new FloatAnimationValue(key, keyframeStyle->opacity(), tf));
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list