Use downcast<HTML*Element>() instead of toHTML*Element()
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Sep 2014 22:03:15 +0000 (22:03 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Sep 2014 22:03:15 +0000 (22:03 +0000)
commit72754bab0fc658467f19b4c75e1c11a064ee0a1e
tree6bc63b85795815f349c538be524def50cadc333c
parentc791f2077e7ae7eb0ef9259a4f6eda4ddea1613e
Use downcast<HTML*Element>() instead of toHTML*Element()
https://bugs.webkit.org/show_bug.cgi?id=137007

Reviewed by Benjamin Poulain.

Source/WebCore:

Use downcast<HTML*Element>() instead of toHTML*Element() and drop
transition macros for toHTML*Element().

This patch also cleans up the surrounding code.

No new tests, no behavior change.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedUIElementForPage):
(WebCore::AXObjectCache::labelChanged):
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute):
(WebCore::AccessibilityListBox::addChildren):
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::isSelected):
(WebCore::AccessibilityListBoxOption::stringValue):
(WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaTimeline::valueDescription):
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::isEnabled):
(WebCore::AccessibilityMenuListOption::isSelected):
(WebCore::AccessibilityMenuListOption::setSelected):
(WebCore::AccessibilityMenuListOption::stringValue):
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::addChildren):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::isNativeTextControl):
(WebCore::AccessibilityNodeObject::isNativeImage):
(WebCore::AccessibilityNodeObject::isInputImage):
(WebCore::AccessibilityNodeObject::isMultiSelectable):
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::valueForRange):
(WebCore::AccessibilityNodeObject::maxValueForRange):
(WebCore::AccessibilityNodeObject::minValueForRange):
(WebCore::isNodeActionElement):
(WebCore::AccessibilityNodeObject::alternativeText):
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):
(WebCore::AccessibilityNodeObject::text):
(WebCore::AccessibilityNodeObject::stringValue):
(WebCore::AccessibilityNodeObject::colorValue):
(WebCore::accessibleNameForNode):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isFileUploadButton):
(WebCore::AccessibilityRenderObject::stringValue):
(WebCore::AccessibilityRenderObject::labelElementContainer):
(WebCore::AccessibilityRenderObject::internalLinkElement):
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
(WebCore::AccessibilityRenderObject::url):
(WebCore::AccessibilityRenderObject::setValue):
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
(WebCore::AccessibilityRenderObject::stringValueForMSAA):
(WebCore::AccessibilityRenderObject::isLinked):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::inputElement):
(WebCore::AccessibilitySliderThumb::elementRect):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::tableElement):
(WebCore::AccessibilityTable::title):
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::notifyChildrenSelectionChange):
* accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
(optionFromSelection):
(webkitAccessibleSelectionGetSelectionCount):
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(webkitAccessibleTableGetCaption):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetDescription):
* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
* bindings/js/JSHTMLFrameSetElementCustom.cpp:
(WebCore::JSHTMLFrameSetElement::nameGetter):
* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorCheckerTestFunctions.h:
(WebCore::isChecked):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* css/StyleSheetList.cpp:
(WebCore::StyleSheetList::getNamedItem):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
(WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
(WebCore::SelectorCompiler::isPlaceholderShown):
* dom/CurrentScriptIncrementer.h:
(WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::setDragImage):
* dom/Document.cpp:
(WebCore::Document::setTitle):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::iconURLs):
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
(WebCore::keyMatchesLowercasedUsemap):
(WebCore::DocumentOrderedMap::getElementByMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
(WebCore::Element::updateName):
(WebCore::Element::updateId):
(WebCore::Element::updateLabel):
(WebCore::Element::ensureCachedHTMLCollection):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
* dom/ScriptElement.cpp:
(WebCore::toScriptElementIfPossible):
* dom/VisitedLinkState.cpp:
(WebCore::linkHashForElement):
(WebCore::VisitedLinkState::determineLinkStateSlowCase):
* dom/make_names.pl:
(printTypeHelpers):
* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand):
(WebCore::imageElementFromImageDocument):
(WebCore::findFirstMarkable):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll):
(WebCore::scanForForm):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::nonBoundaryShadowTreeRootNode):
(WebCore::VisibleSelection::isInPasswordField):
* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_processElement):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
* editing/markup.cpp:
(WebCore::isPlainTextMarkup):
* html/ColorInputType.cpp:
(WebCore::ColorInputType::suggestions):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
(WebCore::FTPDirectoryDocumentParser::createBasicDocument):
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::findAssociatedForm):
* html/HTMLAnchorElement.cpp:
(WebCore::appendServerMapMousePosition):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::imageElement):
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::matchesReadWritePseudoClass):
(WebCore::HTMLElement::setInnerHTML):
(WebCore::HTMLElement::directionality):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
(WebCore::shouldAutofocus):
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::formControlElements):
(WebCore::HTMLFormControlsCollection::formImageElements):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getTextFieldValues):
(WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::notifyFinished):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::dataList):
(WebCore::HTMLInputElement::setupDateTimeChooserParameters):
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::shadowSelect):
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::virtualForm):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLNameCollection.cpp:
(WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
(WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::elementMatches):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
(WebCore::HTMLObjectElement::containsJavaApplet):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::recalcSelectOptions):
(WebCore::HTMLOptGroupElement::ownerSelectElement):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::ownerDataListElement):
(WebCore::HTMLOptionElement::ownerSelectElement):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
* html/HTMLOptionsCollection.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::hasPlaceholderLabelOption):
(WebCore::HTMLSelectElement::value):
(WebCore::HTMLSelectElement::setValue):
(WebCore::HTMLSelectElement::saveLastSelection):
(WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::listBoxOnChange):
(WebCore::HTMLSelectElement::recalcListItems):
(WebCore::HTMLSelectElement::selectedIndex):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
(WebCore::HTMLSelectElement::saveFormControlState):
(WebCore::HTMLSelectElement::searchOptionsForValue):
(WebCore::HTMLSelectElement::restoreFormControlState):
(WebCore::HTMLSelectElement::appendFormData):
(WebCore::HTMLSelectElement::reset):
(WebCore::HTMLSelectElement::updateSelectedState):
(WebCore::HTMLSelectElement::lastSelectedListIndex):
(WebCore::HTMLSelectElement::optionAtIndex):
(WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::detailsElement):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::caption):
* html/HTMLTablePartElement.cpp:
(WebCore::HTMLTablePartElement::findParentTable):
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::rowIndex):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::rowAfter):
(WebCore::HTMLTableRowsCollection::lastRow):
(WebCore::HTMLTableRowsCollection::customElementAfter):
* html/HTMLTableRowsCollection.h:
* html/HTMLTemplateElement.cpp:
(WebCore::HTMLTemplateElement::cloneNode):
* html/HTMLTextFormControlElement.cpp:
(WebCore::enclosingTextFormControl):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::createDocumentStructure):
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::elementMatches):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
(WebCore::descendentVideoElement):
(WebCore::ancestorVideoElement):
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable):
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::updateTickMarkValues):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::insert):
(WebCore::HTMLConstructionSite::insertTextNode):
(WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::rendererIsNeeded):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::meterElement):
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressShadowElement::progressElement):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::handleFallbackContent):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestObject):
* page/Chrome.cpp:
(WebCore::Chrome::setToolTip):
* page/DragController.cpp:
(WebCore::DragController::draggableElement):
* page/EventHandler.cpp:
(WebCore::isSubmitImage):
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusDirectionally):
* page/FrameView.cpp:
(WebCore::FrameView::addEmbeddedObjectToUpdate):
(WebCore::FrameView::updateEmbeddedObject):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* page/SpatialNavigation.cpp:
(WebCore::FocusCandidate::FocusCandidate):
* page/ios/FrameIOS.mm:
(WebCore::ancestorRespondingToClickEvents):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::altDisplayString):
(WebCore::HitTestResult::absolutePDFURL):
(WebCore::HitTestResult::enterFullscreenForVideo):
(WebCore::HitTestResult::mediaControlsEnabled):
(WebCore::HitTestResult::isLiveLink):
(WebCore::HitTestResult::isContentEditable):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::updateFromElement):
* rendering/RenderCounter.cpp:
(WebCore::planCounter):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintContents):
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::inputElement):
(WebCore::RenderFileUploadControl::uploadButton):
* rendering/RenderFrame.cpp:
(WebCore::RenderFrame::frameElement):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::frameSetElement):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::canvasElement):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::iframeElement):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::RenderImage):
(WebCore::RenderImage::paintAreaElementFocusRing):
(WebCore::RenderImage::paintIntoRect):
(WebCore::RenderImage::imageMap):
(WebCore::RenderImage::updateAltText):
* rendering/RenderLayerBacking.cpp:
(WebCore::canvasCompositingStrategy):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateConfiguration):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::selectElement):
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::calcValue):
(WebCore::RenderListItem::updateListMarkerNumbers):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::marqueeSpeed):
* rendering/RenderMenuList.cpp:
(WebCore::selectedOptionCount):
(RenderMenuList::selectElement):
(RenderMenuList::updateOptionsWidth):
(RenderMenuList::setTextFromOption):
(RenderMenuList::itemText):
(RenderMenuList::itemIsSelected):
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::meterElement):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::progressElement):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::element):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::plugInImageElement):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::textFormControlElement):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::textAreaElement):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::inputElement):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintSliderTicks):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::videoElement):
* svg/graphics/SVGImageCache.cpp:
(WebCore::SVGImageCache::imageForRenderer):
* svg/svgtags.in:
Generate helpers to SVGAElement so that isSVGAElement() can be used
instead of hasTagName(SVGNames::aTag). I did such update in this
patch.

