diff options
Diffstat (limited to 'WebCore/manual-tests')
-rw-r--r-- | WebCore/manual-tests/dom/form-control-for-label.html | 12 | ||||
-rw-r--r-- | WebCore/manual-tests/layoutroot_detach.xml | 33 | ||||
-rw-r--r-- | WebCore/manual-tests/no-repaint-after-wake-from-sleep.html | 183 |
3 files changed, 228 insertions, 0 deletions
diff --git a/WebCore/manual-tests/dom/form-control-for-label.html b/WebCore/manual-tests/dom/form-control-for-label.html new file mode 100644 index 0000000..aeb8338 --- /dev/null +++ b/WebCore/manual-tests/dom/form-control-for-label.html @@ -0,0 +1,12 @@ +<html> +<style> +progress {border: 3px solid blue;} +progress:hover {border: 3px solid red;} +</style> +<body> +<h3>Test hover</h3> +<label>The border color of the progress bar should change from blue to red when you hover on this label text <progress></progress></label><br> +<label>The border of this progress bar would change color when it is inside fieldset and legend elements <fieldset><legend><progress></progress></legend></fieldset></label><br> +</body> +</html> + diff --git a/WebCore/manual-tests/layoutroot_detach.xml b/WebCore/manual-tests/layoutroot_detach.xml new file mode 100644 index 0000000..3a64c01 --- /dev/null +++ b/WebCore/manual-tests/layoutroot_detach.xml @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> +<body onload="addImg()"> +<style> +.killme { display:none } +</style> +<div style="overflow:hidden; position:absolute; width:150px; height:150px; top:50px; left:0px"> + <div id='parent' style="overflow:hidden; position:absolute; width:150px; height:150px; top:50px; left:0px"> + <svg xmlns="http://www.w3.org/2000/svg" version="1.1"> + <g> + <rect id='rrr' x='0' y='0' width='10' height='10'/> + </g> + </svg> + </div> +</div> +<script> +function boomie() { + document.body.offsetTop; + document.getElementById('rrr').setAttribute('x', '20'); + document.getElementById('parent').className='killme'; +} +function addImg() { + window.setTimeout(function() { + var i = new Image(); + i.src = 'http://www.webkit.org/nosuchfile.png'; + document.body.appendChild(i); + i.onerror = boomie; + }, 15); +} +</script> +</body> +</html> + diff --git a/WebCore/manual-tests/no-repaint-after-wake-from-sleep.html b/WebCore/manual-tests/no-repaint-after-wake-from-sleep.html new file mode 100644 index 0000000..0c0f161 --- /dev/null +++ b/WebCore/manual-tests/no-repaint-after-wake-from-sleep.html @@ -0,0 +1,183 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" + "http://www.w3.org/TR/html4/strict.dtd"> +<html> + <head> + <title>Test for Bug 39139</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta name="viewport" content="initial-scale=0.60, minimum-scale=0.60, maximum-scale=0.60"> + <style type="text/css"> + + body { + font-family: 'Lucida Grande', Verdana, Arial; + font-size: 12px; + } + + #stage { + margin: 150px auto; + width: 600px; + height: 400px; + /* + + Setting the perspective of the contents of the stage + but not the stage itself + + */ + -webkit-perspective: 800; + } + + #rotate { + margin: 0 auto; + width: 600px; + height: 400px; + /* Ensure that we're in 3D space */ + -webkit-transform-style: preserve-3d; + /* + Make the whole set of rows use the x-axis spin animation + for a duration of 7 seconds, running infinitely and linearly + */ + -webkit-animation-name: x-spin; + -webkit-animation-duration: 7s; + -webkit-animation-iteration-count: infinite; + -webkit-animation-timing-function: linear; + } + + .ring { + margin: 0 auto; + height: 110px; + width: 600px; + -webkit-transform-style: preserve-3d; + -webkit-animation-iteration-count: infinite; + -webkit-animation-timing-function: linear; + } + + .ring > :nth-child(odd) { + background-color: #995C7F; + } + + .ring > :nth-child(even) { + background-color: #835A99; + } + + .poster { + position: absolute; + left: 250px; + width: 100px; + height: 100px; + opacity: 0.7; + color: rgba(0,0,0,0.9); + -webkit-border-radius: 10px; + } + + .poster > p { + font-family: 'Georgia', serif; + font-size: 36px; + font-weight: bold; + text-align: center; + margin-top: 28px; + } + + /* + Set up each row to have a different animation duration + and alternating y-axis rotation directions. + */ + #ring-1 { + -webkit-animation-name: y-spin; + -webkit-animation-duration: 5s; + } + + #ring-2 { + -webkit-animation-name: back-y-spin; + -webkit-animation-duration: 4s; + } + + #ring-3 { + -webkit-animation-name: y-spin; + -webkit-animation-duration: 3s; + } + + /* + + Here we define each of the three individual animations that + we will be using to have our 3D rotation effect. The first + animation will perform a full rotation on the x-axis, we'll + use that on the whole set of objects. The second and third + animations will perform a full rotation on the y-axis in + opposite directions, alternating directions between rows. + + Note that you currently have to specify an intermediate step + for rotations even when you are using individual transformation + constructs. + + */ + @-webkit-keyframes x-spin { + 0% { -webkit-transform: rotateX(0deg); } + 50% { -webkit-transform: rotateX(180deg); } + 100% { -webkit-transform: rotateX(360deg); } + } + + @-webkit-keyframes y-spin { + 0% { -webkit-transform: rotateY(0deg); } + 50% { -webkit-transform: rotateY(180deg); } + 100% { -webkit-transform: rotateY(360deg); } + } + + @-webkit-keyframes back-y-spin { + 0% { -webkit-transform: rotateY(360deg); } + 50% { -webkit-transform: rotateY(180deg); } + 100% { -webkit-transform: rotateY(0deg); } + } + </style> + + <script type="text/javascript"> + + const POSTERS_PER_ROW = 12; + const RING_RADIUS = 200; + + function setup_posters (row) + { + var posterAngle = 360 / POSTERS_PER_ROW; + for (var i = 0; i < POSTERS_PER_ROW; i ++) { + var poster = document.createElement('div'); + poster.className = 'poster'; + // compute and assign the transform for this poster + var transform = 'rotateY(' + (posterAngle * i) + 'deg) translateZ(' + RING_RADIUS + 'px)'; + poster.style.webkitTransform = transform; + // setup the number to show inside the poster + var content = poster.appendChild(document.createElement('p')); + content.textContent = i; + // add the poster to the row + row.appendChild(poster); + } + + } + + function init () + { + setup_posters(document.getElementById('ring-1')); + setup_posters(document.getElementById('ring-2')); + setup_posters(document.getElementById('ring-3')); + } + + // call init once the document is fully loaded + window.addEventListener('load', init, false); + + </script> + </head> + + <body> + + <p>This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=39139">Bug 39139: Pages + that use hardware acceleration don't repaint after waking computer from sleep</a>. To test, put + your computer to sleep (or "Standby", as Windows calls it). When you wake your computer up, the + animation below should still be running.</p> + <div id="stage"> + <div id="rotate"> + <div id="ring-1" class="ring"></div> + <div id="ring-2" class="ring"></div> + <div id="ring-3" class="ring"></div> + </div> + </div> + + </body> + +</html> |