<input> element width is too wide than other browsers

RESOLVED DUPLICATE of bug 1194055

Status

()

Core
Layout: Form Controls
RESOLVED DUPLICATE of bug 1194055
3 years ago
3 years ago

People

(Reporter: PRiMENON, Unassigned)

Tracking

({testcase})

Trunk
x86_64
Windows 7
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8591200 [details]
testcase.html

Build identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0

Steps to reproduce:
1. create clean profile.
2. open attached file.

Actual results:
<input type="text" size="n"> element width is too wide(a double portion) than other browsers.

Expected results:
It displayed at the same size as the other browsers.

Windows 7 is bad.
Windows 8.1 is good.
According to the information of forums( http://forums.mozillazine.jp/viewtopic.php?p=54833#p54833 ), even Windows Vista is bad.

Internet Explorer 11, Google Chrome 44.0.2364.0 is fine.

Updated

3 years ago
Component: General → Layout: Form Controls
Keywords: testcase
Product: Firefox → Core
Here's what the spec says (see <https://html.spec.whatwg.org/multipage/rendering.html#the-input-element-as-a-text-entry-widget>):

  The converting a character width to pixels algorithm returns (size-1)×avg + max, where
  size is the character width to convert, avg is the average character width of the primary
  font for the element for which the algorithm is being run, in pixels, and max is the
  maximum character width of that same font, also in pixels. (The element's
  'letter-spacing' property does not affect the result.)

Not in particular, that this algorithm guarantees that "size" average-width chars will be visible in the input. We do something pretty close to this, as far as I can tell.  Chrome is certainly not doing anything of the sort because I can't actually fit 100 average-width chars in the <input width="100"> in your testcase (in fact, it only fits 75 as far as I can tell, in the font it's using over here).
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
(Reporter)

Comment 2

3 years ago
This bug maybe this bug1194055.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---

Updated

3 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1194055
You need to log in before you can comment on or make changes to this bug.