We should add rules to our UA style sheet reflecting the new outlining algorithm in HTML5. In particular, the changes suggested by the rendering section of the HTML5 spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html are straightforward to implement using :-moz-any().
Created attachment 442571 [details] [diff] [review] patch I still need to test this (and perhaps add an automated test) before requesting review.
Created attachment 442611 [details] [diff] [review] patch Writing the test was useful; I caught the need for 'font: 1.00em' on the h4 rule.
And I'm not expecting this to be a noticeable performance problem; it's about as bad as what we already do for li elements, and I think li elements are much more common than h1 elements.
Er, what we do for ul and ol elements. Still, I think they're probably more common.
Comment on attachment 442611 [details] [diff] [review] patch r=bzbarsky