1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Strict//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <title>Test for Bugs
39295 and
39297</title>
6 <meta http-equiv=
"refresh" content=
"5">
7 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
8 <meta name=
"viewport" content=
"initial-scale=0.60, minimum-scale=0.60, maximum-scale=0.60">
9 <style type=
"text/css">
12 font-family: 'Lucida Grande', Verdana
, Arial
;
22 Setting the perspective of the contents of the stage
23 but not the stage itself
26 -webkit-perspective: 800;
33 /* Ensure that we're in 3D space */
34 -webkit-transform-style: preserve-3d
;
36 Make the whole set of rows use the x-axis spin animation
37 for a duration of 7 seconds, running infinitely and linearly
39 -webkit-animation-name: x-spin
;
40 -webkit-animation-duration: 7s;
41 -webkit-animation-iteration-count: infinite
;
42 -webkit-animation-timing-function: linear
;
49 -webkit-transform-style: preserve-3d
;
50 -webkit-animation-iteration-count: infinite
;
51 -webkit-animation-timing-function: linear
;
54 .ring > :nth-child(odd) {
55 background-color: #995C7F;
58 .ring > :nth-child(even) {
59 background-color: #835A99;
68 color: rgba
(0,0,0,0.9);
69 -webkit-border-radius: 10px;
73 font-family: 'Georgia', serif
;
81 Set up each row to have a different animation duration
82 and alternating y-axis rotation directions.
85 -webkit-animation-name: y-spin
;
86 -webkit-animation-duration: 5s;
90 -webkit-animation-name: back-y-spin
;
91 -webkit-animation-duration: 4s;
95 -webkit-animation-name: y-spin
;
96 -webkit-animation-duration: 3s;
101 Here we define each of the three individual animations that
102 we will be using to have our 3D rotation effect. The first
103 animation will perform a full rotation on the x-axis, we'll
104 use that on the whole set of objects. The second and third
105 animations will perform a full rotation on the y-axis in
106 opposite directions, alternating directions between rows.
108 Note that you currently have to specify an intermediate step
109 for rotations even when you are using individual transformation
113 @
-webkit-keyframes x-spin
{
114 0% { transform: rotateX
(0deg); }
115 50% { transform: rotateX
(180deg); }
116 100% { transform: rotateX
(360deg); }
119 @
-webkit-keyframes y-spin
{
120 0% { transform: rotateY
(0deg); }
121 50% { transform: rotateY
(180deg); }
122 100% { transform: rotateY
(360deg); }
125 @
-webkit-keyframes back-y-spin
{
126 0% { transform: rotateY
(360deg); }
127 50% { transform: rotateY
(180deg); }
128 100% { transform: rotateY
(0deg); }
132 <script type=
"text/javascript">
134 const POSTERS_PER_ROW
= 12;
135 const RING_RADIUS
= 200;
137 function setup_posters (row
)
139 var posterAngle
= 360 / POSTERS_PER_ROW
;
140 for (var i
= 0; i
< POSTERS_PER_ROW
; i
++) {
141 var poster
= document
.createElement('div');
142 poster
.className
= 'poster';
143 // compute and assign the transform for this poster
144 var transform
= 'rotateY(' + (posterAngle
* i
) + 'deg) translateZ(' + RING_RADIUS
+ 'px)';
145 poster
.style
.webkitTransform
= transform
;
146 // setup the number to show inside the poster
147 var content
= poster
.appendChild(document
.createElement('p'));
148 content
.textContent
= i
;
149 // add the poster to the row
150 row
.appendChild(poster
);
157 setup_posters(document
.getElementById('ring-1'));
158 setup_posters(document
.getElementById('ring-2'));
159 setup_posters(document
.getElementById('ring-3'));
162 // call init once the document is fully loaded
163 window
.addEventListener('load', init
, false);
170 <p>This is a combined test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=39295">Bug
39295: Crash (preceded by
171 assertion) in WKCACFLayerRenderer::setNeedsDisplay when computer wakes from sleep on particular page
</a> and
<a
172 href=
"https://bugs.webkit.org/show_bug.cgi?id=39297">Bug
39297: WebView doesn't repaint until page reloads when page
173 using hardware acceleration loads just after waking from sleep
</a>. To test, put your computer to sleep (or
174 "Standby", as Windows calls it). When you wake your computer up, the browser should not crash and the animation
175 below should still be running without any periods of non-painting of the WebView.
</p>
178 <div id=
"ring-1" class=
"ring"></div>
179 <div id=
"ring-2" class=
"ring"></div>
180 <div id=
"ring-3" class=
"ring"></div>