Skip to content
Permalink
Browse files

Force update titlebar height in Australis

(browser.tabs.drawInTitlebar = true)
Also see https://bugzilla.mozilla.org/show_bug.cgi?id=987929
Note: updating is buggy, but this is also buggy after maximize/restore window.
  • Loading branch information
Infocatcher committed Mar 26, 2014
1 parent 6c57549 commit 6c43c74e859741ec3f5ebb13c712b843eff68517
Showing with 16 additions and 10 deletions.
  1. +16 −10 bootstrap.js
@@ -3183,18 +3183,24 @@ var windowsObserver = {
) {
window.setTimeout(function() { // Pseudo async
// Based on code from chrome://browser/content/browser.js
function sizePlaceholder(type, baseNodeId) {
var baseNode = document.getElementById(baseNodeId);
if(baseNode) {
var rect = baseNode.getBoundingClientRect();
if(rect.width) {
_log("Update size placeholder for #" + baseNodeId);
window.TabsInTitlebar._sizePlaceholder(type, rect.width);
if("CustomizableUI" in window) { // Australis
window.TabsInTitlebar._update(true);
_log("updateTabsInTitlebar() => TabsInTitlebar._update(true)");
}
else {
var sizePlaceholder = function(type, baseNodeId) {
var baseNode = document.getElementById(baseNodeId);
if(baseNode) {
var rect = baseNode.getBoundingClientRect();
if(rect.width) {
_log("Update size placeholder for #" + baseNodeId);
window.TabsInTitlebar._sizePlaceholder(type, rect.width);
}
}
}
};
sizePlaceholder("appmenu-button", "appmenu-button-container");
sizePlaceholder("caption-buttons", "titlebar-buttonbox-container");
}
sizePlaceholder("appmenu-button", "appmenu-button-container");
sizePlaceholder("caption-buttons", "titlebar-buttonbox-container");
}, 0);
}
},

0 comments on commit 6c43c74

Please sign in to comment.
You can’t perform that action at this time.