[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
simon.fraser at apple.com
simon.fraser at apple.com
Wed Dec 22 18:07:54 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 21c73f66b6ce954ec93fcb5020683f114fc1a5b4
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 7 22:02:53 2010 +0000
2010-12-07 Simon Fraser <simon.fraser at apple.com>
Reviewed by Chris Marrin.
Make use of pause API more explicit before landing fix for borer-radius animation.
https://bugs.webkit.org/show_bug.cgi?id=48340
* transitions/transition-test-helpers.js: Add some constants that
we can use to make the tests more readable.
Handle an extra value in the expected values arrays, to tell us if
we should expect a property to be animated, and therefore whether
we should try to pause it.
* transitions/color-transition-all.html:
* transitions/zero-duration-in-list.html:
Adjust to make use of the above changes.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 47b674e..25dba24 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-07 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Chris Marrin.
+
+ Make use of pause API more explicit before landing fix for borer-radius animation.
+ https://bugs.webkit.org/show_bug.cgi?id=48340
+
+ * transitions/transition-test-helpers.js: Add some constants that
+ we can use to make the tests more readable.
+ Handle an extra value in the expected values arrays, to tell us if
+ we should expect a property to be animated, and therefore whether
+ we should try to pause it.
+ * transitions/color-transition-all.html:
+ * transitions/zero-duration-in-list.html:
+ Adjust to make use of the above changes.
+
2010-12-07 Maciej Stachowiak <mjs at apple.com>
Reviewed by Kent Tamura.
diff --git a/LayoutTests/transitions/color-transition-all.html b/LayoutTests/transitions/color-transition-all.html
index 8676a32..9b4d8d7 100644
--- a/LayoutTests/transitions/color-transition-all.html
+++ b/LayoutTests/transitions/color-transition-all.html
@@ -21,10 +21,10 @@
<script src="transition-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
const expectedValues = [
- // [time, element-id, property, expected-value, tolerance]
- [0.5, 'outer', 'color', [0, 127, 127], 2],
- [0.5, 'inner', 'color', [255, 0, 0], 2],
- [0.5, 'inner', '-webkit-text-fill-color', [255, 0, 0], 2],
+ // [time, element-id, property, expected-value, tolerance, post-completion callback, should-be-transitioning]
+ [0.5, 'outer', 'color', [0, 127, 127], 2, null, shouldBeTransitioning],
+ [0.5, 'inner', 'color', [255, 0, 0], 2, null, shouldNotBeTransitioning],
+ [0.5, 'inner', '-webkit-text-fill-color', [255, 0, 0], 2, null, shouldNotBeTransitioning],
];
function setupTest()
@@ -32,7 +32,7 @@
document.getElementById('outer').className = 'changed';
}
- runTransitionTest(expectedValues, setupTest, true);
+ runTransitionTest(expectedValues, setupTest, usePauseAPI);
</script>
</head>
<body>
diff --git a/LayoutTests/transitions/transition-test-helpers.js b/LayoutTests/transitions/transition-test-helpers.js
index b23be12..ad9f804 100644
--- a/LayoutTests/transitions/transition-test-helpers.js
+++ b/LayoutTests/transitions/transition-test-helpers.js
@@ -21,6 +21,12 @@ Function parameters:
*/
+const usePauseAPI = true;
+const dontUsePauseAPI = false;
+
+const shouldBeTransitioning = true;
+const shouldNotBeTransitioning = false;
+
function roundNumber(num, decimalPlaces)
{
return Math.round(num * Math.pow(10, decimalPlaces)) / Math.pow(10, decimalPlaces);
@@ -166,9 +172,16 @@ function runTest(expected, usePauseAPI)
if (!property.indexOf("-webkit-transform"))
property = "-webkit-transform";
+ var tryToPauseTransition = expected[i][6];
+ if (tryToPauseTransition === undefined)
+ tryToPauseTransition = shouldBeTransitioning;
+
// We can only use the transition fast-forward mechanism if DRT implements pauseTransitionAtTimeOnElementWithId()
if (hasPauseTransitionAPI && usePauseAPI) {
- layoutTestController.pauseTransitionAtTimeOnElementWithId(property, time, elementId);
+ if (tryToPauseTransition) {
+ if (!layoutTestController.pauseTransitionAtTimeOnElementWithId(property, time, elementId))
+ window.console.log("Failed to pause '" + property + "' transition on element '" + elementId + "'");
+ }
checkExpectedValue(expected, i);
} else {
if (time > maxTime)
diff --git a/LayoutTests/transitions/zero-duration-in-list.html b/LayoutTests/transitions/zero-duration-in-list.html
index fbe2f5c..d4babb1 100644
--- a/LayoutTests/transitions/zero-duration-in-list.html
+++ b/LayoutTests/transitions/zero-duration-in-list.html
@@ -20,9 +20,9 @@
<script type="text/javascript" charset="utf-8">
const expectedValues = [
- // [time, element-id, property, expected-value, tolerance]
- [0.25, "box", "left", 50, 10],
- [0.25, "box", "top", 100, 10],
+ // [time, element-id, property, expected-value, tolerance, post-completion callback, should-be-transitioning]
+ [0.25, "box", "left", 50, 10, null, shouldBeTransitioning],
+ [0.25, "box", "top", 100, 10, null, shouldNotBeTransitioning],
];
function setupTest()
@@ -32,8 +32,7 @@
box.style.left = '100px';
}
- runTransitionTest(expectedValues, setupTest, true);
-
+ runTransitionTest(expectedValues, setupTest, usePauseAPI);
</script>
</head>
<body>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list