Mozilla Just Fixed an 18-Year-Old Firefox Bug


Firefox Logo Hero Image 675px

We all have a to-do list with items that have been there for too long, as more important problems come up… or procrastination kicks in. That’s even true for Mozilla, which recently fixed a Firefox bug that was first reported 18 years ago.

Bug 290125 was first reported on April 12, 2005, only a few days before the release of Firefox 1.0.3, and outlined an issue with how Firefox rendered text with the ::first-letter CSS psuedo-element. The author said, “when floating left a :first-letter (to produce a dropcap), Gecko ignores any declared line-height and inherits the line-height of the parent box. […] Both Opera 7.5+ and Safari 1.0+ correctly handle this.”

Comparison of Firefox on Mac and Windows rendering text
Screenshot of the original bug from 2005 philippe / Bugzilla

The initial problem was that the Mac version of Firefox handled line heights differently than Firefox on other platforms, which was fixed in time for Firefox 3.0 in 2007. The issue was then re-opened in 2014, when it was decided in a CSS Working Group meeting that Firefox’s special handling of line heights didn’t meet CSS specifications and was causing compatibility problems. It led to some sites with a large first letter in blocks of text, like The Verge and The Guardian, render incorrectly in Firefox compared to other browsers.

The issue was still marked as low priority, so progress continued slowly, until it was finally marked as fixed on December 20, 2022. Firefox 110 should include the updated code, which is expected to roll out to everyone in February 2023.

Mozilla developer Jonathan Kew explained, “Historically, Gecko [Firefox] implemented the behavior allowed by CSS2 whereby a floated ::first-letter is “boxed” tightly around the glyph shape, rather than using constant font-ascent and -descent metrics which may leave a lot of blank space depending whether the character has any ascender/descender or not. However, neither webkit [Safari] nor blink [Chrome] do this, which leads to webcompat pain when sites are constructed assuming their behavior.”

There are a few reported Firefox bugs that are even older, like one related to floating CSS elements from August 1999, but it’s great (and mildly amusing) to see Mozilla clear out a bug so old it could legally vote in the United States.

Source: Bugzilla
Via: Šime Vidas (Mastodon)





Source link

Previous articleRadar and laser breakthroughs serve humanitarian ends
Next articleYou can now repair your iMac or Studio Display at home