Bug 48405

Summary: [Windows] Textfields <input>s have different widths
Product: WebKit Reporter: Kent Tamura <tkent>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, aroben, bweinstein, eric, ojan, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
URL: http://crbug.com/60348
Attachments:
Description Flags
Test case
none
Patch
none
Patch 2
none
Patch 3 none

Description Kent Tamura 2010-10-27 02:57:58 PDT
Created attachment 71999 [details]
Test case

Windows-only (including Chromium-win).

http://crbug.com/60348 shows three different issues.

- type=search appearance is almost same as type=text on Windows, but its width is shorter.
  Probably this is intentional.  An older revision of RenderThemeWin.cpp had the following comment:
    // Override padding size to match AppKit text positioning.
# http://trac.webkit.org/changeset/42020/trunk/WebCore/rendering/RenderThemeWin.cpp

- type=color/email/tel/url is shorter because they don't have "padding:1px 0" in themeWin.css.

- Input types with spin-button is shorter.  The root cause is unknown yet.
Comment 1 Tony Chang 2010-10-27 10:05:54 PDT
I think they're supposed to match the size of inputs in IE for web compatibility.  Ojan knows the details.
Comment 2 Kent Tamura 2010-10-28 02:40:26 PDT
(In reply to comment #1)
> I think they're supposed to match the size of inputs in IE for web compatibility.  Ojan knows the details.

It's the reason why type=text on WebKit/Windows is different from WebKit/Mac, isn't it?
Anyway, non-search text field types should have same widths with type=text.
Comment 3 Kent Tamura 2010-10-28 02:41:05 PDT
Created attachment 72163 [details]
Patch
Comment 4 Kent Tamura 2010-10-28 02:41:58 PDT
(In reply to comment #3)
> Created an attachment (id=72163) [details]
> Patch

This patch will break some rendering tests.  I'll take care of them when I commit the patch.
Comment 5 Kent Tamura 2010-10-28 04:13:00 PDT
(In reply to comment #3)
> Created an attachment (id=72163) [details]
> Patch

It won't change type=search width.
Comment 6 Brian Weinstein 2010-11-22 10:47:15 PST
Comment on attachment 72163 [details]
Patch

Which tests is this covered by? Will tests need to be rebaselined? Because if they are passing now, won't this change break them?
Comment 7 Brian Weinstein 2010-11-22 10:47:50 PST
(In reply to comment #6)
> (From update of attachment 72163 [details])
> Which tests is this covered by? Will tests need to be rebaselined? Because if they are passing now, won't this change break them?

Oh, saw your comment above, sorry for the noise.
Comment 8 Kent Tamura 2010-11-24 23:13:19 PST
Probably, only fast/forms/input-appearance-spinbutton-disabled-readonly.html will be affected.
Comment 9 Adam Roben (:aroben) 2010-11-29 06:40:49 PST
(In reply to comment #8)
> Probably, only fast/forms/input-appearance-spinbutton-disabled-readonly.html will be affected.

If that is the case, it sounds like we need more new tests that check the width of the other input types.
Comment 10 Eric Seidel (no email) 2010-12-12 02:38:41 PST
Yes, this is very much an Ojan question.
Comment 11 Kent Tamura 2010-12-13 15:55:22 PST
Comment on attachment 72163 [details]
Patch

Withdrawn.
I'll add new test.
Comment 12 Kent Tamura 2010-12-13 16:45:01 PST
Created attachment 76467 [details]
Patch 2
Comment 13 Kent Tamura 2011-01-24 01:34:16 PST
Created attachment 79901 [details]
Patch 3

rebased
Comment 14 Dimitri Glazkov (Google) 2011-01-24 07:05:59 PST
Comment on attachment 79901 [details]
Patch 3

ok.
Comment 15 Kent Tamura 2011-01-24 20:38:39 PST
Comment on attachment 79901 [details]
Patch 3

Clearing flags on attachment: 79901

Committed r76567: <http://trac.webkit.org/changeset/76567>
Comment 16 Kent Tamura 2011-01-24 20:38:48 PST
All reviewed patches have been landed.  Closing bug.
Comment 17 WebKit Review Bot 2011-01-24 21:47:18 PST
http://trac.webkit.org/changeset/76567 might have broken Leopard Intel Release (Tests)