* testing/Internals.cpp:
(WebCore::Internals::visiblePlaceholder):
(WebCore::Internals::wasLastChangeUserEdit):
(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
(WebCore::Internals::isSelectPopupVisible):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):

Source/WebKit/ios:

Use downcast<HTML*Element>() instead of toHTML*Element().

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

Source/WebKit/mac:

Use downcast<HTML*Element>() instead of toHTML*Element().

* DOM/WebDOMOperations.mm:
(-[DOMHTMLInputElement _setAutofilled:]):
* 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:

Use downcast<HTML*Element>() instead of toHTML*Element().

* DOMHTMLClasses.cpp:
(DOMHTMLDocument::URL):
(DOMHTMLDocument::body):
(DOMHTMLDocument::forms):
(DOMHTMLFormElement::action):
(DOMHTMLFormElement::method):
(DOMHTMLSelectElement::options):
(DOMHTMLSelectElement::activateItemAtIndex):
(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::replaceCharactersInRange):
(DOMHTMLInputElement::selectedRange):
(DOMHTMLInputElement::setAutofilled):
(DOMHTMLInputElement::isAutofilled):
(DOMHTMLInputElement::isUserEdited):
(DOMHTMLTextAreaElement::form):
(DOMHTMLTextAreaElement::value):
(DOMHTMLTextAreaElement::setValue):
(DOMHTMLTextAreaElement::select):
(DOMHTMLTextAreaElement::isUserEdited):
(DOMHTMLIFrameElement::contentFrame):
* WebFrame.cpp:
(formElementFromDOMElement):
(inputElementFromDOMElement):

