summaryrefslogtreecommitdiffstats
path: root/ppapi/examples
diff options
context:
space:
mode:
authorjeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-03 07:39:22 +0000
committerjeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-03 07:39:22 +0000
commite64c167a1b028ad307f1cc996edf6b797c0d08e1 (patch)
tree583a56d91bba1e2c701f640f27d6ef5dab8f6863 /ppapi/examples
parentb9bbf553771af0593368893fab9bfa85b5b512ed (diff)
downloadchromium_src-e64c167a1b028ad307f1cc996edf6b797c0d08e1.zip
chromium_src-e64c167a1b028ad307f1cc996edf6b797c0d08e1.tar.gz
chromium_src-e64c167a1b028ad307f1cc996edf6b797c0d08e1.tar.bz2
Fix ppapi mouse lock example to use document.webkitIsFullScreen.
The state of fullscreen can change other than by the script calling requestFullScreen()/cancelFullScreen(), so the ToggleFullscreen function should query document.webkitIsFullScreen instead of maintaining its own state. BUG=100531 TEST=none Review URL: http://codereview.chromium.org/8351090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/examples')
-rw-r--r--ppapi/examples/mouse_lock/mouse_lock.html4
1 files changed, 1 insertions, 3 deletions
diff --git a/ppapi/examples/mouse_lock/mouse_lock.html b/ppapi/examples/mouse_lock/mouse_lock.html
index 93ff070..5ce2261 100644
--- a/ppapi/examples/mouse_lock/mouse_lock.html
+++ b/ppapi/examples/mouse_lock/mouse_lock.html
@@ -14,15 +14,13 @@
}
</style>
<script>
- var fullscreen = false;
function ToggleFullscreen() {
- if (fullscreen) {
+ if (document.webkitIsFullScreen) {
document.webkitCancelFullScreen();
} else {
document.getElementById('container').webkitRequestFullScreen(
Element.ALLOW_KEYBOARD_INPUT);
}
- fullscreen = !fullscreen;
}
</script>
</head>