Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: tools/perf/page_sets/tough_animation_cases/transform_transition_js_block.html

Issue 12036096: Adding janky transform test case (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/page_sets/tough_animation_cases.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/tough_animation_cases/transform_transition_js_block.html
diff --git a/tools/perf/page_sets/tough_animation_cases/transform_transition_js_block.html b/tools/perf/page_sets/tough_animation_cases/transform_transition_js_block.html
new file mode 100644
index 0000000000000000000000000000000000000000..02dfcdcb1f17b0cb8d90a1c7bdb3c191f75cee2b
--- /dev/null
+++ b/tools/perf/page_sets/tough_animation_cases/transform_transition_js_block.html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>JS janking CSS transition</title>
+
+<style>
+ html {
+ font-family: sans-serif;
+ }
+
+ .box {
+ background: green;
+ position: relative;
+ width: 100px;
+ height: 100px;
+ -webkit-transition: -webkit-transform 10s linear;
+ transition: transform 10s linear;
+
+ /* Adding these lines fixes the issue
+ -webkit-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+ */
+ }
+</style>
+</head>
+<body>
+<div class="box"></div>
+<button class="run">Run</button>
+<script>
+ function jankify() {
+ var start = Date.now();
+ while (Date.now() - start < 250);
+ setTimeout(jankify, 750);
+ }
+
+ var box = document.querySelector('.box');
+
+ window.addEventListener('load', function() {
+ box.style.transform = box.style.WebkitTransform = 'translate3d(500px, 0, 0)'
+ jankify();
+ });
+</script>
+</body>
+</html>
« no previous file with comments | « tools/perf/page_sets/tough_animation_cases.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698