Changeset 91049 in webkit


Ignore:
Timestamp:
Jul 14, 2011 10:37:26 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Replaced isChecked() with shouldAppearChecked() in HTMLInputElement.cpp along with all the corresponding function calls.
https://bugs.webkit.org/show_bug.cgi?id=54476

Patch by SravanKumar S <sravan.ken@gmail.com> on 2011-07-14
Reviewed by Darin Adler.

No new tests, since existing fast/dom/HTMLInputElement/checked-pseudo-selector.html verifies the patch.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isChecked):

  • css/CSSStyleSelector.cpp:

(WebCore::CSSStyleSelector::canShareStyleWithControl):
(WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):

  • dom/CheckedRadioButtons.cpp:

(WebCore::CheckedRadioButtons::removeButton):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::shouldAppearChecked):

  • html/HTMLInputElement.h: Removed virtual declaration from shouldAppearChecked().
  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::isChecked):

Location:
trunk/Source/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91048 r91049  
     12011-07-14  SravanKumar S  <sravan.ken@gmail.com>
     2
     3        Replaced isChecked() with shouldAppearChecked() in HTMLInputElement.cpp along with all the corresponding function calls.
     4        https://bugs.webkit.org/show_bug.cgi?id=54476
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests, since existing fast/dom/HTMLInputElement/checked-pseudo-selector.html verifies the patch.
     9
     10        * accessibility/AccessibilityRenderObject.cpp:
     11        (WebCore::AccessibilityRenderObject::isChecked):
     12        * css/CSSStyleSelector.cpp:
     13        (WebCore::CSSStyleSelector::canShareStyleWithControl):
     14        (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
     15        * dom/CheckedRadioButtons.cpp:
     16        (WebCore::CheckedRadioButtons::removeButton):
     17        * html/HTMLInputElement.cpp:
     18        (WebCore::HTMLInputElement::shouldAppearChecked):
     19        * html/HTMLInputElement.h: Removed virtual declaration from shouldAppearChecked().
     20        * rendering/RenderTheme.cpp:
     21        (WebCore::RenderTheme::isChecked):
     22
    1232011-07-14  Kenichi Ishibashi  <bashi@chromium.org>
    224
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r90885 r91049  
    620620    HTMLInputElement* inputElement = m_renderer->node()->toInputElement();
    621621    if (inputElement)
    622         return inputElement->isChecked();
     622        return inputElement->shouldAppearChecked();
    623623
    624624    // Else, if this is an ARIA checkbox or radio, respect the aria-checked attribute
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r91038 r91049  
    10471047    if (thisInputElement->isAutofilled() != otherInputElement->isAutofilled())
    10481048        return false;
    1049     if (thisInputElement->isChecked() != otherInputElement->isChecked())
     1049    if (thisInputElement->shouldAppearChecked() != otherInputElement->shouldAppearChecked())
    10501050        return false;
    10511051    if (thisInputElement->isIndeterminate() != otherInputElement->isIndeterminate())
     
    29202920                // obey the CSS spec here in the test for matching the pseudo.
    29212921                HTMLInputElement* inputElement = e->toInputElement();
    2922                 if (inputElement && inputElement->isChecked() && !inputElement->isIndeterminate())
     2922                if (inputElement && inputElement->shouldAppearChecked() && !inputElement->isIndeterminate())
    29232923                    return true;
    29242924                break;
  • trunk/Source/WebCore/dom/CheckedRadioButtons.cpp

    r85998 r91049  
    8080    HTMLInputElement* inputElement = element->toInputElement();
    8181    ASSERT_UNUSED(inputElement, inputElement);
    82     ASSERT(inputElement->isChecked());
     82    ASSERT(inputElement->shouldAppearChecked());
    8383    ASSERT(element->isRadioButton());
    8484
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r91047 r91049  
    18541854}
    18551855
    1856 bool HTMLInputElement::isChecked() const
     1856bool HTMLInputElement::shouldAppearChecked() const
    18571857{
    18581858    return checked() && m_inputType->isCheckable();
  • trunk/Source/WebCore/html/HTMLInputElement.h

    r91014 r91049  
    127127    bool indeterminate() const { return m_isIndeterminate; }
    128128    void setIndeterminate(bool);
    129 
    130     // isChecked is used by the rendering tree/CSS while checked() is used by JS to determine checked state
    131     virtual bool isChecked() const;
     129    // shouldAppearChecked is used by the rendering tree/CSS while checked() is used by JS to determine checked state
     130    bool shouldAppearChecked() const;
    132131    virtual bool isIndeterminate() const { return indeterminate(); }
    133132
  • trunk/Source/WebCore/rendering/RenderTheme.cpp

    r89733 r91049  
    746746        return false;
    747747
    748     return inputElement->isChecked();
     748    return inputElement->shouldAppearChecked();
    749749}
    750750
Note: See TracChangeset for help on using the changeset viewer.