Title: [91049] trunk/Source/WebCore
Revision
91049
Author
[email protected]
Date
2011-07-14 22:37:26 -0700 (Thu, 14 Jul 2011)

Log 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 <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (91048 => 91049)


--- trunk/Source/WebCore/ChangeLog	2011-07-15 04:36:29 UTC (rev 91048)
+++ trunk/Source/WebCore/ChangeLog	2011-07-15 05:37:26 UTC (rev 91049)
@@ -1,3 +1,25 @@
+2011-07-14  SravanKumar S  <[email protected]>
+
+        Replaced isChecked() with shouldAppearChecked() in HTMLInputElement.cpp along with all the corresponding function calls.
+        https://bugs.webkit.org/show_bug.cgi?id=54476
+
+        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):
+
 2011-07-14  Kenichi Ishibashi  <[email protected]>
 
         <input form="x"> should not associate the input with any forms when there is no  form with id="x"

Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (91048 => 91049)


--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2011-07-15 04:36:29 UTC (rev 91048)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2011-07-15 05:37:26 UTC (rev 91049)
@@ -619,7 +619,7 @@
     // First test for native checkedness semantics
     HTMLInputElement* inputElement = m_renderer->node()->toInputElement();
     if (inputElement)
-        return inputElement->isChecked();
+        return inputElement->shouldAppearChecked();
 
     // Else, if this is an ARIA checkbox or radio, respect the aria-checked attribute
     AccessibilityRole ariaRole = ariaRoleAttribute();

Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (91048 => 91049)


--- trunk/Source/WebCore/css/CSSStyleSelector.cpp	2011-07-15 04:36:29 UTC (rev 91048)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp	2011-07-15 05:37:26 UTC (rev 91049)
@@ -1046,7 +1046,7 @@
     
     if (thisInputElement->isAutofilled() != otherInputElement->isAutofilled())
         return false;
-    if (thisInputElement->isChecked() != otherInputElement->isChecked())
+    if (thisInputElement->shouldAppearChecked() != otherInputElement->shouldAppearChecked())
         return false;
     if (thisInputElement->isIndeterminate() != otherInputElement->isIndeterminate())
         return false;
@@ -2919,7 +2919,7 @@
                 // you can't be both checked and indeterminate.  We will behave like WinIE behind the scenes and just
                 // obey the CSS spec here in the test for matching the pseudo.
                 HTMLInputElement* inputElement = e->toInputElement();
-                if (inputElement && inputElement->isChecked() && !inputElement->isIndeterminate())
+                if (inputElement && inputElement->shouldAppearChecked() && !inputElement->isIndeterminate())
                     return true;
                 break;
             }

Modified: trunk/Source/WebCore/dom/CheckedRadioButtons.cpp (91048 => 91049)


--- trunk/Source/WebCore/dom/CheckedRadioButtons.cpp	2011-07-15 04:36:29 UTC (rev 91048)
+++ trunk/Source/WebCore/dom/CheckedRadioButtons.cpp	2011-07-15 05:37:26 UTC (rev 91049)
@@ -79,7 +79,7 @@
     
     HTMLInputElement* inputElement = element->toInputElement();
     ASSERT_UNUSED(inputElement, inputElement);
-    ASSERT(inputElement->isChecked());
+    ASSERT(inputElement->shouldAppearChecked());
     ASSERT(element->isRadioButton());
 
     m_nameToCheckedRadioButtonMap->remove(it);

Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (91048 => 91049)


--- trunk/Source/WebCore/html/HTMLInputElement.cpp	2011-07-15 04:36:29 UTC (rev 91048)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp	2011-07-15 05:37:26 UTC (rev 91049)
@@ -1853,7 +1853,7 @@
     return m_inputType->isEnumeratable();
 }
 
-bool HTMLInputElement::isChecked() const
+bool HTMLInputElement::shouldAppearChecked() const
 {
     return checked() && m_inputType->isCheckable();
 }

Modified: trunk/Source/WebCore/html/HTMLInputElement.h (91048 => 91049)


--- trunk/Source/WebCore/html/HTMLInputElement.h	2011-07-15 04:36:29 UTC (rev 91048)
+++ trunk/Source/WebCore/html/HTMLInputElement.h	2011-07-15 05:37:26 UTC (rev 91049)
@@ -126,9 +126,8 @@
     // 'indeterminate' is a state independent of the checked state that causes the control to draw in a way that hides the actual state.
     bool indeterminate() const { return m_isIndeterminate; }
     void setIndeterminate(bool);
-
-    // isChecked is used by the rendering tree/CSS while checked() is used by JS to determine checked state
-    virtual bool isChecked() const;
+    // shouldAppearChecked is used by the rendering tree/CSS while checked() is used by JS to determine checked state
+    bool shouldAppearChecked() const;
     virtual bool isIndeterminate() const { return indeterminate(); }
 
     int size() const;

Modified: trunk/Source/WebCore/rendering/RenderTheme.cpp (91048 => 91049)


--- trunk/Source/WebCore/rendering/RenderTheme.cpp	2011-07-15 04:36:29 UTC (rev 91048)
+++ trunk/Source/WebCore/rendering/RenderTheme.cpp	2011-07-15 05:37:26 UTC (rev 91049)
@@ -745,7 +745,7 @@
     if (!inputElement)
         return false;
 
-    return inputElement->isChecked();
+    return inputElement->shouldAppearChecked();
 }
 
 bool RenderTheme::isIndeterminate(const RenderObject* o) const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to