Firefox: Handling Widget Differences
Each operating system provides or supports a GUI library that can be used to draw interactive widgets. Firefox does not draw widgets using these libraries. Firefox uses its own widget-drawing code to draw widgets on a blank canvas supplied by those libraries. So, for example, Firefox for Windows does not depend on COMCTL32.DLL (or .OCX), and replacing that library is therefore of no use.
There are two areas of the desktop GUI that Firefox widgets depend upon. One is the theme engine for natively styled widgets . Not all platforms support all -moz-appearance values, so applying such a style property can do nothing in some instances, but at least that's harmless.
The second area is the operating-system accessibility API. This is wrapped up in a portable XPCOM object with the nsIAccessible interface. It is used in the XBL definitions for XUL widgets . You can't see the equivalent use for HTML tags unless you turn on XHTML tag support.
Where there is accessibility support, follow the guidelines at http://www.mozilla.org/access/xul-guidelines for best results in XUL.
In general, don't try to lay out XUL or HTML widgets in pixel-perfect style. What looks good on one operating system will be up for debate on another. It is better to pack widgets loosely, using the naturally flowing layout of the page: line boxes and blocks for HTML, boxes for XUL.
0 Comments:
Post a Comment
<< Home