Replace some stack raw pointers with RefPtrs within WebCore/html
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Oct 2017 01:01:21 +0000 (01:01 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Oct 2017 01:01:21 +0000 (01:01 +0000)
commit76f672723b9e1eb2df89a77561d99a65ab0d764e
tree5fb3f79d57a8a629a0a08c62bd7ab2aa76b98e3f
parenta51530a44c4fb0bd57c8c1c75f63c831cd8c5a53
Replace some stack raw pointers with RefPtrs within WebCore/html
https://bugs.webkit.org/show_bug.cgi?id=178201
<rdar://problem/34841692>

Reviewed by Ryosuke Niwa.

Source/WebCore:

This is an effort to reduce raw pointer usage in DOM code. In this patch, raw pointers
that are ref countable are blindly selected to be replaced with RefPtrs with one exception
which is auto*.

Also, this patch occasionally modifies the return type of some methods, and therefore callers
of those methods are modified accordingly.

* Modules/encryptedmedia/legacy/LegacyCDM.cpp:
(WebCore::LegacyCDM::mediaPlayer const):
* Modules/encryptedmedia/legacy/LegacyCDM.h:
* Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp:
(WebCore::CDMPrivateMediaPlayer::createSession):
* Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
(WebCore::WebKitMediaKeys::cdmMediaPlayer const):
* Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::externalDeviceDisplayName const):
(WebCore::MediaControlsHost::externalDeviceType const):
* dom/Element.cpp:
(WebCore::Element::focusDelegate):
(WebCore::Element::userAgentShadowRoot const):
(WebCore::Element::ensureUserAgentShadowRoot):
* dom/Element.h:
* dom/EventContext.cpp:
(WebCore::TouchEventContext::checkReachability const):
* dom/EventPath.cpp:
(WebCore::shouldEventCrossShadowBoundary):
(WebCore::EventPath::setRelatedTarget):
(WebCore::EventPath::retargetTouch):
(WebCore:: const):
* dom/EventTarget.cpp:
(WebCore::EventTarget::toNode):
(WebCore::EventTarget::addEventListener):
* dom/EventTarget.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::toElement const):
(WebCore::MouseEvent::fromElement const):
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::computeRelativePosition):
* dom/Node.cpp:
(WebCore::Node::toNode):
* dom/Node.h:
* dom/ScopedEventQueue.cpp:
* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand):
* editing/EditorCommand.cpp:
(WebCore::targetFrame):
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleReplacedElement):
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
* html/ColorInputType.cpp:
(WebCore::ColorInputType::updateColorSwatch):
(WebCore::ColorInputType::shadowColorSwatch const):
* html/FileInputType.cpp:
(WebCore::FileInputType::disabledAttributeChanged):
(WebCore::FileInputType::multipleAttributeChanged):
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::findAssociatedForm):
(WebCore::FormAssociatedElement::formOwnerRemovedFromTree):
(WebCore::FormAssociatedElement::resetFormOwner):
(WebCore::FormAssociatedElement::formAttributeChanged):
* html/FormController.cpp:
(WebCore::recordFormStructure):
(WebCore::FormKeyGenerator::formKey):
(WebCore::FormController::restoreControlStateIn):
* html/HTMLAnchorElement.cpp:
(WebCore::appendServerMapMousePosition):
(WebCore::HTMLAnchorElement::handleClick):
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::imageElement const):
(WebCore::HTMLAreaElement::isFocusable const):
(WebCore::HTMLAreaElement::setFocus):
(WebCore::HTMLAreaElement::updateFocusAppearance):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::setScrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
(WebCore::HTMLBodyElement::setScrollTop):
(WebCore::HTMLBodyElement::scrollHeight):
(WebCore::HTMLBodyElement::scrollWidth):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createElementRenderer):
(WebCore:: const):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::width):
(WebCore::HTMLDocument::height):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
(WebCore::setHasDirAutoFlagRecursively):
(WebCore::HTMLElement::directionality const):
(WebCore::HTMLElement::dirAttributeChanged):
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin const):
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLFieldSetElement.cpp:
(WebCore::updateFromControlElementsAncestorDisabledStateUnder):
(WebCore::HTMLFieldSetElement::disabledStateChanged):
(WebCore::HTMLFieldSetElement::childrenChanged):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor const):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::didChangeForm):
(WebCore::HTMLFormControlElement::shouldAutocorrect const):
(WebCore::HTMLFormControlElement::autocapitalizeType const):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::handleLocalEvents):
(WebCore::submitElementFromEvent):
(WebCore::HTMLFormElement::prepareForSubmission):
(WebCore::HTMLFormElement::submit):
(WebCore::HTMLFormElement::reset):
(WebCore::HTMLFormElement::shouldAutocorrect const):
(WebCore::HTMLFormElement::parseAttribute):
(WebCore::HTMLFormElement::resetDefaultButton):
(WebCore::HTMLFormElement::elementFromPastNamesMap const):
(WebCore::HTMLFormElement::namedElements):
* html/HTMLFormElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::didAttachRenderers):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::isURLAllowed const):
(WebCore::HTMLFrameElementBase::openURL):
(WebCore::HTMLFrameElementBase::didAttachRenderers):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::setContentFrame):
(WebCore::HTMLFrameOwnerElement::clearContentFrame):
(WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
(WebCore::SubframeLoadingDisabler::canLoadFrame):
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::findContaining):
(WebCore::HTMLFrameSetElement::willAttachRenderers):
(WebCore::HTMLFrameSetElement::insertedInto):
(WebCore::HTMLFrameSetElement::removedFrom):
* html/HTMLFrameSetElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
(WebCore::HTMLImageElement::pictureElement const):
(WebCore::HTMLImageElement::destroyImageControls):
(WebCore::HTMLImageElement::hasImageControls const):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::innerTextElement const):
(WebCore::HTMLInputElement::endEditing):
(WebCore::HTMLInputElement::dataList const):
(WebCore::HTMLInputElement::resetListAttributeTargetObserver): Deleted.
(WebCore::HTMLInputElement::listAttributeTargetChanged): Deleted.
(WebCore::HTMLInputElement::isSteppable const): Deleted.
(WebCore::HTMLInputElement::dateType const): Deleted.
(WebCore::HTMLInputElement::isTextButton const): Deleted.
(WebCore::HTMLInputElement::isRadioButton const): Deleted.
(WebCore::HTMLInputElement::isSearchField const): Deleted.
(WebCore::HTMLInputElement::isInputTypeHidden const): Deleted.
(WebCore::HTMLInputElement::isPasswordField const): Deleted.
(WebCore::HTMLInputElement::isCheckbox const): Deleted.
(WebCore::HTMLInputElement::isRangeControl const): Deleted.
(WebCore::HTMLInputElement::isColorControl const): Deleted.
(WebCore::HTMLInputElement::isText const): Deleted.
(WebCore::HTMLInputElement::isEmailField const): Deleted.
(WebCore::HTMLInputElement::isFileUpload const): Deleted.
(WebCore::HTMLInputElement::isImageButton const): Deleted.
(WebCore::HTMLInputElement::isNumberField const): Deleted.
(WebCore::HTMLInputElement::isSubmitButton const): Deleted.
(WebCore::HTMLInputElement::isTelephoneField const): Deleted.
(WebCore::HTMLInputElement::isURLField const): Deleted.
(WebCore::HTMLInputElement::isDateField const): Deleted.
(WebCore::HTMLInputElement::isDateTimeField const): Deleted.
(WebCore::HTMLInputElement::isDateTimeLocalField const): Deleted.
(WebCore::HTMLInputElement::isMonthField const): Deleted.
(WebCore::HTMLInputElement::isTimeField const): Deleted.
(WebCore::HTMLInputElement::isWeekField const): Deleted.
(WebCore::HTMLInputElement::isEnumeratable const): Deleted.
(WebCore::HTMLInputElement::supportLabels const): Deleted.
(WebCore::HTMLInputElement::shouldAppearChecked const): Deleted.
(WebCore::HTMLInputElement::supportsPlaceholder const): Deleted.
(WebCore::HTMLInputElement::updatePlaceholderText): Deleted.
(WebCore::HTMLInputElement::isEmptyValue const): Deleted.
(WebCore::HTMLInputElement::maxLengthAttributeChanged): Deleted.
(WebCore::HTMLInputElement::minLengthAttributeChanged): Deleted.
(WebCore::HTMLInputElement::updateValueIfNeeded): Deleted.
(WebCore::HTMLInputElement::defaultToolTip const): Deleted.
(WebCore::HTMLInputElement::matchesIndeterminatePseudoClass const): Deleted.
(WebCore::HTMLInputElement::shouldAppearIndeterminate const): Deleted.
(WebCore::HTMLInputElement::mediaCaptureType const): Deleted.
(WebCore::HTMLInputElement::isInRequiredRadioButtonGroup): Deleted.
(WebCore:: const): Deleted.
(WebCore::HTMLInputElement::checkedRadioButtonForGroup const): Deleted.
(WebCore::HTMLInputElement::radioButtonGroups const): Deleted.
(WebCore::HTMLInputElement::addToRadioButtonGroup): Deleted.
(WebCore::HTMLInputElement::removeFromRadioButtonGroup): Deleted.
(WebCore::HTMLInputElement::height const): Deleted.
(WebCore::HTMLInputElement::width const): Deleted.
(WebCore::HTMLInputElement::setHeight): Deleted.
(WebCore::HTMLInputElement::setWidth): Deleted.
(WebCore::ListAttributeTargetObserver::ListAttributeTargetObserver): Deleted.
(WebCore::ListAttributeTargetObserver::idTargetChanged): Deleted.
(WebCore::HTMLInputElement::setRangeText): Deleted.
(WebCore::HTMLInputElement::shouldTruncateText const): Deleted.
(WebCore::HTMLInputElement::selectionStartForBindings const): Deleted.
(WebCore::HTMLInputElement::setSelectionStartForBindings): Deleted.
(WebCore::HTMLInputElement::selectionEndForBindings const): Deleted.
(WebCore::HTMLInputElement::setSelectionEndForBindings): Deleted.
(WebCore::HTMLInputElement::selectionDirectionForBindings const): Deleted.
(WebCore::HTMLInputElement::setSelectionDirectionForBindings): Deleted.
(WebCore::HTMLInputElement::setSelectionRangeForBindings): Deleted.
(WebCore::HTMLInputElement::createInnerTextStyle const): Deleted.
(WebCore::HTMLInputElement::setupDateTimeChooserParameters): Deleted.
(WebCore::HTMLInputElement::capsLockStateMayHaveChanged): Deleted.
* html/HTMLInputElement.h:
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::shadowSelect const):
* html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::defaultEventHandler):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::handleClick):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::mapMouseEvent):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
(WebCore::HTMLMediaElement::isSafeToLoadURL):
(WebCore::HTMLMediaElement::controls const):
(WebCore::HTMLMediaElement::layoutSizeChanged):
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::mediaControls const):
(WebCore::HTMLMediaElement::hasMediaControls const):
(WebCore::HTMLMediaElement::mediaPlayerReferrer const):
(WebCore::HTMLMediaElement::mediaPlayerUserAgent const):
(WebCore::HTMLMediaElement::mediaPlayerShouldWaitForResponseToAuthenticationChallenge):
(WebCore::HTMLMediaElement::sourceApplicationIdentifier const):
(WebCore::HTMLMediaElement::getVideoPlaybackQuality):
(WebCore::HTMLMediaElement::session const):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::player const):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::hasFallbackContent const):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::ownerSelectElement const):
(WebCore::HTMLOptGroupElement::accessKeyAction):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::setText):
(WebCore::HTMLOptionElement::accessKeyAction):
(WebCore::HTMLOptionElement::index const):
(WebCore::HTMLOptionElement::parseAttribute):
(WebCore::HTMLOptionElement::selected):
(WebCore::HTMLOptionElement::setSelected):
(WebCore::HTMLOptionElement::setSelectedState):
(WebCore::HTMLOptionElement::childrenChanged):
(WebCore::HTMLOptionElement::ownerDataListElement const):
(WebCore::HTMLOptionElement::ownerSelectElement const):
(WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel const):
(WebCore::HTMLOptionElement::insertedInto):
(WebCore::HTMLOptionElement::collectOptionInnerText const):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::willDetachRenderers):
(WebCore::HTMLPlugInElement::isKeyboardFocusable const):
(WebCore::HTMLPlugInElement::isUserObservable const):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay const):
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::add):
(WebCore::HTMLSelectElement::recalcListItems const):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::reset):
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* html/HTMLSlotElement.cpp:
(WebCore::flattenAssignedNodes):
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::removedFrom):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::isActiveSummary const):
(WebCore::isClickableControl):
(WebCore::HTMLSummaryElement::defaultEventHandler):
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::additionalPresentationAttributeStyle const):
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::additionalPresentationAttributeStyle const):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::tHead const):
(WebCore::HTMLTableElement::setTHead):
(WebCore::HTMLTableElement::tFoot const):
(WebCore::HTMLTableElement::createTBody):
(WebCore::HTMLTableElement::lastBody const):
(WebCore::HTMLTableElement::deleteRow):
* html/HTMLTablePartElement.cpp:
(WebCore::HTMLTablePartElement::findParentTable const):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::rowAfter):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::subtreeHasChanged):
(WebCore::HTMLTextAreaElement::innerTextElement const):
* html/HTMLTextAreaElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::indexForVisiblePosition const):
(WebCore::HTMLTextFormControlElement::visiblePositionForIndex const):
(WebCore::HTMLTextFormControlElement::computeSelectionStart const):
(WebCore::HTMLTextFormControlElement::computeSelectionEnd const):
(WebCore::HTMLTextFormControlElement::computeSelectionDirection const):
(WebCore::HTMLTextFormControlElement::selection const):
(WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability):
(WebCore::innerTextValueFrom):
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
(WebCore::HTMLTextFormControlElement::innerTextValue const):
(WebCore::positionForIndex):
(WebCore::HTMLTextFormControlElement::indexForPosition const):
(WebCore::HTMLTextFormControlElement::hidePlaceholder):
(WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary):
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):
(WebCore::enclosingTextFormControl):
(WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
* html/HTMLTextFormControlElement.h:
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::canLoadURL):
(WebCore::HTMLTrackElement::setReadyState):
(WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute const):
(WebCore::HTMLTrackElement::textTrackKindChanged):
(WebCore::HTMLTrackElement::textTrackModeChanged):
(WebCore::HTMLTrackElement::textTrackAddCues):
(WebCore::HTMLTrackElement::textTrackRemoveCues):
(WebCore::HTMLTrackElement::textTrackAddCue):
(WebCore::HTMLTrackElement::textTrackRemoveCue):
(WebCore::HTMLTrackElement::mediaElement const):
* html/HTMLTrackElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::setDisplayMode):
(WebCore::HTMLVideoElement::paintCurrentFrameInContext):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::createDocumentStructure):
(WebCore::ImageDocument::scale):
(WebCore::ImageDocument::imageFitsInWindow):
* html/InputType.cpp:
(WebCore::InputType::destroyShadowSubtree):
* html/InputType.h:
(WebCore::InputType::innerTextElement const):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
(WebCore::MediaDocument::defaultEventHandler):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::wirelessVideoPlaybackDisabled const):
(WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
(WebCore::isMainContentForPurposesOfAutoplay):
* html/NumberInputType.cpp:
(WebCore::NumberInputType::decorationWidth const):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::appendBytes):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable const):
(WebCore::RadioInputType::didDispatchClick):
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter const):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):
(WebCore::RangeInputType::handleTouchEvent):
(WebCore::RangeInputType::sliderTrackElement const):
(WebCore::RangeInputType::listAttributeTargetChanged):
(WebCore::RangeInputType::updateTickMarkValues):
* html/SearchInputType.cpp:
(WebCore::SearchInputType::createShadowSubtree):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::isEmptyValue const):
(WebCore::TextFieldInputType::handleKeydownEvent):
(WebCore::TextFieldInputType::handleFocusEvent):
(WebCore::TextFieldInputType::innerTextElement const):
(WebCore::TextFieldInputType::updatePlaceholderText):
(WebCore::TextFieldInputType::didSetValueByUserEdit):
(WebCore::TextFieldInputType::shouldDrawCapsLockIndicator const):
* html/TextFieldInputType.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::size):
(WebCore::CanvasRenderingContext2D::drawImage):
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::copyBufferSubData):
(WebCore::WebGL2RenderingContext::getBufferSubData):
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::attach):
(WebCore::WebGLFramebuffer::getAttachmentObject const):
(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
(WebCore::WebGLFramebuffer::getColorBufferWidth const):
(WebCore::WebGLFramebuffer::getColorBufferHeight const):
(WebCore::WebGLFramebuffer::getColorBufferFormat const):
(WebCore::WebGLFramebuffer::checkStatus const):
(WebCore::WebGLFramebuffer::hasStencilBuffer const):
(WebCore::WebGLFramebuffer::initializeAttachments):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::compressedTexImage2D):
(WebCore::WebGLRenderingContextBase::compressedTexSubImage2D):
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::generateMipmap):
(WebCore::WebGLRenderingContextBase::getAttachedShaders):
(WebCore::WebGLRenderingContextBase::getTexParameter):
(WebCore::WebGLRenderingContextBase::linkProgramWithoutInvalidatingAttribLocations):
(WebCore::WebGLRenderingContextBase::texImage2DBase):
(WebCore::WebGLRenderingContextBase::validateTexFunc):
(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::texSubImage2DBase):
(WebCore::WebGLRenderingContextBase::copyTexImage2D):
(WebCore::WebGLRenderingContextBase::texImage2D):
(WebCore::WebGLRenderingContextBase::texParameter):
(WebCore::WebGLRenderingContextBase::loseContextImpl):
(WebCore::WebGLRenderingContextBase::checkTextureCompleteness):
(WebCore::WebGLRenderingContextBase::validateTextureBinding):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
* html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp:
(WebCore::WebGPURenderPassColorAttachmentDescriptor::clearColor const):
(WebCore::WebGPURenderPassColorAttachmentDescriptor::setClearColor):
* html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp:
(WebCore::WebGPURenderPassDepthAttachmentDescriptor::clearDepth const):
(WebCore::WebGPURenderPassDepthAttachmentDescriptor::setClearDepth):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::executeInsertAlreadyParsedChildTask):
(WebCore::HTMLConstructionSite::insertTextNode):
* html/parser/HTMLFormattingElementList.cpp:
(WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* html/parser/HTMLParserScheduler.cpp:
(WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::parentMediaElement):
* html/shadow/MediaControlElementTypes.h:
(WebCore::parentMediaElement):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::startDrag):
(WebCore::MediaControlPanelElement::endDrag):
(WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
(WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
(WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
(WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
(WebCore::MediaControlTextTrackContainerElement::updateTextStrokeStyle):
(WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation):
(WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::containsRelatedTarget):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::isDisabledFormControl const):
(WebCore::SliderThumbElement::matchesReadWritePseudoClass const):
(WebCore::SliderThumbElement::focusDelegate):
(WebCore::SliderThumbElement::setPositionFromPoint):
(WebCore::SliderThumbElement::startDragging):
(WebCore::SliderThumbElement::stopDragging):
(WebCore::SliderThumbElement::defaultEventHandler):
(WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
(WebCore::SliderThumbElement::willRespondToMouseClickEvents):
(WebCore::SliderThumbElement::willDetachRenderers):
(WebCore::findTouchWithIdentifier):
(WebCore::SliderThumbElement::handleTouchStart):
(WebCore::SliderThumbElement::handleTouchMove):
(WebCore::SliderThumbElement::handleTouchEndAndCancel):
(WebCore::SliderThumbElement::handleTouchEvent):
(WebCore::SliderThumbElement::hostInput const):
* html/shadow/SliderThumbElement.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::defaultEventHandler):
(WebCore::SpinButtonElement::releaseCapture):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerTextElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::ImageControlsButtonElementMac::defaultEventHandler):
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::trackElementIndex):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::setMode):
(WebCore::TextTrack::hasCue):
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCue::copyWebVTTNodeToDOMTree):
(WebCore::VTTCue::determineTextDirection):
(WebCore::VTTCue::markFutureAndPastNodes):
(WebCore::VTTCue::removeDisplayTree):
(WebCore::VTTCue::cueContentsMatch const):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::didAddEventListener):
(WebCore::InspectorDOMAgent::willRemoveEventListener):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::maybeCreateContextMenu):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::handleEvent):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::innerTextElement const):
(WebCore::RenderTextControl::styleDidChange):
(WebCore::RenderTextControl::textBlockLogicalWidth const):
(WebCore::RenderTextControl::computeLogicalHeight const):
(WebCore::RenderTextControl::hitInnerTextElement):
(WebCore::RenderTextControl::canScroll const):
(WebCore::RenderTextControl::innerLineHeight const):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::nodeAtPoint):
(WebCore::RenderTextControlSingleLine::styleDidChange):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isFocused const):
* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSliderThumb):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::willBeDestroyed):
(WebCore::RenderVideo::calculateIntrinsicSize):
(WebCore::RenderVideo::paintReplaced):
(WebCore::RenderVideo::updatePlayer):
(WebCore::RenderVideo::supportsAcceleratedRendering const):
(WebCore::RenderVideo::acceleratedRenderingStateChanged):
(WebCore::RenderVideo::requiresImmediateCompositing const):
(WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect const):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::clearShadowTree):
(WebCore::SVGUseElement::targetClone const):

