Changeset 93295 in webkit


Ignore:
Timestamp:
Aug 18, 2011 4:05:53 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

When changing the size of a menulist from x (x>1) to 1, the first item should be selected.
https://bugs.webkit.org/show_bug.cgi?id=66282

Patch by Jing Zhao <jingzhao@chromium.org> on 2011-08-18
Reviewed by Kent Tamura.

No new tests since it only changes the behavior in Android Browser.

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::parseMappedAttribute):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r93292 r93295  
     12011-08-18  Jing Zhao  <jingzhao@chromium.org>
     2
     3        When changing the size of a menulist from x (x>1) to 1, the first item should be selected.
     4        https://bugs.webkit.org/show_bug.cgi?id=66282
     5
     6        Reviewed by Kent Tamura.
     7
     8        No new tests since it only changes the behavior in Android Browser.
     9
     10        * html/HTMLSelectElement.cpp:
     11        (WebCore::HTMLSelectElement::parseMappedAttribute):
     12
    1132011-08-18  Adam Klein  <adamk@chromium.org>
    214
  • trunk/Source/WebCore/html/HTMLSelectElement.cpp

    r93276 r93295  
    245245}
    246246
    247 void HTMLSelectElement::parseMappedAttribute(Attribute* attr)
    248 {
    249     bool oldUsesMenuList = m_data.usesMenuList();
     247void HTMLSelectElement::parseMappedAttribute(Attribute* attr)
     248{
    250249    if (attr->name() == sizeAttr) {
    251250        int oldSize = m_data.size();
     
    264263        m_data.setSize(size);
    265264        setNeedsValidityCheck();
    266         if ((oldUsesMenuList != m_data.usesMenuList() || (!oldUsesMenuList && m_data.size() != oldSize)) && attached()) {
     265        if (m_data.size() != oldSize && attached()) {
    267266            reattach();
    268267            setRecalcListItems();
Note: See TracChangeset for help on using the changeset viewer.