summaryrefslogtreecommitdiffstats
path: root/ppapi/examples
diff options
context:
space:
mode:
authorraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-12 20:30:27 +0000
committerraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-12 20:30:27 +0000
commite7400bf9507771403583fdffe917a72f21341d79 (patch)
tree853cab86e95f59b79cdc6f7d937fed99e1fd3322 /ppapi/examples
parenteeaecee730bd83580cd60137ec6e4bb966253c36 (diff)
downloadchromium_src-e7400bf9507771403583fdffe917a72f21341d79.zip
chromium_src-e7400bf9507771403583fdffe917a72f21341d79.tar.gz
chromium_src-e7400bf9507771403583fdffe917a72f21341d79.tar.bz2
Updated flash_topmost example to better demonstrate corner cases of the feature.
-Makes it easier to test the feature when the page is scrolled. -Places an invisible div above everything to test that it is not involved in the hit test. TEST=Ran the example and checked that it gives correct results. BUG=27086 NOTRY=true Review URL: http://codereview.chromium.org/10068018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132046 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/examples')
-rw-r--r--ppapi/examples/flash_topmost/flash_topmost.html35
1 files changed, 32 insertions, 3 deletions
diff --git a/ppapi/examples/flash_topmost/flash_topmost.html b/ppapi/examples/flash_topmost/flash_topmost.html
index 81ab1c3..ba21246 100644
--- a/ppapi/examples/flash_topmost/flash_topmost.html
+++ b/ppapi/examples/flash_topmost/flash_topmost.html
@@ -10,6 +10,19 @@
</head>
<style type="text/css">
+embed {
+ position: absolute;
+}
+#box0 {
+ background-color: #cccccc;
+ line-height: 200px;
+ padding: 0px;
+ position: absolute;
+ text-align: center;
+ width: 2000px;
+ height: 2000px;
+ z-index: -2;
+}
#box1 {
background-color: #ffff00;
line-height: 200px;
@@ -30,6 +43,17 @@
height: 200px;
z-index: 1;
}
+#box3 {
+ background-color: #000000;
+ line-height: 200px;
+ padding: 0px;
+ position: absolute;
+ text-align: center;
+ width: 2000px;
+ height: 2000px;
+ z-index: 2;
+ visibility: hidden;
+}
</style>
<script type="text/javascript">
@@ -63,12 +87,17 @@ function onMouseUp(event) {
}
</script>
-<div id="box1" style="left:0px;top:0px;"
+<div id="box0" style="left:0px;top:0px;"
+ onmousedown="onMouseDown(event)">Box #0</div>
+<div id="box1" style="left:100px;top:400px;"
onmousedown="onMouseDown(event)">Box #1</div>
<embed id="plugin" type="application/x-ppapi-example-flash-topmost"
- width="400" height="400"/>
-<div id="box2" style="left:0px;top:100px;"
+ width="400" height="400"
+ style="left:200px;top:400px;" />
+<div id="box2" style="left:200px;top:500px;"
onmousedown="onMouseDown(event)">Box #2</div>
+<div id="box3" style="left:0px;top:0px;"
+ onmousedown="onMouseDown(event)">Box #3</div>
</body>
</html>