Changeset 76567 in webkit


Ignore:
Timestamp:
Jan 24, 2011 8:38:29 PM (13 years ago)
Author:
tkent@chromium.org
Message:

2011-01-24 Kent Tamura <tkent@chromium.org>

Reviewed by Dimitri Glazkov.

[Windows] Textfield <input>s have different widths.
https://bugs.webkit.org/show_bug.cgi?id=48405

  • fast/forms/input-widths-expected.txt: Added.
  • fast/forms/input-widths.html: Added.

2011-01-24 Kent Tamura <tkent@chromium.org>

Reviewed by Dimitri Glazkov.

[Windows] Textfield <input>s have different widths.
https://bugs.webkit.org/show_bug.cgi?id=48405

  • Apply the padding override for type=text to other textfield types too.
  • Reset margin value of outer spin button, which is not used in Windows.
  • Don't add inner spin button width to the preferred text field width. Text fields should have the identical widths regardless of the existence of spin buttons.

Test: fast/forms/input-widths.html

  • css/themeWin.css: (input[type="week"]): (input[type="week"]:disabled): (input[type="search"]::-webkit-search-cancel-button): (input::-webkit-outer-spin-button):
  • rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::preferredContentWidth): Don't add inner spin button width to the preferred width.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r76566 r76567  
     12011-01-24  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        [Windows] Textfield <input>s have different widths.
     6        https://bugs.webkit.org/show_bug.cgi?id=48405
     7
     8        * fast/forms/input-widths-expected.txt: Added.
     9        * fast/forms/input-widths.html: Added.
     10
    1112011-01-24  Kent Tamura  <tkent@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r76566 r76567  
     12011-01-24  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        [Windows] Textfield <input>s have different widths.
     6        https://bugs.webkit.org/show_bug.cgi?id=48405
     7
     8        - Apply the padding override for type=text to other textfield types too.
     9        - Reset margin value of outer spin button, which is not used in Windows.
     10        - Don't add inner spin button width to the preferred text field width.
     11          Text fields should have the identical widths regardless of the
     12          existence of spin buttons.
     13
     14        Test: fast/forms/input-widths.html
     15
     16        * css/themeWin.css:
     17        (input[type="week"]):
     18        (input[type="week"]:disabled):
     19        (input[type="search"]::-webkit-search-cancel-button):
     20        (input::-webkit-outer-spin-button):
     21        * rendering/RenderTextControlSingleLine.cpp:
     22        (WebCore::RenderTextControlSingleLine::preferredContentWidth):
     23        Don't add inner spin button width to the preferred width.
     24
    1252011-01-24  Kent Tamura  <tkent@chromium.org>
    226
  • trunk/Source/WebCore/css/themeWin.css

    r63071 r76567  
    3434
    3535input:not([type]),
     36input[type="color"],
     37input[type="date"],
     38input[type="datetime"],
     39input[type="datetime-local"],
     40input[type="email"],
     41input[type="month"],
     42input[type="number"],
     43input[type="password"],
     44input[type="tel"],
    3645input[type="text"],
    37 input[type="password"] {
     46input[type="time"],
     47input[type="url"],
     48input[type="week"] {
    3849    padding:1px 0;
    3950}
     
    6071textarea:disabled,
    6172input:not([type]):disabled,
     73input[type="color"]:disabled,
     74input[type="date"]:disabled,
     75input[type="datetime"]:disabled,
     76input[type="datetime-local"]:disabled,
     77input[type="email"]:disabled,
     78input[type="month"]:disabled,
     79input[type="password"]:disabled,
     80input[type="number"]:disabled,
     81input[type="search"]:disabled,
     82input[type="tel"]:disabled,
    6283input[type="text"]:disabled,
    63 input[type="password"]:disabled,
    64 input[type="search"]:disabled {
     84input[type="time"]:disabled,
     85input[type="url"]:disabled,
     86input[type="week"]:disabled {
    6587    background-color: #EBEBE4;
    6688}
    6789
    6890input[type="search"]::-webkit-search-cancel-button {
    69    margin-right: 3px;
     91    margin-right: 3px;
    7092}
    7193
     
    7698input[type="search"]::-webkit-search-results-button {
    7799    margin: 0 3px 0 2px;
     100}
     101
     102input::-webkit-outer-spin-button {
     103    margin: 0;
    78104}
    79105
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r76442 r76567  
    561561                  cancelRenderer->paddingLeft() + cancelRenderer->paddingRight();
    562562
    563     if (RenderBox* spinRenderer = m_innerSpinButton ? m_innerSpinButton->renderBox() : 0)
    564         result += spinRenderer->minPreferredLogicalWidth();
    565 
    566563#if ENABLE(INPUT_SPEECH)
    567564    if (RenderBox* speechRenderer = m_speechButton ? m_speechButton->renderBox() : 0) {
Note: See TracChangeset for help on using the changeset viewer.