diff options
| author | Steve Block <steveblock@google.com> | 2011-05-13 06:44:40 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-13 06:44:40 -0700 |
| commit | 08014c20784f3db5df3a89b73cce46037b77eb59 (patch) | |
| tree | 47749210d31e19e6e2f64036fa8fae2ad693476f /Source/WebCore/manual-tests/transition-events.html | |
| parent | 860220379e56aeb66424861ad602b07ee22b4055 (diff) | |
| parent | 4c3661f7918f8b3f139f824efb7855bedccb4c94 (diff) | |
| download | external_webkit-08014c20784f3db5df3a89b73cce46037b77eb59.zip external_webkit-08014c20784f3db5df3a89b73cce46037b77eb59.tar.gz external_webkit-08014c20784f3db5df3a89b73cce46037b77eb59.tar.bz2 | |
Merge changes Ide388898,Ic49f367c,I1158a808,Iacb6ca5d,I2100dd3a,I5c1abe54,Ib0ef9902,I31dbc523,I570314b3
* changes:
Merge WebKit at r75315: Update WebKit version
Merge WebKit at r75315: Add FrameLoaderClient PageCache stubs
Merge WebKit at r75315: Stub out AXObjectCache::remove()
Merge WebKit at r75315: Fix ImageBuffer
Merge WebKit at r75315: Fix PluginData::initPlugins()
Merge WebKit at r75315: Fix conflicts
Merge WebKit at r75315: Fix Makefiles
Merge WebKit at r75315: Move Android-specific WebCore files to Source
Merge WebKit at r75315: Initial merge by git.
Diffstat (limited to 'Source/WebCore/manual-tests/transition-events.html')
| -rw-r--r-- | Source/WebCore/manual-tests/transition-events.html | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/Source/WebCore/manual-tests/transition-events.html b/Source/WebCore/manual-tests/transition-events.html new file mode 100644 index 0000000..36cf940 --- /dev/null +++ b/Source/WebCore/manual-tests/transition-events.html @@ -0,0 +1,90 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/html4/loose.dtd"> + +<html lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <title>Transition Events</title> + <style type="text/css" media="screen"> + #box1 { + position: relative; + width: 100px; + height: 100px; + margin: 10px; + background-color: blue; + z-index: 0; + -webkit-transition-property: left; + -webkit-transition-duration: 2s; + left: 0px; + } + + #box2 { + position: relative; + width: 100px; + height: 100px; + margin: 10px; + background-color: red; + z-index: 0; + -webkit-transition-property: left; + -webkit-transition-duration: 2s; + left: 0px; + } + + #log { + position: absolute; + width: 90%; + height: 200px; + overflow: scroll; + border: 1px solid black; + } + </style> + <script type="text/javascript" charset="utf-8"> + + var switch1 = true; + var switch2 = false; + + document.addEventListener('webkitTransitionEnd', function(e) { + var id = "1"; + if (switch1) { + id = "2"; + } + var offset = 200; + if (switch2) { + offset = 0; + } + var box = document.getElementById("box" + id); + box.style.left = "" + offset + "px"; + switch1 = !switch1; + if (!switch1) switch2 = !switch2; + logTransition(event); + }, false); + + function doClick(obj) + { + var box1 = document.getElementById("box1"); + box1.style.left = "200px"; + } + + function logTransition(event) + { + var log = document.getElementById('log'); + log.innerHTML = log.innerHTML + '<br>Property: ' + event.propertyName + ' Time: ' + event.elapsedTime; + } + </script> +</head> +<body> + <h2>Transition Events</h2> + <p>Click to start transitions. Once started, transition end events should keep + things moving forever.</p> + <div id="container" onclick="doClick(this)"> + <div id="box1"> + </div> + <div id="box2"> + </div> + </div> + + <div id="log"> + + </div> +</body> +</html> |
