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

Side by Side Diff: LayoutTests/fast/workers/scrub.html

Issue 474683003: Not for review - Rebase of crrev.com/62833003 Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/workers/scroll-linked-effects.html ('k') | LayoutTests/fast/workers/snap.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <link href='http://fonts.googleapis.com/css?family=IM+Fell+Great+Primer+SC' rel= 'stylesheet' type='text/css'>
3 <style>
4
5 .card {
6 position: absolute;
7 left: 10px;
8 top: 10px;
9 width: 200px;
10 height: 200px;
11 background: #736F68;
12 color: #D9CCC5;
13 padding: 20px;
14 font-family: 'IM Fell Great Primer SC', serif;
15 font-size: 3em;
16 border-radius: 5px;
17 -webkit-transform: translateZ(0);
18 }
19
20 body {
21 background: #212126;
22 }
23
24 #raf {
25 position: absolute;
26 left: 700px;
27 top: 10px;
28 background: #826B54;
29 }
30
31 .scroller {
32 width: 100px;
33 height: 100px;
34 border: 2px solid black;
35 overflow-y: scroll;
36 background: #736F68;
37 }
38
39 .scrolled {
40 width: 80px;
41 height: 400px;
42 color: #D9CCC5;
43 padding: 20px;
44 font-family: 'IM Fell Great Primer SC', serif;
45 font-size: 3em;
46 }
47
48 </style>
49 <script>
50 var worker = null;
51
52 onload = function() {
53 // Set up worker rAF animation.
54 worker = new UIWorker('resources/scrub.js');
55 var spinner = document.getElementById('spinner');
56 var scroller = document.getElementById('scroller');
57 worker.postMessage([
58 spinner.bindAnimatedProperty('transform'),
59 spinner.bindAnimatedProperty('opacity'),
60 scroller.bindAnimatedProperty('scrollTop')
61 ]);
62
63 // Set up main thread rAF animation.
64 // FIXME: This is broken :( It appears that setting the values in FrameView ca uses the pain.
65 // See the comment in that class for more details.
66 setTimeout(jank, 1000);
67 requestAnimationFrame(tick);
68 }
69
70 function tick(timestamp) {
71 var seconds = timestamp / 1000.0;
72 document.getElementById('raf').style.webkitTransform = "translateZ(0) rotate(" + (180.0 * seconds) + "deg)";
73 requestAnimationFrame(tick);
74 }
75
76 function jank() {
77 var sum = 0;
78 for (var i = 0; i < 10000000; ++i) {
79 sum += Date.now();
80 }
81 //console.log(sum);
82 setTimeout(jank, 100);
83 }
84
85 </script>
86 <div id="spinner" class="card">Hello, World!</div>
87 <div id="raf" class="card">rAF animated</div>
88 <div id="scroller" class="scroller">
89 <div id="scrolled" class="scrolled">This stuff is totally scrolled!</div>
90 </div>
91 <div id="scroller2" class="scroller">
92 <div id="scrolled2" class="scrolled">This stuff is totally scrolled!</div>
93 </div>
OLDNEW
« no previous file with comments | « LayoutTests/fast/workers/scroll-linked-effects.html ('k') | LayoutTests/fast/workers/snap.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698