When building Firefox extensions I try to pretend the operating system doesn't exist, but reality sets in and I'm forced to deal with platform specific bugs. Until yesterday Searchy was crashing on Linux due to the sleek styling (smart and sexy is a lot of work!)
I narrowed the crash down to a style -moz-appearance: none on a xul:panel. When combined with with adding/removing child nodes leaves you learning about using AllowDeactivateGrabs to recover your X11 session.
You can find a simplified overlay.xul which causes the crash within moments of opening your browser - in a branch of searchy lovingly called crashy.
Once I determined setting -moz-appearance: menupopup on linux made it usable I was really ecstatic. The next step was how to make this change without changing the styling on Windows and OSX.
Mozilla allows using of manifests in chrome registration so you can have a different skin for specific operating systems.
skin searchy classic/1.0 chrome/skin/ skin searchy classic/1.0 chrome/skin-linux/ os=Linux
Duplicating the css and images from chrome/skin into chrome/skin-linux with a single change to -moz-appearance adds the requirement to remember to make future changes to both copies.
Long ago I ran into and solved problem on Taboo, but unfortunately I had forgot an important detail. In Taboo I used CSS attribute rules that only work on Linux/Mac.
#element[OS=Linux] {
background: black;
}
What I forgot was the manual addition of the OS attribute on initialization.
function decorate() {
var runtime = Components.classes['@mozilla.org/xre/app-info;1']
.getService(Components.interfaces.nsIXULRuntime);
document.getElementById('element')
.setAttribute('OS', runtime.OS);
window.removeEventListener('load', decorate, false);
}
window.addEventListener('load', decorate, false);
Hopefully Mozilla will improve the panel code so I don't need this, but until then you can use this to work around to save hours of frustration :)
