O'Reilly logo

Firefox Hacks by Nigel McFarlane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #91. Handle Cross-Platform Differences

Manage the differences among standard Firefox installs on different platforms.

Firefox works hard to provide the same user interface and web page displays on all platforms: Windows, Unix/Linux, and Macintosh. A great deal of effort has gone into this, especially with respect to the Gecko layout engine. Where the underlying operating systems are different, or where specific installations are different, differences can sometimes show through. This hack points out the most obvious cases and shows how to manage them.

At first, such differences might be irritating or awkward for users, but the consequences are felt mostly in XUL-based user-interface development, where a little care in constructing XUL documents is required.

Fundamentally, a single, compiled Firefox program cannot run on all platforms. Therefore, the standard Firefox install is created and customized separately for each platform. Although there is only one source code base, some small parts of it are operating-system-specific.

Handling Obvious Big-Ticket Differences

Human Interface Guidelines (HIGs) are standards that encourage all applications in a given desktop environment to provide similar idioms of use. Since HIGs for Apple, Microsoft, and Linux (e.g., GNOME) all differ, a tool that hopes to get a standards tick on every platform must look different on each platform. These are the big-ticket differences and how Firefox handles them:

The hidden window menu bar

The menu bar on the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required