Changeset 139089 in webkit


Ignore:
Timestamp:
Jan 8, 2013 11:40:40 AM (11 years ago)
Author:
ojan@chromium.org
Message:

text controls are sized too small when a percentage height is set
https://bugs.webkit.org/show_bug.cgi?id=106277

Reviewed by Tony Chang.

Source/WebCore:

This makes our behavior match Firefox 17, IE 9 and Opera 12.
The current logic came from http://trac.webkit.org/changeset/13723,
which itself was copy-pasted from RenderReplaced and no longer has this clause..

Test: fast/forms/percent-height-auto-width-form-controls.html

  • rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::computePreferredLogicalWidths):

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::computePreferredLogicalWidths):

  • rendering/RenderSlider.cpp:

(WebCore::RenderSlider::computePreferredLogicalWidths):

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::computePreferredLogicalWidths):

LayoutTests:

  • fast/forms/percent-height-auto-width-form-controls-expected.txt: Added.
  • fast/forms/percent-height-auto-width-form-controls.html: Added.
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r139085 r139089  
     12013-01-08  Ojan Vafai  <ojan@chromium.org>
     2
     3        text controls are sized too small when a percentage height is set
     4        https://bugs.webkit.org/show_bug.cgi?id=106277
     5
     6        Reviewed by Tony Chang.
     7
     8        * fast/forms/percent-height-auto-width-form-controls-expected.txt: Added.
     9        * fast/forms/percent-height-auto-width-form-controls.html: Added.
     10
    1112013-01-08  Mike West  <mkwst@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r139087 r139089  
     12013-01-08  Ojan Vafai  <ojan@chromium.org>
     2
     3        text controls are sized too small when a percentage height is set
     4        https://bugs.webkit.org/show_bug.cgi?id=106277
     5
     6        Reviewed by Tony Chang.
     7
     8        This makes our behavior match Firefox 17, IE 9 and Opera 12.
     9        The current logic came from http://trac.webkit.org/changeset/13723,
     10        which itself was copy-pasted from RenderReplaced and no longer has this clause..
     11
     12        Test: fast/forms/percent-height-auto-width-form-controls.html
     13
     14        * rendering/RenderFileUploadControl.cpp:
     15        (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
     16        * rendering/RenderListBox.cpp:
     17        (WebCore::RenderListBox::computePreferredLogicalWidths):
     18        * rendering/RenderMenuList.cpp:
     19        (WebCore::RenderMenuList::computePreferredLogicalWidths):
     20        * rendering/RenderSlider.cpp:
     21        (WebCore::RenderSlider::computePreferredLogicalWidths):
     22        * rendering/RenderTextControl.cpp:
     23        (WebCore::RenderTextControl::computePreferredLogicalWidths):
     24
    1252013-01-08  Peter Beverloo  <peter@chromium.org>
    226
  • trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp

    r136915 r139089  
    196196        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->minWidth().value()));
    197197        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->minWidth().value()));
    198     } else if (style->width().isPercent() || (style->width().isAuto() && style->height().isPercent()))
     198    } else if (style->width().isPercent())
    199199        m_minPreferredLogicalWidth = 0;
    200200    else
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r139044 r139089  
    222222        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    223223        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    224     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
     224    } else if (style()->width().isPercent())
    225225        m_minPreferredLogicalWidth = 0;
    226226    else
  • trunk/Source/WebCore/rendering/RenderMenuList.cpp

    r137847 r139089  
    286286        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    287287        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    288     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
     288    } else if (style()->width().isPercent())
    289289        m_minPreferredLogicalWidth = 0;
    290290    else
  • trunk/Source/WebCore/rendering/RenderSlider.cpp

    r135913 r139089  
    8484        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    8585        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    86     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
     86    } else if (style()->width().isPercent())
    8787        m_minPreferredLogicalWidth = 0;
    8888    else
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r130686 r139089  
    275275        m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    276276        m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
    277     } else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
     277    } else if (style()->width().isPercent())
    278278        m_minPreferredLogicalWidth = 0;
    279279    else
Note: See TracChangeset for help on using the changeset viewer.