mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 783605 - DOM full screen should disable social sidebar. r=jaws
This commit is contained in:
parent
d4b2e10376
commit
628d962685
@ -18,6 +18,9 @@ let SocialUI = {
|
||||
|
||||
gBrowser.addEventListener("ActivateSocialFeature", this._activationEventHandler, true, true);
|
||||
|
||||
// Called when we enter DOM full-screen mode.
|
||||
window.addEventListener("mozfullscreenchange", function () SocialSidebar.updateSidebar());
|
||||
|
||||
Social.init(this._providerReady.bind(this));
|
||||
},
|
||||
|
||||
@ -188,7 +191,7 @@ let SocialChatBar = {
|
||||
let docElem = document.documentElement;
|
||||
let chromeless = docElem.getAttribute("disablechrome") ||
|
||||
docElem.getAttribute("chromehidden").indexOf("extrachrome") >= 0;
|
||||
return Social.uiVisible && !chromeless;
|
||||
return Social.uiVisible && !chromeless && !document.mozFullScreen;
|
||||
},
|
||||
openChat: function(aProvider, aURL, aCallback, aMode) {
|
||||
if (this.canShow)
|
||||
@ -753,8 +756,8 @@ var SocialSidebar = {
|
||||
},
|
||||
|
||||
// Whether the user has toggled the sidebar on (for windows where it can appear)
|
||||
get enabled() {
|
||||
return Services.prefs.getBoolPref("social.sidebar.open");
|
||||
get opened() {
|
||||
return Services.prefs.getBoolPref("social.sidebar.open") && !document.mozFullScreen;
|
||||
},
|
||||
|
||||
dispatchEvent: function(aType, aDetail) {
|
||||
@ -771,7 +774,7 @@ var SocialSidebar = {
|
||||
|
||||
// Hide the sidebar if it cannot appear, or has been toggled off.
|
||||
// Also set the command "checked" state accordingly.
|
||||
let hideSidebar = !this.canShow || !this.enabled;
|
||||
let hideSidebar = !this.canShow || !this.opened;
|
||||
let broadcaster = document.getElementById("socialSidebarBroadcaster");
|
||||
broadcaster.hidden = hideSidebar;
|
||||
command.setAttribute("checked", !hideSidebar);
|
||||
|
@ -17,7 +17,7 @@ function test() {
|
||||
|
||||
function doTest(finishcb) {
|
||||
ok(SocialSidebar.canShow, "social sidebar should be able to be shown");
|
||||
ok(SocialSidebar.enabled, "social sidebar should be on by default");
|
||||
ok(SocialSidebar.opened, "social sidebar should be open by default");
|
||||
|
||||
let command = document.getElementById("Social:ToggleSidebar");
|
||||
let sidebar = document.getElementById("social-sidebar-box");
|
||||
|
Loading…
Reference in New Issue
Block a user