Source/WebKit:

Change the type of node as toNode() is changed to return RefPtr.

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.cpp:
(WebKit::wrap):
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::handleKeyboardEvent):
* WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
(WebKit::WebEditorClient::handleKeyboardEvent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::handleEditingKeyboardEvent):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::frameForEvent):

Source/WebKitLegacy/mac:

* DOM/DOM.mm:
(kit):
Change the type of node as toNode() is changed to return RefPtr.

Source/WebKitLegacy/win:

* WebView.cpp:
(WebView::handleEditingKeyboardEvent):
Change the type of node as toNode() is changed to return RefPtr.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
135 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDM.cpp
Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDM.h
Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp
Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp
Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeys.h
Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/EventContext.cpp
Source/WebCore/dom/EventPath.cpp
Source/WebCore/dom/EventTarget.cpp
Source/WebCore/dom/EventTarget.h
Source/WebCore/dom/MouseEvent.cpp
Source/WebCore/dom/MouseEvent.h
Source/WebCore/dom/MouseRelatedEvent.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/ScopedEventQueue.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp
Source/WebCore/html/ColorInputType.cpp
Source/WebCore/html/FileInputType.cpp
Source/WebCore/html/FormAssociatedElement.cpp
Source/WebCore/html/FormController.cpp
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLAppletElement.cpp
Source/WebCore/html/HTMLAreaElement.cpp
Source/WebCore/html/HTMLBodyElement.cpp
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/HTMLDocument.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLFieldSetElement.cpp
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLFormElement.h
Source/WebCore/html/HTMLFrameElement.cpp
Source/WebCore/html/HTMLFrameElementBase.cpp
Source/WebCore/html/HTMLFrameOwnerElement.cpp
Source/WebCore/html/HTMLFrameSetElement.cpp
Source/WebCore/html/HTMLFrameSetElement.h
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLKeygenElement.cpp
Source/WebCore/html/HTMLLabelElement.cpp
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/HTMLMapElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLOptGroupElement.cpp
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/HTMLPlugInElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLSlotElement.cpp
Source/WebCore/html/HTMLSourceElement.cpp
Source/WebCore/html/HTMLSummaryElement.cpp
Source/WebCore/html/HTMLTableCellElement.cpp
Source/WebCore/html/HTMLTableColElement.cpp
Source/WebCore/html/HTMLTableElement.cpp
Source/WebCore/html/HTMLTablePartElement.cpp
Source/WebCore/html/HTMLTableRowsCollection.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLTextAreaElement.h
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/html/HTMLTrackElement.cpp
Source/WebCore/html/HTMLTrackElement.h
Source/WebCore/html/HTMLVideoElement.cpp
Source/WebCore/html/ImageDocument.cpp
Source/WebCore/html/InputType.cpp
Source/WebCore/html/InputType.h
Source/WebCore/html/MediaDocument.cpp
Source/WebCore/html/MediaElementSession.cpp
Source/WebCore/html/NumberInputType.cpp
Source/WebCore/html/PluginDocument.cpp
Source/WebCore/html/RadioInputType.cpp
Source/WebCore/html/RadioNodeList.cpp
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/SearchInputType.cpp
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/TextFieldInputType.h
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGLFramebuffer.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp
Source/WebCore/html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/parser/HTMLFormattingElementList.cpp
Source/WebCore/html/parser/HTMLParserOptions.cpp
Source/WebCore/html/parser/HTMLParserScheduler.cpp
Source/WebCore/html/parser/HTMLTreeBuilder.cpp
Source/WebCore/html/parser/XSSAuditor.cpp
Source/WebCore/html/shadow/MediaControlElementTypes.cpp
Source/WebCore/html/shadow/MediaControlElementTypes.h
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControls.cpp
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/html/shadow/SliderThumbElement.h
Source/WebCore/html/shadow/SpinButtonElement.cpp
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/html/shadow/mac/ImageControlsButtonElementMac.cpp
Source/WebCore/html/track/LoadableTextTrack.cpp
Source/WebCore/html/track/TextTrack.cpp
Source/WebCore/html/track/TextTrackCueGeneric.cpp
Source/WebCore/html/track/VTTCue.cpp
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/loader/FormSubmission.cpp
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RenderTextControl.h
Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderThemeGtk.cpp
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/RenderVideo.cpp
Source/WebCore/svg/SVGUseElement.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.cpp
Source/WebKit/WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp
Source/WebKit/WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/DOM/DOM.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebView.cpp