Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:126.96.36.199) Gecko/20110319 Firefox/3.6.16 Mozilla/5.0 (Windows NT 6.1; rv:6.0a1) Gecko/20110428 Firefox/6.0a1 Able to reproduce.
Before changing status to NEW, please check: * Vesion (is it a Problem in Fx4 (Fx5) too?) * Product, Component (this is Core, Layout, I'd say) * NEW bugs in Core-Layout needs a testcase (attach the code in comment 0 as HTML attachment)
> * Version (is it a Problem in Fx4 (Fx5) too?) sorry, of course you dis this.
Created attachment 529156 [details] Testcase WFM, using Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0a2) Gecko/20110429 Firefox/5.0a2
Also WFM with Firefox 4.0. Alert says "248, 248"
> Also WFM with Firefox 4.0. Alert says "248, 248" Expected is "247, 248" (what WebKit and Opera show) Fx and IE alert "248, 248"
j.j., Webkit shows 247, 248 because the real widths are 247, 248 on the screen in Chrome/Safari. The real widths on Firefox are 248, 247. (i.e. The second <TD> is shorter.) Their behaviors are different. We should count on Firefox's behavior to determine the expected values, not other browsers' spec. Firefox 4 has the same issue like José Jeria mentioned.
Bug 65548 related?
This is invalid. The layout widths for those tables are 247.5 pixels each. When they are rendered, the edges are antialiased, so they actually share rendered pixels with the cellspacing and the like. Depending on how you were examining your screen pixels, this may have led you to conclude that they have different widths on screen. Of course if you use a DOM API that rounds widths to integers, then you ask for "247.5" rounded to an integer which is 248. This is a fundamental limitation of the offsetWidth API: it can't actually properly represent layout information unless you round off all your layout calculations to integer pixels (which is what Opera and WebKit do). If you want to ask for the actual widths of things, use getBoundingClientRect(). Doing this: alert(document.getElementById("td1").getBoundingClientRect().width + ", " + document.getElementById("td2").getBoundingClientRect().width) shows "247.5, 247.5" for me.