Use is<HTML*Element>() instead of isHTML*Element() - Part 1
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Sep 2014 21:25:22 +0000 (21:25 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Sep 2014 21:25:22 +0000 (21:25 +0000)
commit5d72c0f976af7b1a4a3e64bbd1cbfbfd62def654
tree64517157573c6b75cb5e3bfc139a442007aa6574
parent182f2cf03baeb743f424bbf8742bbfbdd8fe1ce2
Use is<HTML*Element>() instead of isHTML*Element() - Part 1
https://bugs.webkit.org/show_bug.cgi?id=137068

Reviewed by Ryosuke Niwa.

Start using is<HTML*Element>() instead of isHTML*Element().
Remaining usages will be updated in a follow-up patch to
reduce the size of the change.

Source/WebCore:

No new tests, no behavior change.

* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::isSelected):
(WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
(WebCore::AccessibilityListBoxOption::stringValue):
(WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaTimeline::valueDescription):
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::setElement):
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::isNativeTextControl):
(WebCore::AccessibilityNodeObject::isNativeImage):
(WebCore::AccessibilityNodeObject::isInputImage):
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::valueForRange):
(WebCore::AccessibilityNodeObject::maxValueForRange):
(WebCore::AccessibilityNodeObject::minValueForRange):
(WebCore::isNodeActionElement):
(WebCore::AccessibilityNodeObject::titleElementText):
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):
(WebCore::AccessibilityNodeObject::colorValue):
(WebCore::accessibleNameForNode):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isFileUploadButton):
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
(WebCore::AccessibilityRenderObject::setValue):
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::notifyChildrenSelectionChange):
* css/SelectorCheckerTestFunctions.h:
(WebCore::isDisabled):
(WebCore::isEnabled):
(WebCore::isChecked):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::isInPasswordField):
* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_processElement):
* editing/gtk/EditorGtk.cpp:
(WebCore::elementURL):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendText):
(WebCore::isPlainTextMarkup):
(WebCore::collectElementsToRemoveFromFragment):
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getTextFieldValues):
(WebCore::HTMLFormElement::formElementIndex):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):
(WebCore::HTMLImageLoader::notifyFinished):
* html/HTMLNameCollection.cpp:
(WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
(WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::elementMatches):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::recalcSelectOptions):
(WebCore::HTMLOptGroupElement::ownerSelectElement):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::index):
(WebCore::HTMLOptionElement::ownerSelectElement):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::add):
(WebCore::HTMLSelectElement::value):
(WebCore::HTMLSelectElement::setValue):
(WebCore::HTMLSelectElement::childShouldCreateRenderer):
(WebCore::HTMLSelectElement::setLength):
(WebCore::HTMLSelectElement::nextValidIndex):
(WebCore::HTMLSelectElement::saveLastSelection):
(WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::listBoxOnChange):
(WebCore::HTMLSelectElement::recalcListItems):
(WebCore::HTMLSelectElement::selectedIndex):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::optionToListIndex):
(WebCore::HTMLSelectElement::listToOptionIndex):
(WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
(WebCore::HTMLSelectElement::saveFormControlState):
(WebCore::HTMLSelectElement::searchOptionsForValue):
(WebCore::HTMLSelectElement::restoreFormControlState):
(WebCore::HTMLSelectElement::appendFormData):
(WebCore::HTMLSelectElement::reset):
(WebCore::HTMLSelectElement::updateSelectedState):
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
(WebCore::HTMLSelectElement::lastSelectedListIndex):
(WebCore::HTMLSelectElement::optionAtIndex):
(WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
(WebCore::HTMLSelectElement::length):
* html/HTMLTagNames.in:
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::hasImpliedEndTag):
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLNames::isSelectScopeMarker):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processStartTag):
(WebCore::HTMLTreeBuilder::processEndTag):
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::mediaControlElementType):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::handleFallbackContent):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestObject):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* page/Chrome.cpp:
(WebCore::Chrome::setToolTip):
* page/EventHandler.cpp:
(WebCore::isSubmitImage):
(WebCore::EventHandler::handleMousePressEvent):
* page/FocusController.cpp:
(WebCore::clearSelectionIfNeeded):
* page/FrameView.cpp:
(WebCore::FrameView::addEmbeddedObjectToUpdate):
(WebCore::FrameView::updateEmbeddedObject):
* page/PageSerializer.cpp:
(WebCore::frameOwnerURLAttributeName):
* page/SpatialNavigation.cpp:
(WebCore::canScrollInDirection):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::altDisplayString):
(WebCore::HitTestResult::absoluteImageURL):
(WebCore::HitTestResult::absolutePDFURL):
(WebCore::HitTestResult::isContentEditable):
* rendering/RenderBlockFlow.cpp:
(WebCore::resizeTextPermitted):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::updateFromElement):
(WebCore::RenderButton::canHaveGeneratedChildren):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::isOpen):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::uploadButton):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::updateAltText):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::addFocusRingRects):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderMenuList.cpp:
(WebCore::selectedOptionCount):
(RenderMenuList::updateOptionsWidth):
(RenderMenuList::setTextFromOption):
(RenderMenuList::itemText):
(RenderMenuList::itemIsEnabled):
(RenderMenuList::itemIsSelected):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintSliderTicks):
* testing/Internals.cpp:
(WebCore::Internals::selectColorInColorChooser):
(WebCore::Internals::wasLastChangeUserEdit):
(WebCore::Internals::isSelectPopupVisible):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):