Source/WebKit2:

Use downcast<HTML*Element>() instead of toHTML*Element().

* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled):
(WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::isTextField):
(WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
(WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::commit):
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::createAnnotationElement):
(WebKit::PDFPluginTextAnnotation::value):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
(WebKit::PluginView::pluginSnapshotTimerFired):
(WebKit::PluginView::pluginDidReceiveUserInteraction):
* 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/WebPage.cpp:
(WebKit::WebPage::createPlugin):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setAssistedNodeValue):
(WebKit::WebPage::setAssistedNodeValueAsNumber):
(WebKit::WebPage::setAssistedNodeSelectedIndex):
(WebKit::isAssistableNode): Deleted.
(WebKit::WebPage::getAssistedNodeInformation): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
155 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AccessibilityListBox.cpp
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/AccessibilitySlider.cpp
Source/WebCore/accessibility/AccessibilityTable.cpp
Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTable.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
Source/WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp
Source/WebCore/bindings/js/JSNodeCustom.cpp
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/css/SelectorCheckerTestFunctions.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleSheetList.cpp
Source/WebCore/cssjit/SelectorCompiler.cpp
Source/WebCore/dom/CurrentScriptIncrementer.h
Source/WebCore/dom/DataTransfer.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/DocumentOrderedMap.cpp
Source/WebCore/dom/DocumentStyleSheetCollection.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/dom/ScriptElement.cpp
Source/WebCore/dom/VisitedLinkState.cpp
Source/WebCore/dom/make_names.pl
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/MarkupAccumulator.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/VisibleSelection.cpp
Source/WebCore/editing/cocoa/HTMLConverter.mm
Source/WebCore/editing/ios/EditorIOS.mm
Source/WebCore/html/ColorInputType.cpp
Source/WebCore/html/FTPDirectoryDocument.cpp
Source/WebCore/html/FormAssociatedElement.cpp
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLAreaElement.cpp
Source/WebCore/html/HTMLCollection.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLFieldSetElement.cpp
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormControlsCollection.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLImageLoader.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLKeygenElement.cpp
Source/WebCore/html/HTMLLegendElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLNameCollection.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLOptGroupElement.cpp
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/HTMLOptionsCollection.cpp
Source/WebCore/html/HTMLOptionsCollection.h
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLSummaryElement.cpp
Source/WebCore/html/HTMLTableElement.cpp
Source/WebCore/html/HTMLTablePartElement.cpp
Source/WebCore/html/HTMLTableRowElement.cpp
Source/WebCore/html/HTMLTableRowsCollection.cpp
Source/WebCore/html/HTMLTableRowsCollection.h
Source/WebCore/html/HTMLTemplateElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/ImageDocument.cpp
Source/WebCore/html/LabelsNodeList.cpp
Source/WebCore/html/MediaDocument.cpp
Source/WebCore/html/PluginDocument.cpp
Source/WebCore/html/RadioInputType.cpp
Source/WebCore/html/RadioNodeList.cpp
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/parser/HTMLTreeBuilder.cpp
Source/WebCore/html/shadow/DetailsMarkerControl.cpp
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MeterShadowElement.cpp
Source/WebCore/html/shadow/ProgressShadowElement.cpp
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/loader/FormSubmission.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/ImageLoader.cpp
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/DragController.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/page/ios/FrameIOS.mm
Source/WebCore/rendering/HitTestResult.cpp
Source/WebCore/rendering/RenderButton.cpp
Source/WebCore/rendering/RenderCounter.cpp
Source/WebCore/rendering/RenderEmbeddedObject.cpp
Source/WebCore/rendering/RenderFieldset.h
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderFrame.cpp
Source/WebCore/rendering/RenderFrameSet.cpp
Source/WebCore/rendering/RenderHTMLCanvas.cpp
Source/WebCore/rendering/RenderIFrame.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListItem.cpp
Source/WebCore/rendering/RenderMarquee.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderMeter.cpp
Source/WebCore/rendering/RenderProgress.cpp
Source/WebCore/rendering/RenderSlider.cpp
Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RenderTextControlMultiLine.cpp
Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderThemeIOS.mm
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/RenderVideo.cpp
Source/WebCore/svg/graphics/SVGImageCache.cpp
Source/WebCore/svg/svgtags.in
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/DOM/WebDOMOperations.mm
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/DOMHTMLClasses.cpp
Source/WebKit/win/WebFrame.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm
Source/WebKit2/WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm