From e7a1a2d0ab1c5416d26b63d92f7227f8c7b1592c Mon Sep 17 00:00:00 2001 From: Alive Kuo Date: Tue, 4 Dec 2012 11:09:13 +0800 Subject: [PATCH] Bug 816647 - mozFullScreen meets inline activity, r=djf+timdream, a=blocking-basecamp --- apps/system/js/statusbar.js | 2 +- apps/system/js/window_manager.js | 10 ++++++++-- apps/system/style/zindex.css | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/system/js/statusbar.js b/apps/system/js/statusbar.js index 2a85bf7a454a..ea41af953e95 100644 --- a/apps/system/js/statusbar.js +++ b/apps/system/js/statusbar.js @@ -55,7 +55,7 @@ var StatusBar = { /* For other modules to acquire */ get height() { if (this.screen.classList.contains('fullscreen-app') || - document.querySelector('#screen:-moz-full-screen-ancestor')) { + document.mozFullScreen) { return 0; } else if (this.screen.classList.contains('active-statusbar')) { return this.attentionBar.offsetHeight; diff --git a/apps/system/js/window_manager.js b/apps/system/js/window_manager.js index 700d589499d7..0f05d7c1ca88 100644 --- a/apps/system/js/window_manager.js +++ b/apps/system/js/window_manager.js @@ -230,8 +230,14 @@ var WindowManager = (function() { var frame = inlineActivityFrame; frame.style.width = appFrame.style.width; - frame.style.height = appFrame.style.height; - frame.style.top = appFrame.offsetTop + 'px'; + + if (document.mozFullScreen) { + frame.style.height = window.innerHeight + 'px'; + frame.style.top = '0px'; + } else { + frame.style.height = appFrame.style.height; + frame.style.top = appFrame.offsetTop + 'px'; + } } function setFrameBackgroundBlob(frame, blob, transparent) { diff --git a/apps/system/style/zindex.css b/apps/system/style/zindex.css index 4f3250fcf1a5..cf3ff8fb9a1a 100644 --- a/apps/system/style/zindex.css +++ b/apps/system/style/zindex.css @@ -182,6 +182,7 @@ /* We promotes the following overlays on top of the fullscreen web content. */ +#screen:-moz-full-screen-ancestor > [data-z-index-level="app"] > iframe.appWindow.inlineActivity, #screen:-moz-full-screen-ancestor > [data-z-index-level="sleep-menu"], #screen:-moz-full-screen-ancestor > [data-z-index-level="list-menu"], #screen.locked:-moz-full-screen-ancestor > [data-z-index-level="statusbar"],