| Index: tools/perf/page_sets/tough_animation_cases/web_animations_staggered_infinite_iterations.html
|
| diff --git a/tools/perf/page_sets/tough_animation_cases/css_transitions_simultaneous_by_updating_inline_style.html b/tools/perf/page_sets/tough_animation_cases/web_animations_staggered_infinite_iterations.html
|
| similarity index 55%
|
| copy from tools/perf/page_sets/tough_animation_cases/css_transitions_simultaneous_by_updating_inline_style.html
|
| copy to tools/perf/page_sets/tough_animation_cases/web_animations_staggered_infinite_iterations.html
|
| index 86c73b411f4e844930a115aad2fd1874a62aa1a4..147b53597e0f9f8af887105b569f142845f44b39 100644
|
| --- a/tools/perf/page_sets/tough_animation_cases/css_transitions_simultaneous_by_updating_inline_style.html
|
| +++ b/tools/perf/page_sets/tough_animation_cases/web_animations_staggered_infinite_iterations.html
|
| @@ -1,33 +1,31 @@
|
| <!DOCTYPE html>
|
| <meta name="viewport" content="width=device-width, user-scalable=no">
|
| <link rel="stylesheet" type="text/css" href="resources/tablet.css">
|
| -<link rel="stylesheet" type="text/css" href="resources/transition.css">
|
| <script src="resources/perftesthelper.js"></script>
|
| +<script src="resources/web_animations_api_check.js"></script>
|
|
|
| <container id="container"></container>
|
|
|
| <script>
|
| var N = PerfTestHelper.getN(1000);
|
| var duration = 1000;
|
| -var targets = [];
|
| -var keyframe = 1;
|
| -var keyframeValues = [0, 1]
|
| +
|
| +function startAnimation(element, delay) {
|
| + target.animate([
|
| + {opacity: 0},
|
| + {opacity: 1},
|
| + ], {
|
| + duration: duration,
|
| + iterations: Infinity,
|
| + delay: delay,
|
| + });
|
| +}
|
|
|
| for (var i = 0; i < N; i++) {
|
| var target = document.createElement('target');
|
| container.appendChild(target);
|
| - targets.push(target);
|
| + startAnimation(target, i * (duration / N) - duration);
|
| }
|
|
|
| -function startAllTransitions() {
|
| - keyframe ^= 1;
|
| - targets.forEach(function(target) {
|
| - target.style.opacity = keyframeValues[keyframe];
|
| - });
|
| -}
|
| -
|
| -requestAnimationFrame(startAllTransitions);
|
| -setInterval(startAllTransitions, duration);
|
| -
|
| PerfTestHelper.signalReady();
|
| </script>
|
|
|