Closed Bug 1153513 Opened 9 years ago Closed 9 years ago

<input> element width is too wide than other browsers

Categories

(Core :: Layout: Form Controls, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1194055

People

(Reporter: kuroweb, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

Attached file 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.
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
Closed: 9 years ago
Resolution: --- → INVALID
This bug maybe this bug1194055.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: