Changeset 55640 in webkit


Ignore:
Timestamp:
Mar 7, 2010 5:53:33 PM (14 years ago)
Author:
tkent@chromium.org
Message:

2010-03-07 Kent Tamura <tkent@chromium.org>

Reviewed by Eric Seidel.

Fix a bug that validity.valueMissing for a radio button with required
in a form element always returns true.
https://bugs.webkit.org/show_bug.cgi?id=35472

Add tests for radio buttons in a form element, and merge an existing
radio button test to ValidityState-valueMissing-radio.html.

  • fast/forms/ValidityState-valueMissing-007-expected.txt: Removed.
  • fast/forms/ValidityState-valueMissing-007.html: Removed.
  • fast/forms/ValidityState-valueMissing-radio-expected.txt: Added.
  • fast/forms/ValidityState-valueMissing-radio.html: Added.
  • fast/forms/script-tests/ValidityState-valueMissing-radio.js: Added.

2010-03-07 Kent Tamura <tkent@chromium.org>

Reviewed by Eric Seidel.

Fix a bug that validity.valueMissing for a radio button with required
in a form element always returns true.
https://bugs.webkit.org/show_bug.cgi?id=35472

Test: fast/forms/ValidityState-valueMissing-radio.html

  • html/HTMLInputElement.cpp: (WebCore::checkedRadioButtons): Move the location to be used by valueMissing(). (WebCore::HTMLInputElement::valueMissing): Use checkedRadioButtons() instead of document()->checkedRadioButtons().
Location:
trunk
Files:
3 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r55637 r55640  
     12010-03-07  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Fix a bug that validity.valueMissing for a radio button with required
     6        in a form element always returns true.
     7        https://bugs.webkit.org/show_bug.cgi?id=35472
     8
     9        Add tests for radio buttons in a form element, and merge an existing
     10        radio button test to ValidityState-valueMissing-radio.html.
     11
     12        * fast/forms/ValidityState-valueMissing-007-expected.txt: Removed.
     13        * fast/forms/ValidityState-valueMissing-007.html: Removed.
     14        * fast/forms/ValidityState-valueMissing-radio-expected.txt: Added.
     15        * fast/forms/ValidityState-valueMissing-radio.html: Added.
     16        * fast/forms/script-tests/ValidityState-valueMissing-radio.js: Added.
     17
    1182010-03-07  Sam Weinig  <sam@webkit.org>
    219
  • trunk/WebCore/ChangeLog

    r55639 r55640  
     12010-03-07  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Fix a bug that validity.valueMissing for a radio button with required
     6        in a form element always returns true.
     7        https://bugs.webkit.org/show_bug.cgi?id=35472
     8
     9        Test: fast/forms/ValidityState-valueMissing-radio.html
     10
     11        * html/HTMLInputElement.cpp:
     12        (WebCore::checkedRadioButtons): Move the location to be used by valueMissing().
     13        (WebCore::HTMLInputElement::valueMissing):
     14          Use checkedRadioButtons() instead of document()->checkedRadioButtons().
     15
    1162010-03-07  Mark Rowe  <mrowe@apple.com>
    217
  • trunk/WebCore/html/HTMLInputElement.cpp

    r54755 r55640  
    164164}
    165165
     166static inline CheckedRadioButtons& checkedRadioButtons(const HTMLInputElement* element)
     167{
     168    if (HTMLFormElement* form = element->form())
     169        return form->checkedRadioButtons();
     170    return element->document()->checkedRadioButtons();
     171}
     172
    166173bool HTMLInputElement::valueMissing() const
    167174{
     
    188195            return !checked();
    189196        case RADIO:
    190             return !document()->checkedRadioButtons().checkedButtonForGroup(name());
     197            return !checkedRadioButtons(this).checkedButtonForGroup(name());
    191198        case COLOR:
    192199            return false;
     
    677684{
    678685    applyStep(-n, ec);
    679 }
    680 
    681 static inline CheckedRadioButtons& checkedRadioButtons(const HTMLInputElement *element)
    682 {
    683     if (HTMLFormElement* form = element->form())
    684         return form->checkedRadioButtons();
    685    
    686     return element->document()->checkedRadioButtons();
    687686}
    688687
Note: See TracChangeset for help on using the changeset viewer.