User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Build ID: 20110928134238 Steps to reproduce: Created few input text fields, setted the size attribute and font-size through CSS to 11px, then changed font-size to 12px. Updated the Firefox 6 to version 7 and then did the same and rechecked the effect. Actual results: After updating from FF6 to FF7 the input text field width is rendered differently. When changing the font-size from 11px to 12px the field width is different. Narrower when input fields have 12px font size and wider when input text fields have 11px font size. Expected results: Why fields are rendered wider when the font size is smaller? Software should not change the width of input text fields basing on font-size, because when it does it then we have a situation when size attribute becomes useless. What's the point using size attribute when browser forces user to set width through CSS. Visualisation of the problem: http://jsfiddle.net/GzcFb/2/ Check how the field width's are rendered (in FF6 and FF7) when they have different font sizes - there shouldnt be so much difference in width of input text field. As for me - Im using the size attribute mainly to set the width of the fields I know that the spec is defining that the size attribute is for limiting the visibility of characters entered by end user but... why use it when there is so much difference and webdeveloper is forced to set extra class on every single input field - when developing sites which have forms with 50+ fields and the width of fields needs to be different (few need to have 100px width, other 140px, 120px etc. etc.) then using size attribute is the best way to manage the width of fields - but now seems to be broken (difference between major browsers with setted size attribute is more than 1% as it was on FF6).
Confirmed on Firefox7.0.1 to Nightly9.0a1 Regression window(cached m-c hourly), Works: http://hg.mozilla.org/mozilla-central/rev/09aa6c7e5867 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110602 Firefox/7.0a1 ID:20110602165615 Fails: http://hg.mozilla.org/mozilla-central/rev/8a133638f5b6 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110602 Firefox/7.0a1 ID:20110602225429 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=09aa6c7e5867&tochange=8a133638f5b6 Triggered by: Bug 661471 - Create preference(s) to allow specific font families to be forced to use GDI Classic rendering It works as expected if I set gfx.font_rendering.cleartype_params.force_gdi_classic_max_size =0.
Status: UNCONFIRMED → NEW
Component: General → General
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → general
I assume that we're setting the size correctly, it's just that as the font size crosses 12px we switch from classic to DWrite font rendering, which gives you different metrics. > Software should not change the width of input text fields basing on font-size, Sure it should, because "size" is multiplied by the character width, which depends on the font-size.
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #3) > I assume that we're setting the size correctly, it's just that as the font > size crosses 12px we switch from classic to DWrite font rendering, which > gives you different metrics. There is something weird when the font-size is 11px: seems to force wider text boxes then 10px, 12px or 13px. It is indeed metrics problem.
11px is wider than 10px because the font-size is bigger. It's probably narrower than 12px or 13px because fonts >= 12px are rendered using DirectWrite instead of GDI Classic (on your system; seems like you're zoomed in a little bit), which renders slightly narrower.
Im 100% not zooming anything.
For me this is a bug of new version 7, because, what nobody explain is: Why just this version 7 changed the format of showing input texts...? And why, others browsers this not happend...
(In reply to Walter Santos from comment #8) > Why just this version 7 changed the format of showing input texts...? Because bug 661471 landed there. It is in the "Blocks:" field here on top. It's not about input text, it's about any text. More info in that bug. (Seems Opera behaves similar)
(In reply to j.j. from comment #9) > (In reply to Walter Santos from comment #8) > > Why just this version 7 changed the format of showing input texts...? > Because bug 661471 landed there. It is in the "Blocks:" field here on top. > It's not about input text, it's about any text. More info in that bug. > > (Seems Opera behaves similar) Thanks for your reply. Do you have any plans to fix this ...?
You need to log in before you can comment on or make changes to this bug.