Denizens of XUL,
Checked in this morning (and working fully now, thanks to some
wonderful regression bashing by Hakan Waara and Seth Spitzer) were some
new changes to XUL that will have some minor impacts upon syntax for
certain things. This post is my attempt to document them on a wider
scale than just in the checkin comment (which did not mention the full
extent of the changes).
1. align="vertical" and align="horizontal" support for <box> and
<window> has been set for removal. The actual removal is waiting upon
Netscape commercial updating for this landing. I think I'll give it a
week (jag or kerz should have the changes done for commercial shortly),
to allow other developers to update. This will only affect XUL
writers. This support has been deprecated for quite some time (about a
year, in fact) in favor of orient="vertical" and orient="horizontal".
The change is harmless and fixes the problems. The only elements that
should have align="vertical" or align="horizontal" now are <scrollbar>
and its companions <thumb> and <slider>. This inconsistency is filed as
bug 90001. This was bug 70857.
2. <titledbox> is being changed to <groupbox>. Though the reason for
this change is not clear to me (I think it's to bring the elements into
synch with what they are traditionally called in UI guidelines), the bug
was filed as 70748. The XBL as currently written includes identical
support for both <titledbox> and <groupbox>, but the former will be
going away at some point in the future. Again, another painless change
that will only require a search and replace for XUL writers.
<titledbox> will be around for quite some time and will likely be
deprecated before it is removed, but this is a heads-up. blake had
handled the other half of this bug (<title> -> <label>) some time ago.
3. language="javascript" and type="text/javascript" have been changed in
the Mozilla trunk to type="application/x-javascript" in <script> tags.
This change is utterly cosmetic in terms of the codebase and has exactly
no implication on anything other than being consistent in the trunk. No
one needs to worry about this unless they want to; it's a completely
innocuous change. This was bug 65428.
4. Bug 73671 - <box> | <box orient="horizontal"> -> <hbox> and <box
orient="vertical"> -> <vbox>. This was the one that caused the
regressions (due to <box> inheritance rules that I forgot to take into
account). This change is not necessary but was made to reduce the
number of attributes in XUL. It should net a negligible performance
gain, but mostly it merely reduces the ambiguity of boxes in XUL. XUL
authors may choose to adopt it or not; support for <box> will be
maintained indefinitely. Using <hbox> and <vbox> can help with
organization and will net a very tiny performance gain due to reduced
attribute usage, but it *is* unnecessary.
5. A grippy orientation problem with <vbox> has been fixed. This goes
hand-in-hand with the fix to 73671 and was suggested by Robert Ginda.
<vbox> and <box orient="vertical"> now are identical in Modern and both
Classic skins (Windows Classic was fine already; the other two were
incorrect). Theme authors will want to take a look at this to make sure
their stylings support the correct <vbox> grippy orientation; it's very
likely not going to be correct. See splitters.css in each of the skins
for details.
6. Stylings have been added to xul.css to allow <hbox> to be the same as
<box> with respect to use of certain attributes. This shouldn't affect
themes, but I'm not sure.
7. Mac Classic now uses the original stylings for <titledbox> (AKA
<groupbox>). This was broken with blake's landing a few months ago.
There is one known issue: bug 88332. The <outliner> tag does not like
to be a child of <vbox> and will cause incorrect orientation at best and
a crash at worst (observed by pocemit on Linux). All <box
orient="vertical"> instances still in the trunk are to work around this
problem. It is targeted for Mozilla 1.0 and assigned to bryner.
That should be everything. Most of the changes are either easy to make
(a search and replace tool will do them) or are unnecessary. Thanks for
listening.
--
Mark Anderson
FrodoB on irc.mozilla.org