Source/WebKit/ios:

* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::focusedElementChanged):

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::focusedElementChanged):
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::textFieldDidBeginEditing):
(WebEditorClient::textFieldDidEndEditing):
(WebEditorClient::textDidChangeInTextField):
(WebEditorClient::doTextFieldCommandFromEvent):
(WebEditorClient::textWillBeDeletedInTextField):
(WebEditorClient::textDidChangeInTextArea):
* WebView/WebHTMLRepresentation.mm:
(inputElementFromDOMElement):

Source/WebKit/win:

* DOMCoreClasses.cpp:
(DOMElement::createInstance):
* DOMHTMLClasses.cpp:
(DOMHTMLOptionElement::text):
(DOMHTMLOptionElement::label):
(DOMHTMLInputElement::form):
(DOMHTMLInputElement::disabled):
(DOMHTMLInputElement::readOnly):
(DOMHTMLInputElement::setType):
(DOMHTMLInputElement::value):
(DOMHTMLInputElement::setValue):
(DOMHTMLInputElement::setValueForUser):
(DOMHTMLInputElement::select):
(DOMHTMLInputElement::setSelectionStart):
(DOMHTMLInputElement::selectionStart):
(DOMHTMLInputElement::setSelectionEnd):
(DOMHTMLInputElement::selectionEnd):
(DOMHTMLInputElement::isTextField):
(DOMHTMLInputElement::rectOnScreen):
(DOMHTMLInputElement::replaceCharactersInRange):
(DOMHTMLInputElement::selectedRange):
(DOMHTMLInputElement::setAutofilled):
(DOMHTMLInputElement::isAutofilled):
(DOMHTMLInputElement::isUserEdited):
(DOMHTMLTextAreaElement::form):
(DOMHTMLTextAreaElement::value):
(DOMHTMLTextAreaElement::setValue):
(DOMHTMLTextAreaElement::select):
(DOMHTMLTextAreaElement::isUserEdited):
* WebFrame.cpp:
(inputElementFromDOMElement):

Source/WebKit2:

* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled):
(WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::isTextField):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedElementChanged):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::textFieldDidBeginEditing):
(WebKit::WebEditorClient::textFieldDidEndEditing):
(WebKit::WebEditorClient::textDidChangeInTextField):
(WebKit::WebEditorClient::textDidChangeInTextArea):
(WebKit::WebEditorClient::doTextFieldCommandFromEvent):
(WebKit::WebEditorClient::textWillBeDeletedInTextField):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::containsAnyFormControls):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setAssistedNodeValue):
(WebKit::WebPage::setAssistedNodeValueAsNumber):
(WebKit::WebPage::setAssistedNodeSelectedIndex):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
72 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityListBoxOption.cpp
Source/WebCore/accessibility/AccessibilityMediaControls.cpp
Source/WebCore/accessibility/AccessibilityMenuListOption.cpp
Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
Source/WebCore/css/SelectorCheckerTestFunctions.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/VisibleSelection.cpp
Source/WebCore/editing/cocoa/HTMLConverter.mm
Source/WebCore/editing/gtk/EditorGtk.cpp
Source/WebCore/editing/ios/EditorIOS.mm
Source/WebCore/editing/markup.cpp
Source/WebCore/html/HTMLCollection.cpp
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLImageLoader.cpp
Source/WebCore/html/HTMLNameCollection.cpp
Source/WebCore/html/HTMLOptGroupElement.cpp
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLTagNames.in
Source/WebCore/html/RadioInputType.cpp
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/parser/HTMLElementStack.cpp
Source/WebCore/html/parser/HTMLTreeBuilder.cpp
Source/WebCore/html/shadow/MediaControlElementTypes.cpp
Source/WebCore/loader/FormSubmission.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/ImageLoader.cpp
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/FocusController.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/PageSerializer.cpp
Source/WebCore/page/SpatialNavigation.cpp
Source/WebCore/rendering/HitTestResult.cpp
Source/WebCore/rendering/RenderBlockFlow.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderButton.cpp
Source/WebCore/rendering/RenderDetailsMarker.cpp
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
Source/WebKit/ios/ChangeLog
Source/WebKit/ios/WebCoreSupport/WebChromeClientIOS.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
Source/WebKit/mac/WebView/WebHTMLRepresentation.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/DOMCoreClasses.cpp
Source/WebKit/win/DOMHTMLClasses.cpp
Source/WebKit/win/WebFrame.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm