Refactoring: Replace Element::disabled and isEnabledFormControl with isDisabledFormCo...
authorfalken@chromium.org <falken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Mar 2013 18:38:38 +0000 (18:38 +0000)
committerfalken@chromium.org <falken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Mar 2013 18:38:38 +0000 (18:38 +0000)
commite4180f3f91f2c367dcd58d58baad76ae6d9b61c7
tree9e8f91c14588548bee5f0e9a88e409a0eaec3da0
parentd6be9a7ddbae13db1d44410f73810ba82e95d1fb
Refactoring: Replace Element::disabled and isEnabledFormControl with isDisabledFormControl
https://bugs.webkit.org/show_bug.cgi?id=113273

Reviewed by Kent Tamura.

Element::disabled is about form controls and Element::isEnabledFormControl
is redundant with it, so replace them with a single function
Element::isDisabledFormControl.

Source/WebCore:

No new tests, there should be no behavior change.

* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute):
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::canSetFocusAttribute):
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::isEnabled):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isEnabled):
(WebCore::AccessibilityNodeObject::actionElement):
(WebCore::AccessibilityNodeObject::canSetFocusAttribute):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithControl):
* dom/Element.cpp:
(WebCore::Element::isDisabledFormControl):
* dom/Element.h:
(Element):
(WebCore::isDisabledFormControl): Add helper function for convenience.
(WebCore):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick):
* dom/GestureEvent.cpp:
(WebCore::GestureEventDispatchMediator::dispatchEvent):
* dom/MouseEvent.cpp:
(WebCore::MouseEventDispatchMediator::dispatchEvent):
* dom/Node.cpp:
(WebCore::Node::handleLocalEvents):
(WebCore::Node::willRespondToMouseMoveEvents):
(WebCore::Node::willRespondToMouseClickEvents):
(WebCore::Node::willRespondToTouchEvents):
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerDisabled):
* html/DOMFormData.cpp:
(WebCore::DOMFormData::DOMFormData):
* html/FileInputType.cpp:
(WebCore::FileInputType::handleDOMActivateEvent):
(WebCore::FileInputType::disabledAttributeChanged):
* html/HTMLButtonElement.cpp:
(WebCore::HTMLButtonElement::defaultEventHandler):
(WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
(WebCore::HTMLButtonElement::isSuccessfulSubmitButton):
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::updateAncestorDisabledState):
(WebCore::HTMLFormControlElement::isDisabledFormControl):
(WebCore::HTMLFormControlElement::supportsFocus):
* html/HTMLFormControlElement.h:
(HTMLFormControlElement):
(WebCore::HTMLFormControlElement::isDisabledOrReadOnly):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isSuccessfulSubmitButton):
(WebCore::HTMLInputElement::willRespondToMouseClickEvents):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::isDisabledFormControl):
* html/HTMLOptGroupElement.h:
(HTMLOptGroupElement):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::isDisabledFormControl):
* html/HTMLOptionElement.h:
(HTMLOptionElement):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::willRespondToMouseClickEvents):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::nextValidIndex):
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::recalcListItems):
(WebCore::HTMLSelectElement::appendFormData):
(WebCore::HTMLSelectElement::updateSelectedState):
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
(WebCore::HTMLSelectElement::defaultEventHandler):
(WebCore::HTMLSelectElement::optionAtIndex):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::handleDOMActivateEvent):
* html/ResetInputType.cpp:
(WebCore::ResetInputType::handleDOMActivateEvent):
* html/SubmitInputType.cpp:
(WebCore::SubmitInputType::handleDOMActivateEvent):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::isDisabledFormControl):
(WebCore::SliderThumbElement::defaultEventHandler):
(WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
(WebCore::SliderThumbElement::willRespondToMouseClickEvents):
* html/shadow/SliderThumbElement.h:
(SliderThumbElement):
* html/shadow/SpinButtonElement.h:
* html/shadow/TextFieldDecorationElement.cpp:
(WebCore::TextFieldDecorationElement::updateImage):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* page/DragController.cpp:
(WebCore::DragController::tryDocumentDrag):
(WebCore::DragController::concludeEditDrag):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::addFocusRingRects):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::itemIsEnabled):
* rendering/RenderTextControl.cpp:
(WebCore::updateUserModifyProperty):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isEnabled):
* rendering/RenderThemeMac.mm:
(WebCore::getMediaUIPartStateFlags):
* rendering/RenderThemeMacShared.mm:
(WebCore::RenderThemeMacShared::adjustMenuListStyle):
(WebCore::RenderThemeMacShared::paintSearchFieldCancelButton):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::adjustMenuListStyle):

Source/WebKit/blackberry:

* WebCoreSupport/CredentialTransformData.cpp:
(WebCore::CredentialTransformData::findPasswordFormFields):
* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::isTextBasedContentEditableElement):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::openSelectPopup):

Source/WebKit/chromium:

* src/WebFormControlElement.cpp:
(WebKit::WebFormControlElement::isEnabled):
* src/WebOptionElement.cpp:
(WebKit::WebOptionElement::isEnabled):
* src/WebPasswordFormUtils.cpp:
(WebKit::findPasswordFormFields):
* src/WebSearchableFormData.cpp:
(HTMLNames::findSuitableSearchInputElement):
(HTMLNames::buildSearchString):

Source/WebKit/win:

* DOMHTMLClasses.cpp:
(DOMHTMLInputElement::disabled):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
55 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityListBox.cpp
Source/WebCore/accessibility/AccessibilityListBoxOption.cpp
Source/WebCore/accessibility/AccessibilityMenuList.cpp
Source/WebCore/accessibility/AccessibilityMenuListOption.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/dom/GestureEvent.cpp
Source/WebCore/dom/MouseEvent.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp
Source/WebCore/html/DOMFormData.cpp
Source/WebCore/html/FileInputType.cpp
Source/WebCore/html/HTMLButtonElement.cpp
Source/WebCore/html/HTMLCollection.cpp
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormControlElement.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLOptGroupElement.cpp
Source/WebCore/html/HTMLOptGroupElement.h
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/HTMLOptionElement.h
Source/WebCore/html/HTMLPlugInElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/ImageInputType.cpp
Source/WebCore/html/ResetInputType.cpp
Source/WebCore/html/SubmitInputType.cpp
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/html/shadow/SliderThumbElement.h
Source/WebCore/html/shadow/SpinButtonElement.h
Source/WebCore/html/shadow/TextFieldDecorationElement.cpp
Source/WebCore/loader/FormSubmission.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/RenderThemeMacShared.mm
Source/WebCore/rendering/RenderThemeSafari.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp
Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebFormControlElement.cpp
Source/WebKit/chromium/src/WebOptionElement.cpp
Source/WebKit/chromium/src/WebPasswordFormUtils.cpp
Source/WebKit/chromium/src/WebSearchableFormData.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/DOMHTMLClasses.cpp