Attached patch fixes alignment rendering for legends and matches FireFox. Attached html file demonstrates the issue in all cases with both LTR and RTL. Unfortunately we also exhibit some fieldset rendering problems it seems, but they're unrelated as far as I can tell.
Created attachment 11422 [details] patch
Created attachment 11423 [details] demonstrate the problem
Is this behavior true in quirks and strict mode?
Comment on attachment 11422 [details] patch Please include a layout test. Thanks.
I know it needs one but no time to make it right now. Also didn't check to see if it should happen in strict mode too.
Created attachment 11717 [details] Now with testcase I noticed no difference in behaviour in quirks and strict mode. The testcase is really just pmax' example. Cheers, Rob.
Comment on attachment 11717 [details] Now with testcase r=me
Landed in r17995.
See also Bug 3280.