Rename HTMLInputElement::isIndeterminate to Element::shouldAppearIndeterminate
https://bugs.webkit.org/show_bug.cgi?id=113264
Reviewed by Kentaro Hara.
HTMLInputElement had indeterminate() and isIndeterminate(). It's very
confusing.
Because indeterminate is a public DOM function and isIndeterminate is
for CSS and rendering, we rename isIndetermiante to
shouldAppearIndeterminate. Also, HTMLProgressElement, which support
:indeterminate pseudo class, should follow it. We add
shouldAppearIndeterminate to Element.
No new tests. Just a refactoring.
* dom/Element.cpp:
(WebCore::Element::shouldAppearIndeterminate): Added. Returns false.
* dom/Element.h:
(Element): Declare shouldAppearIndeterminate.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::shouldAppearIndeterminate):
Renamed from isIndeterminate.
* html/HTMLInputElement.h:
(HTMLInputElement): Rename isIndeterminate to shouldAppearIndeterminate,
and overrides Element::shouldAppearIndeterminate.
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::shouldAppearIndeterminate): Added.
* html/HTMLProgressElement.h: Add shouldAppearIndeterminate.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isIndeterminate):
Use shouldAppearIndeterminate.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne): Ditto.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithControl): Ditto.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isIndeterminate): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/html/HTMLProgressElement.cpp b/Source/WebCore/html/HTMLProgressElement.cpp
index 3409a8e..53ef252 100644
--- a/Source/WebCore/html/HTMLProgressElement.cpp
+++ b/Source/WebCore/html/HTMLProgressElement.cpp
@@ -168,5 +168,10 @@
inner->appendChild(bar, ASSERT_NO_EXCEPTION);
}
+bool HTMLProgressElement::shouldAppearIndeterminate() const
+{
+ return !isDeterminate();
+}
+
} // namespace
#endif