Convert more creator functions to return Ref instead of PassRefPtr.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Dec 2014 07:50:20 +0000 (07:50 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Dec 2014 07:50:20 +0000 (07:50 +0000)
<https://webkit.org/b/139939>

Reviewed by Darin Adler.

Convert a slew of functions to return Ref<T> instead of PassRefPtr<T>
where the result is guaranteed to never be null.

* Modules/geolocation/Coordinates.h:
(WebCore::Coordinates::create):
(WebCore::Coordinates::isolatedCopy):
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::isolatedWorld):
* Modules/webaudio/AnalyserNode.h:
(WebCore::AnalyserNode::create):
* Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::create):
(WebCore::AudioBuffer::createFromAudioFileData):
* Modules/webaudio/AudioBuffer.h:
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::create):
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::create):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioListener.h:
(WebCore::AudioListener::create):
* Modules/webaudio/AudioParam.h:
(WebCore::AudioParam::create):
* Modules/webaudio/BiquadFilterNode.h:
(WebCore::BiquadFilterNode::create):
* Modules/webaudio/ConvolverNode.h:
(WebCore::ConvolverNode::create):
* Modules/webaudio/DelayNode.h:
(WebCore::DelayNode::create):
* Modules/webaudio/DynamicsCompressorNode.h:
(WebCore::DynamicsCompressorNode::create):
* Modules/webdatabase/ChangeVersionWrapper.h:
(WebCore::ChangeVersionWrapper::create):
* Modules/webdatabase/DatabaseAuthorizer.cpp:
(WebCore::DatabaseAuthorizer::create):
* Modules/webdatabase/DatabaseAuthorizer.h:
* Modules/webdatabase/DatabaseThread.h:
(WebCore::DatabaseThread::create):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
(WebCore::createFromNode):
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::create):
* accessibility/AccessibilityARIAGrid.h:
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::create):
* accessibility/AccessibilityARIAGridCell.h:
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::create):
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::create):
* accessibility/AccessibilityImageMapLink.h:
* accessibility/AccessibilityList.cpp:
(WebCore::AccessibilityList::create):
* accessibility/AccessibilityList.h:
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::create):
* accessibility/AccessibilityListBox.h:
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::create):
* accessibility/AccessibilityListBoxOption.h:
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControl::create):
(WebCore::AccessibilityMediaControlsContainer::create):
(WebCore::AccessibilityMediaTimeline::create):
(WebCore::AccessibilityMediaTimeDisplay::create):
* accessibility/AccessibilityMediaControls.h:
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::create):
* accessibility/AccessibilityMenuList.h:
* accessibility/AccessibilityMenuListOption.h:
* accessibility/AccessibilityMenuListPopup.h:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::create):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::create):
* accessibility/AccessibilityProgressIndicator.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::create):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySVGRoot.cpp:
(WebCore::AccessibilitySVGRoot::create):
* accessibility/AccessibilitySVGRoot.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::create):
* accessibility/AccessibilityScrollView.h:
* accessibility/AccessibilityScrollbar.cpp:
(WebCore::AccessibilityScrollbar::create):
* accessibility/AccessibilityScrollbar.h:
* accessibility/AccessibilitySearchFieldButtons.cpp:
(WebCore::AccessibilitySearchFieldCancelButton::create):
* accessibility/AccessibilitySearchFieldButtons.h:
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::create):
(WebCore::AccessibilitySliderThumb::create):
* accessibility/AccessibilitySlider.h:
* accessibility/AccessibilitySpinButton.cpp:
(WebCore::AccessibilitySpinButton::create):
(WebCore::AccessibilitySpinButtonPart::create):
* accessibility/AccessibilitySpinButton.h:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::create):
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::create):
* accessibility/AccessibilityTableCell.h:
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::create):
* accessibility/AccessibilityTableColumn.h:
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::create):
* accessibility/AccessibilityTableHeaderContainer.h:
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::create):
* accessibility/AccessibilityTableRow.h:
* bindings/js/CachedScriptSourceProvider.h:
(WebCore::CachedScriptSourceProvider::create):
* bindings/js/DOMWrapperWorld.h:
(WebCore::DOMWrapperWorld::create):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::getJSValue):
* bindings/objc/DOMCustomXPathNSResolver.h:
(WebCore::DOMCustomXPathNSResolver::create):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
* bridge/c/c_instance.h:
(JSC::Bindings::CInstance::create):
* crypto/CryptoKeyPair.h:
(WebCore::CryptoKeyPair::create):
* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.h:
* crypto/mac/CryptoKeyRSAMac.cpp:
(WebCore::CryptoKeyRSA::generatePair):
* css/DOMWindowCSS.cpp:
(WebCore::DOMWindowCSS::create):
* css/DOMWindowCSS.h:
* css/DashboardRegion.h:
(WebCore::DashboardRegion::create):
* css/FontLoader.h:
* dom/DOMError.h:
(WebCore::DOMError::create):
* dom/DOMStringList.h:
(WebCore::DOMStringList::create):
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::createForCopyAndPaste):
(WebCore::DataTransfer::createForDragAndDrop):
* dom/DataTransfer.h:
* dom/DeviceMotionData.cpp:
(WebCore::DeviceMotionData::Acceleration::create):
(WebCore::DeviceMotionData::RotationRate::create):
(WebCore::DeviceMotionData::create):
* dom/DeviceMotionData.h:
* dom/DeviceOrientationData.cpp:
(WebCore::DeviceOrientationData::create):
* dom/DeviceOrientationData.h:
* dom/DocumentMarker.cpp:
(WebCore::DocumentMarkerDescription::create):
* editing/AlternativeTextController.cpp:
(WebCore::AutocorrectionAlternativeDetails::create):
(WebCore::DictationAlternativeDetails::create):
* editing/AlternativeTextController.h:
(WebCore::DictationMarkerDetails::create):
* editing/AppendNodeCommand.h:
(WebCore::AppendNodeCommand::create):
* editing/ApplyStyleCommand.h:
(WebCore::ApplyStyleCommand::create):
* editing/BreakBlockquoteCommand.h:
(WebCore::BreakBlockquoteCommand::create):
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::create):
* editing/CompositeEditCommand.h:
* editing/CreateLinkCommand.h:
(WebCore::CreateLinkCommand::create):
* editing/DeleteFromTextNodeCommand.h:
(WebCore::DeleteFromTextNodeCommand::create):
* editing/DeleteSelectionCommand.h:
(WebCore::DeleteSelectionCommand::create):
* editing/DictationCommand.cpp:
(WebCore::DictationMarkerSupplier::create):
* editing/DictationCommand.h:
(WebCore::DictationCommand::create):
* editing/EditingStyle.h:
(WebCore::EditingStyle::create):
* editing/Editor.cpp:
(WebCore::Editor::applyStyle):
(WebCore::Editor::applyParagraphStyle):
* editing/FormatBlockCommand.h:
(WebCore::FormatBlockCommand::create):
* editing/IndentOutdentCommand.h:
(WebCore::IndentOutdentCommand::create):
* editing/InsertIntoTextNodeCommand.h:
(WebCore::InsertIntoTextNodeCommand::create):
* editing/InsertLineBreakCommand.h:
(WebCore::InsertLineBreakCommand::create):
* editing/InsertNodeBeforeCommand.h:
(WebCore::InsertNodeBeforeCommand::create):
* editing/InsertParagraphSeparatorCommand.h:
(WebCore::InsertParagraphSeparatorCommand::create):
* editing/InsertTextCommand.h:
(WebCore::InsertTextCommand::create):
(WebCore::InsertTextCommand::createWithMarkerSupplier):
* editing/MergeIdenticalElementsCommand.h:
(WebCore::MergeIdenticalElementsCommand::create):
* editing/ModifySelectionListLevel.h:
(WebCore::IncreaseSelectionListLevelCommand::create):
(WebCore::DecreaseSelectionListLevelCommand::create):
* editing/MoveSelectionCommand.h:
(WebCore::MoveSelectionCommand::create):
* editing/RemoveCSSPropertyCommand.h:
(WebCore::RemoveCSSPropertyCommand::create):
* editing/RemoveFormatCommand.h:
(WebCore::RemoveFormatCommand::create):
* editing/RemoveNodeCommand.h:
(WebCore::RemoveNodeCommand::create):
* editing/RemoveNodePreservingChildrenCommand.h:
(WebCore::RemoveNodePreservingChildrenCommand::create):
* editing/ReplaceNodeWithSpanCommand.h:
(WebCore::ReplaceNodeWithSpanCommand::create):
* editing/ReplaceSelectionCommand.h:
(WebCore::ReplaceSelectionCommand::create):
* editing/SetNodeAttributeCommand.h:
(WebCore::SetNodeAttributeCommand::create):
* editing/SetSelectionCommand.h:
(WebCore::SetSelectionCommand::create):
* editing/SimplifyMarkupCommand.h:
(WebCore::SimplifyMarkupCommand::create):
* editing/SpellChecker.cpp:
(WebCore::SpellCheckRequest::create):
* editing/SpellChecker.h:
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionRecordUndoCommand::create):
* editing/SpellingCorrectionCommand.h:
(WebCore::SpellingCorrectionCommand::create):
* editing/SplitElementCommand.h:
(WebCore::SplitElementCommand::create):
* editing/SplitTextNodeCommand.h:
(WebCore::SplitTextNodeCommand::create):
* editing/SplitTextNodeContainingElementCommand.h:
(WebCore::SplitTextNodeContainingElementCommand::create):
* editing/TypingCommand.h:
(WebCore::TypingCommand::create):
* editing/UnlinkCommand.h:
(WebCore::UnlinkCommand::create):
* editing/WrapContentsInDummySpanCommand.h:
(WebCore::WrapContentsInDummySpanCommand::create):
* editing/ios/DictationCommandIOS.h:
(WebCore::DictationCommandIOS::create):
* fileapi/Blob.h:
(WebCore::Blob::create):
(WebCore::Blob::deserialize):
(WebCore::Blob::slice):
* fileapi/File.h:
* fileapi/FileList.h:
(WebCore::FileList::create):
* fileapi/FileReader.cpp:
(WebCore::FileReader::create):
* fileapi/FileReader.h:
* fileapi/FileReaderSync.h:
(WebCore::FileReaderSync::create):
* history/BackForwardList.h:
(WebCore::BackForwardList::create):
* history/HistoryItem.h:
(WebCore::HistoryItem::create):
* html/DOMURL.cpp:
(WebCore::DOMURL::create):
* html/DOMURL.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::plugInImageElementIsolatedWorld):
* html/canvas/CanvasGradient.h:
(WebCore::CanvasGradient::create):
* html/canvas/CanvasPattern.cpp:
(WebCore::CanvasPattern::create):
* html/canvas/CanvasPattern.h:
* html/canvas/DOMPath.h:
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::create):
* html/shadow/DetailsMarkerControl.h:
* html/track/AudioTrack.h:
* html/track/AudioTrackList.h:
* html/track/DataCue.h:
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::create):
* inspector/CommandLineAPIHost.h:
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::create):
* loader/FormState.cpp:
(WebCore::FormState::create):
* loader/FormState.h:
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* loader/FormSubmission.h:
* loader/TextResourceDecoder.h:
(WebCore::TextResourceDecoder::create):
* loader/ThreadableLoaderClientWrapper.h:
(WebCore::ThreadableLoaderClientWrapper::create):
* loader/WorkerThreadableLoader.h:
(WebCore::WorkerThreadableLoader::create):
* loader/appcache/ApplicationCache.h:
(WebCore::ApplicationCache::create):
* loader/appcache/ApplicationCacheResource.h:
(WebCore::ApplicationCacheResource::create):
* loader/appcache/DOMApplicationCache.h:
* loader/archive/ArchiveResource.cpp:
(WebCore::ArchiveResource::create):
* loader/archive/ArchiveResource.h:
* loader/icon/IconDatabaseBase.h:
(WebCore::EnumCallback::create):
(WebCore::ObjectCallback::create):
* loader/icon/IconRecord.h:
(WebCore::IconRecord::create):
* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::create):
* mathml/MathMLInlineContainerElement.h:
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::create):
* mathml/MathMLMathElement.h:
* mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::create):
* mathml/MathMLMencloseElement.h:
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::create):
* mathml/MathMLSelectElement.h:
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::create):
* mathml/MathMLTextElement.h:
* page/BarProp.h:
(WebCore::BarProp::create):
* page/Crypto.h:
(WebCore::Crypto::create):
* page/DOMSecurityPolicy.h:
(WebCore::DOMSecurityPolicy::create):
* page/DOMSelection.h:
(WebCore::DOMSelection::create):
* page/DOMWindow.h:
* page/DOMWindowExtension.h:
(WebCore::DOMWindowExtension::create):
* page/FrameView.cpp:
(WebCore::FrameView::create):
* page/FrameView.h:
* page/animation/CompositeAnimation.h:
(WebCore::CompositeAnimation::create):
* page/scrolling/AsyncScrollingCoordinator.h:
* platform/Cursor.h:
(WebCore::SharedCursor::create):
* platform/FileChooser.cpp:
(WebCore::FileChooser::create):
* platform/FileChooser.h:
* platform/animation/Animation.h:
(WebCore::Animation::create):
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::create):
(WebCore::AudioBus::createBufferFromRange):
(WebCore::AudioBus::createBySampleRateConverting):
(WebCore::AudioBus::createByMixingToMono):
* platform/audio/AudioBus.h:
* platform/audio/AudioHardwareListener.cpp:
(WebCore::AudioHardwareListener::create):
* platform/audio/AudioHardwareListener.h:
* platform/audio/mac/AudioHardwareListenerMac.cpp:
(WebCore::AudioHardwareListener::create):
(WebCore::AudioHardwareListenerMac::create):
* platform/audio/mac/AudioHardwareListenerMac.h:
* platform/graphics/AudioTrackPrivate.h:
(WebCore::AudioTrackPrivate::create):
* platform/graphics/BitmapImage.h:
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/FontFeatureSettings.h:
(WebCore::FontFeatureSettings::create):
* platform/graphics/Image.cpp:
(WebCore::Image::nullImage):
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::create):
* platform/graphics/filters/DistantLightSource.h:
(WebCore::DistantLightSource::create):
* platform/graphics/filters/FEBlend.cpp:
(WebCore::FEBlend::create):
* platform/graphics/filters/FEBlend.h:
* platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::create):
* platform/graphics/filters/FEColorMatrix.h:
* platform/graphics/filters/FEComponentTransfer.cpp:
(WebCore::FEComponentTransfer::create):
* platform/graphics/filters/FEComponentTransfer.h:
* platform/graphics/filters/FEComposite.cpp:
(WebCore::FEComposite::create):
* platform/graphics/filters/FEComposite.h:
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::create):
* platform/graphics/filters/FEConvolveMatrix.h:
* platform/graphics/filters/FEDiffuseLighting.cpp:
(WebCore::FEDiffuseLighting::create):
* platform/graphics/filters/FEDiffuseLighting.h:
* platform/graphics/filters/FEDisplacementMap.cpp:
(WebCore::FEDisplacementMap::create):
* platform/graphics/filters/FEDisplacementMap.h:
* platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::create):
* platform/graphics/filters/FEDropShadow.h:
* platform/graphics/filters/FEFlood.cpp:
(WebCore::FEFlood::create):
* platform/graphics/filters/FEFlood.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::create):
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FEMerge.cpp:
(WebCore::FEMerge::create):
* platform/graphics/filters/FEMerge.h:
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::create):
* platform/graphics/filters/FEMorphology.h:
* platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::create):
* platform/graphics/filters/FEOffset.h:
* platform/graphics/filters/FESpecularLighting.cpp:
(WebCore::FESpecularLighting::create):
* platform/graphics/filters/FESpecularLighting.h:
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::create):
* platform/graphics/filters/FETile.h:
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::create):
* platform/graphics/filters/FETurbulence.h:
* platform/graphics/ios/DisplayRefreshMonitorIOS.h:
(WebCore::DisplayRefreshMonitorIOS::create):
* platform/graphics/mac/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::create):
* platform/network/BlobData.h:
(WebCore::RawData::create):
(WebCore::BlobData::create):
* platform/network/BlobDataFileReference.h:
(WebCore::BlobDataFileReference::create):
* platform/network/cf/FormDataStreamCFNet.cpp:
* platform/text/BidiContext.cpp:
(WebCore::BidiContext::createUncached):
(WebCore::BidiContext::create):
* platform/text/BidiContext.h:
* plugins/DOMMimeType.h:
(WebCore::DOMMimeType::create):
* plugins/DOMMimeTypeArray.cpp:
(WebCore::DOMMimeTypeArray::item):
(WebCore::DOMMimeTypeArray::namedItem):
* plugins/DOMMimeTypeArray.h:
(WebCore::DOMMimeTypeArray::create):
* plugins/DOMPlugin.cpp:
(WebCore::DOMPlugin::item):
(WebCore::DOMPlugin::namedItem):
* plugins/DOMPlugin.h:
(WebCore::DOMPlugin::create):
* plugins/DOMPluginArray.cpp:
(WebCore::DOMPluginArray::item):
(WebCore::DOMPluginArray::namedItem):
* plugins/DOMPluginArray.h:
(WebCore::DOMPluginArray::create):
* plugins/PluginData.h:
(WebCore::PluginData::create):
* rendering/ClipPathOperation.h:
* rendering/CounterNode.cpp:
(WebCore::CounterNode::create):
* rendering/CounterNode.h:
* rendering/style/BasicShapes.h:
* rendering/style/CursorList.h:
(WebCore::CursorList::create):
* replay/CapturingInputCursor.cpp:
(WebCore::CapturingInputCursor::create):
* replay/CapturingInputCursor.h:
* storage/Storage.cpp:
(WebCore::Storage::create):
* storage/Storage.h:
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::create):
* storage/StorageAreaImpl.h:
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::create):
* storage/StorageAreaSync.h:
* storage/StorageMap.cpp:
(WebCore::StorageMap::create):
* storage/StorageMap.h:
* storage/StorageSyncManager.cpp:
(WebCore::StorageSyncManager::create):
* storage/StorageSyncManager.h:
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::create):
* workers/DedicatedWorkerGlobalScope.h:
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::create):
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
* workers/DedicatedWorkerThread.h:
* workers/DefaultSharedWorkerRepository.cpp:
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::SharedWorkerGlobalScope::create):
* workers/SharedWorkerGlobalScope.h:
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::create):
(WebCore::SharedWorkerThread::createWorkerGlobalScope):
* workers/SharedWorkerThread.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts):
* workers/WorkerLocation.h:
(WebCore::WorkerLocation::create):
* workers/WorkerScriptLoader.h:
(WebCore::WorkerScriptLoader::create):
* workers/WorkerThread.h:
* xml/DOMParser.h:
(WebCore::DOMParser::create):
* xml/NativeXPathNSResolver.h:
(WebCore::NativeXPathNSResolver::create):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::create):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
(WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
* xml/XMLSerializer.h:
(WebCore::XMLSerializer::create):
* xml/XPathEvaluator.h:
(WebCore::XPathEvaluator::create):
* xml/XPathResult.h:
(WebCore::XPathResult::create):
* xml/XSLStyleSheet.h:
* xml/XSLTProcessor.h:
(WebCore::XSLTProcessor::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177733 268f45cc-cd09-0410-ab3c-d52691b4dbfc

304 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/geolocation/Coordinates.h
Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp
Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.cpp
Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.cpp
Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm
Source/WebCore/Modules/webaudio/AnalyserNode.h
Source/WebCore/Modules/webaudio/AudioBuffer.cpp
Source/WebCore/Modules/webaudio/AudioBuffer.h
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/Modules/webaudio/AudioContext.h
Source/WebCore/Modules/webaudio/AudioListener.h
Source/WebCore/Modules/webaudio/AudioParam.h
Source/WebCore/Modules/webaudio/BiquadFilterNode.h
Source/WebCore/Modules/webaudio/ConvolverNode.h
Source/WebCore/Modules/webaudio/DelayNode.h
Source/WebCore/Modules/webaudio/DynamicsCompressorNode.h
Source/WebCore/Modules/webdatabase/ChangeVersionWrapper.h
Source/WebCore/Modules/webdatabase/DatabaseAuthorizer.cpp
Source/WebCore/Modules/webdatabase/DatabaseAuthorizer.h
Source/WebCore/Modules/webdatabase/DatabaseThread.h
Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AccessibilityARIAGrid.cpp
Source/WebCore/accessibility/AccessibilityARIAGrid.h
Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp
Source/WebCore/accessibility/AccessibilityARIAGridCell.h
Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp
Source/WebCore/accessibility/AccessibilityARIAGridRow.h
Source/WebCore/accessibility/AccessibilityImageMapLink.cpp
Source/WebCore/accessibility/AccessibilityImageMapLink.h
Source/WebCore/accessibility/AccessibilityList.cpp
Source/WebCore/accessibility/AccessibilityList.h
Source/WebCore/accessibility/AccessibilityListBox.cpp
Source/WebCore/accessibility/AccessibilityListBox.h
Source/WebCore/accessibility/AccessibilityListBoxOption.cpp
Source/WebCore/accessibility/AccessibilityListBoxOption.h
Source/WebCore/accessibility/AccessibilityMediaControls.cpp
Source/WebCore/accessibility/AccessibilityMediaControls.h
Source/WebCore/accessibility/AccessibilityMenuList.cpp
Source/WebCore/accessibility/AccessibilityMenuList.h
Source/WebCore/accessibility/AccessibilityMenuListOption.h
Source/WebCore/accessibility/AccessibilityMenuListPopup.h
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityNodeObject.h
Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp
Source/WebCore/accessibility/AccessibilityProgressIndicator.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/accessibility/AccessibilitySVGRoot.cpp
Source/WebCore/accessibility/AccessibilitySVGRoot.h
Source/WebCore/accessibility/AccessibilityScrollView.cpp
Source/WebCore/accessibility/AccessibilityScrollView.h
Source/WebCore/accessibility/AccessibilityScrollbar.cpp
Source/WebCore/accessibility/AccessibilityScrollbar.h
Source/WebCore/accessibility/AccessibilitySearchFieldButtons.cpp
Source/WebCore/accessibility/AccessibilitySearchFieldButtons.h
Source/WebCore/accessibility/AccessibilitySlider.cpp
Source/WebCore/accessibility/AccessibilitySlider.h
Source/WebCore/accessibility/AccessibilitySpinButton.cpp
Source/WebCore/accessibility/AccessibilitySpinButton.h
Source/WebCore/accessibility/AccessibilityTable.cpp
Source/WebCore/accessibility/AccessibilityTable.h
Source/WebCore/accessibility/AccessibilityTableCell.cpp
Source/WebCore/accessibility/AccessibilityTableCell.h
Source/WebCore/accessibility/AccessibilityTableColumn.cpp
Source/WebCore/accessibility/AccessibilityTableColumn.h
Source/WebCore/accessibility/AccessibilityTableHeaderContainer.cpp
Source/WebCore/accessibility/AccessibilityTableHeaderContainer.h
Source/WebCore/accessibility/AccessibilityTableRow.cpp
Source/WebCore/accessibility/AccessibilityTableRow.h
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Source/WebCore/bindings/js/CachedScriptSourceProvider.h
Source/WebCore/bindings/js/DOMWrapperWorld.h
Source/WebCore/bindings/js/SerializedScriptValue.cpp
Source/WebCore/bindings/objc/DOMCustomXPathNSResolver.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bridge/c/c_instance.h
Source/WebCore/crypto/CryptoKeyPair.h
Source/WebCore/crypto/keys/CryptoKeyAES.h
Source/WebCore/crypto/keys/CryptoKeyHMAC.h
Source/WebCore/crypto/keys/CryptoKeyRSA.h
Source/WebCore/crypto/mac/CryptoKeyRSAMac.cpp
Source/WebCore/css/DOMWindowCSS.cpp
Source/WebCore/css/DOMWindowCSS.h
Source/WebCore/css/DashboardRegion.h
Source/WebCore/css/FontLoader.h
Source/WebCore/dom/DOMError.h
Source/WebCore/dom/DOMStringList.h
Source/WebCore/dom/DataTransfer.cpp
Source/WebCore/dom/DataTransfer.h
Source/WebCore/dom/DeviceMotionData.cpp
Source/WebCore/dom/DeviceMotionData.h
Source/WebCore/dom/DeviceOrientationData.cpp
Source/WebCore/dom/DeviceOrientationData.h
Source/WebCore/dom/DocumentMarker.cpp
Source/WebCore/editing/AlternativeTextController.cpp
Source/WebCore/editing/AlternativeTextController.h
Source/WebCore/editing/AppendNodeCommand.h
Source/WebCore/editing/ApplyStyleCommand.h
Source/WebCore/editing/BreakBlockquoteCommand.h
Source/WebCore/editing/CompositeEditCommand.cpp
Source/WebCore/editing/CompositeEditCommand.h
Source/WebCore/editing/CreateLinkCommand.h
Source/WebCore/editing/DeleteFromTextNodeCommand.h
Source/WebCore/editing/DeleteSelectionCommand.h
Source/WebCore/editing/DictationCommand.cpp
Source/WebCore/editing/DictationCommand.h
Source/WebCore/editing/EditingStyle.h
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/FormatBlockCommand.h
Source/WebCore/editing/IndentOutdentCommand.h
Source/WebCore/editing/InsertIntoTextNodeCommand.h
Source/WebCore/editing/InsertLineBreakCommand.h
Source/WebCore/editing/InsertNodeBeforeCommand.h
Source/WebCore/editing/InsertParagraphSeparatorCommand.h
Source/WebCore/editing/InsertTextCommand.h
Source/WebCore/editing/MergeIdenticalElementsCommand.h
Source/WebCore/editing/ModifySelectionListLevel.h
Source/WebCore/editing/MoveSelectionCommand.h
Source/WebCore/editing/RemoveCSSPropertyCommand.h
Source/WebCore/editing/RemoveFormatCommand.h
Source/WebCore/editing/RemoveNodeCommand.h
Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h
Source/WebCore/editing/ReplaceNodeWithSpanCommand.h
Source/WebCore/editing/ReplaceSelectionCommand.h
Source/WebCore/editing/SetNodeAttributeCommand.h
Source/WebCore/editing/SetSelectionCommand.h
Source/WebCore/editing/SimplifyMarkupCommand.h
Source/WebCore/editing/SpellChecker.cpp
Source/WebCore/editing/SpellChecker.h
Source/WebCore/editing/SpellingCorrectionCommand.cpp
Source/WebCore/editing/SpellingCorrectionCommand.h
Source/WebCore/editing/SplitElementCommand.h
Source/WebCore/editing/SplitTextNodeCommand.h
Source/WebCore/editing/SplitTextNodeContainingElementCommand.h
Source/WebCore/editing/TypingCommand.h
Source/WebCore/editing/UnlinkCommand.h
Source/WebCore/editing/WrapContentsInDummySpanCommand.h
Source/WebCore/editing/ios/DictationCommandIOS.h
Source/WebCore/fileapi/Blob.h
Source/WebCore/fileapi/File.h
Source/WebCore/fileapi/FileList.h
Source/WebCore/fileapi/FileReader.cpp
Source/WebCore/fileapi/FileReader.h
Source/WebCore/fileapi/FileReaderSync.h
Source/WebCore/history/BackForwardList.h
Source/WebCore/history/HistoryItem.h
Source/WebCore/html/DOMURL.cpp
Source/WebCore/html/DOMURL.h
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/canvas/CanvasGradient.h
Source/WebCore/html/canvas/CanvasPattern.cpp
Source/WebCore/html/canvas/CanvasPattern.h
Source/WebCore/html/canvas/DOMPath.h
Source/WebCore/html/shadow/DetailsMarkerControl.cpp
Source/WebCore/html/shadow/DetailsMarkerControl.h
Source/WebCore/html/track/AudioTrack.h
Source/WebCore/html/track/AudioTrackList.h
Source/WebCore/html/track/DataCue.h
Source/WebCore/inspector/CommandLineAPIHost.cpp
Source/WebCore/inspector/CommandLineAPIHost.h
Source/WebCore/loader/DocumentLoader.h
Source/WebCore/loader/FormState.cpp
Source/WebCore/loader/FormState.h
Source/WebCore/loader/FormSubmission.cpp
Source/WebCore/loader/FormSubmission.h
Source/WebCore/loader/TextResourceDecoder.h
Source/WebCore/loader/ThreadableLoaderClientWrapper.h
Source/WebCore/loader/WorkerThreadableLoader.h
Source/WebCore/loader/appcache/ApplicationCache.h
Source/WebCore/loader/appcache/ApplicationCacheResource.h
Source/WebCore/loader/appcache/DOMApplicationCache.h
Source/WebCore/loader/archive/ArchiveResource.cpp
Source/WebCore/loader/archive/ArchiveResource.h
Source/WebCore/loader/icon/IconDatabaseBase.h
Source/WebCore/loader/icon/IconRecord.h
Source/WebCore/mathml/MathMLInlineContainerElement.cpp
Source/WebCore/mathml/MathMLInlineContainerElement.h
Source/WebCore/mathml/MathMLMathElement.cpp
Source/WebCore/mathml/MathMLMathElement.h
Source/WebCore/mathml/MathMLMencloseElement.cpp
Source/WebCore/mathml/MathMLMencloseElement.h
Source/WebCore/mathml/MathMLSelectElement.cpp
Source/WebCore/mathml/MathMLSelectElement.h
Source/WebCore/mathml/MathMLTextElement.cpp
Source/WebCore/mathml/MathMLTextElement.h
Source/WebCore/page/BarProp.h
Source/WebCore/page/Crypto.h
Source/WebCore/page/DOMSecurityPolicy.h
Source/WebCore/page/DOMSelection.h
Source/WebCore/page/DOMWindow.h
Source/WebCore/page/DOMWindowExtension.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/page/animation/CompositeAnimation.h
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
Source/WebCore/platform/Cursor.h
Source/WebCore/platform/FileChooser.cpp
Source/WebCore/platform/FileChooser.h
Source/WebCore/platform/animation/Animation.h
Source/WebCore/platform/audio/AudioBus.cpp
Source/WebCore/platform/audio/AudioBus.h
Source/WebCore/platform/audio/AudioHardwareListener.cpp
Source/WebCore/platform/audio/AudioHardwareListener.h
Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp
Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.h
Source/WebCore/platform/graphics/AudioTrackPrivate.h
Source/WebCore/platform/graphics/BitmapImage.h
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h
Source/WebCore/platform/graphics/FontFeatureSettings.h
Source/WebCore/platform/graphics/Image.cpp
Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h
Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm
Source/WebCore/platform/graphics/filters/DistantLightSource.h
Source/WebCore/platform/graphics/filters/FEBlend.cpp
Source/WebCore/platform/graphics/filters/FEBlend.h
Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp
Source/WebCore/platform/graphics/filters/FEColorMatrix.h
Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp
Source/WebCore/platform/graphics/filters/FEComponentTransfer.h
Source/WebCore/platform/graphics/filters/FEComposite.cpp
Source/WebCore/platform/graphics/filters/FEComposite.h
Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp
Source/WebCore/platform/graphics/filters/FEConvolveMatrix.h
Source/WebCore/platform/graphics/filters/FEDiffuseLighting.cpp
Source/WebCore/platform/graphics/filters/FEDiffuseLighting.h
Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp
Source/WebCore/platform/graphics/filters/FEDisplacementMap.h
Source/WebCore/platform/graphics/filters/FEDropShadow.cpp
Source/WebCore/platform/graphics/filters/FEDropShadow.h
Source/WebCore/platform/graphics/filters/FEFlood.cpp
Source/WebCore/platform/graphics/filters/FEFlood.h
Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp
Source/WebCore/platform/graphics/filters/FEGaussianBlur.h
Source/WebCore/platform/graphics/filters/FEMerge.cpp
Source/WebCore/platform/graphics/filters/FEMerge.h
Source/WebCore/platform/graphics/filters/FEMorphology.cpp
Source/WebCore/platform/graphics/filters/FEMorphology.h
Source/WebCore/platform/graphics/filters/FEOffset.cpp
Source/WebCore/platform/graphics/filters/FEOffset.h
Source/WebCore/platform/graphics/filters/FESpecularLighting.cpp
Source/WebCore/platform/graphics/filters/FESpecularLighting.h
Source/WebCore/platform/graphics/filters/FETile.cpp
Source/WebCore/platform/graphics/filters/FETile.h
Source/WebCore/platform/graphics/filters/FETurbulence.cpp
Source/WebCore/platform/graphics/filters/FETurbulence.h
Source/WebCore/platform/graphics/ios/DisplayRefreshMonitorIOS.h
Source/WebCore/platform/graphics/mac/ComplexTextController.h
Source/WebCore/platform/network/BlobData.h
Source/WebCore/platform/network/BlobDataFileReference.h
Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp
Source/WebCore/platform/text/BidiContext.cpp
Source/WebCore/platform/text/BidiContext.h
Source/WebCore/plugins/DOMMimeType.h
Source/WebCore/plugins/DOMMimeTypeArray.cpp
Source/WebCore/plugins/DOMMimeTypeArray.h
Source/WebCore/plugins/DOMPlugin.cpp
Source/WebCore/plugins/DOMPlugin.h
Source/WebCore/plugins/DOMPluginArray.cpp
Source/WebCore/plugins/DOMPluginArray.h
Source/WebCore/plugins/PluginData.h
Source/WebCore/rendering/ClipPathOperation.h
Source/WebCore/rendering/CounterNode.cpp
Source/WebCore/rendering/CounterNode.h
Source/WebCore/rendering/style/BasicShapes.h
Source/WebCore/rendering/style/CursorList.h
Source/WebCore/replay/CapturingInputCursor.cpp
Source/WebCore/replay/CapturingInputCursor.h
Source/WebCore/storage/Storage.cpp
Source/WebCore/storage/Storage.h
Source/WebCore/storage/StorageAreaImpl.cpp
Source/WebCore/storage/StorageAreaImpl.h
Source/WebCore/storage/StorageAreaSync.cpp
Source/WebCore/storage/StorageAreaSync.h
Source/WebCore/storage/StorageMap.cpp
Source/WebCore/storage/StorageMap.h
Source/WebCore/storage/StorageSyncManager.cpp
Source/WebCore/storage/StorageSyncManager.h
Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp
Source/WebCore/workers/DedicatedWorkerGlobalScope.h
Source/WebCore/workers/DedicatedWorkerThread.cpp
Source/WebCore/workers/DedicatedWorkerThread.h
Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
Source/WebCore/workers/SharedWorkerGlobalScope.cpp
Source/WebCore/workers/SharedWorkerGlobalScope.h
Source/WebCore/workers/SharedWorkerThread.cpp
Source/WebCore/workers/SharedWorkerThread.h
Source/WebCore/workers/WorkerGlobalScope.cpp
Source/WebCore/workers/WorkerLocation.h
Source/WebCore/workers/WorkerScriptLoader.h
Source/WebCore/workers/WorkerThread.h
Source/WebCore/xml/DOMParser.h
Source/WebCore/xml/NativeXPathNSResolver.h
Source/WebCore/xml/XMLHttpRequest.cpp
Source/WebCore/xml/XMLHttpRequest.h
Source/WebCore/xml/XMLHttpRequestProgressEventThrottle.cpp
Source/WebCore/xml/XMLSerializer.h
Source/WebCore/xml/XPathEvaluator.h
Source/WebCore/xml/XPathResult.h
Source/WebCore/xml/XSLStyleSheet.h
Source/WebCore/xml/XSLTProcessor.h

index ac3afc0..aeacbeb 100644 (file)
@@ -1,3 +1,538 @@
+2014-12-24  Andreas Kling  <akling@apple.com>
+
+        Convert more creator functions to return Ref instead of PassRefPtr.
+        <https://webkit.org/b/139939>
+
+        Reviewed by Darin Adler.
+
+        Convert a slew of functions to return Ref<T> instead of PassRefPtr<T>
+        where the result is guaranteed to never be null.
+
+        * Modules/geolocation/Coordinates.h:
+        (WebCore::Coordinates::create):
+        (WebCore::Coordinates::isolatedCopy):
+        * Modules/plugins/QuickTimePluginReplacement.mm:
+        (WebCore::QuickTimePluginReplacement::isolatedWorld):
+        * Modules/webaudio/AnalyserNode.h:
+        (WebCore::AnalyserNode::create):
+        * Modules/webaudio/AudioBuffer.cpp:
+        (WebCore::AudioBuffer::create):
+        (WebCore::AudioBuffer::createFromAudioFileData):
+        * Modules/webaudio/AudioBuffer.h:
+        * Modules/webaudio/AudioBufferSourceNode.cpp:
+        (WebCore::AudioBufferSourceNode::create):
+        * Modules/webaudio/AudioBufferSourceNode.h:
+        * Modules/webaudio/AudioContext.cpp:
+        (WebCore::AudioContext::create):
+        * Modules/webaudio/AudioContext.h:
+        * Modules/webaudio/AudioListener.h:
+        (WebCore::AudioListener::create):
+        * Modules/webaudio/AudioParam.h:
+        (WebCore::AudioParam::create):
+        * Modules/webaudio/BiquadFilterNode.h:
+        (WebCore::BiquadFilterNode::create):
+        * Modules/webaudio/ConvolverNode.h:
+        (WebCore::ConvolverNode::create):
+        * Modules/webaudio/DelayNode.h:
+        (WebCore::DelayNode::create):
+        * Modules/webaudio/DynamicsCompressorNode.h:
+        (WebCore::DynamicsCompressorNode::create):
+        * Modules/webdatabase/ChangeVersionWrapper.h:
+        (WebCore::ChangeVersionWrapper::create):
+        * Modules/webdatabase/DatabaseAuthorizer.cpp:
+        (WebCore::DatabaseAuthorizer::create):
+        * Modules/webdatabase/DatabaseAuthorizer.h:
+        * Modules/webdatabase/DatabaseThread.h:
+        (WebCore::DatabaseThread::create):
+        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
+        (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::createFromRenderer):
+        (WebCore::createFromNode):
+        * accessibility/AccessibilityARIAGrid.cpp:
+        (WebCore::AccessibilityARIAGrid::create):
+        * accessibility/AccessibilityARIAGrid.h:
+        * accessibility/AccessibilityARIAGridCell.cpp:
+        (WebCore::AccessibilityARIAGridCell::create):
+        * accessibility/AccessibilityARIAGridCell.h:
+        * accessibility/AccessibilityARIAGridRow.cpp:
+        (WebCore::AccessibilityARIAGridRow::create):
+        * accessibility/AccessibilityARIAGridRow.h:
+        * accessibility/AccessibilityImageMapLink.cpp:
+        (WebCore::AccessibilityImageMapLink::create):
+        * accessibility/AccessibilityImageMapLink.h:
+        * accessibility/AccessibilityList.cpp:
+        (WebCore::AccessibilityList::create):
+        * accessibility/AccessibilityList.h:
+        * accessibility/AccessibilityListBox.cpp:
+        (WebCore::AccessibilityListBox::create):
+        * accessibility/AccessibilityListBox.h:
+        * accessibility/AccessibilityListBoxOption.cpp:
+        (WebCore::AccessibilityListBoxOption::create):
+        * accessibility/AccessibilityListBoxOption.h:
+        * accessibility/AccessibilityMediaControls.cpp:
+        (WebCore::AccessibilityMediaControl::create):
+        (WebCore::AccessibilityMediaControlsContainer::create):
+        (WebCore::AccessibilityMediaTimeline::create):
+        (WebCore::AccessibilityMediaTimeDisplay::create):
+        * accessibility/AccessibilityMediaControls.h:
+        * accessibility/AccessibilityMenuList.cpp:
+        (WebCore::AccessibilityMenuList::create):
+        * accessibility/AccessibilityMenuList.h:
+        * accessibility/AccessibilityMenuListOption.h:
+        * accessibility/AccessibilityMenuListPopup.h:
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::create):
+        * accessibility/AccessibilityNodeObject.h:
+        * accessibility/AccessibilityProgressIndicator.cpp:
+        (WebCore::AccessibilityProgressIndicator::create):
+        * accessibility/AccessibilityProgressIndicator.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::create):
+        * accessibility/AccessibilityRenderObject.h:
+        * accessibility/AccessibilitySVGRoot.cpp:
+        (WebCore::AccessibilitySVGRoot::create):
+        * accessibility/AccessibilitySVGRoot.h:
+        * accessibility/AccessibilityScrollView.cpp:
+        (WebCore::AccessibilityScrollView::create):
+        * accessibility/AccessibilityScrollView.h:
+        * accessibility/AccessibilityScrollbar.cpp:
+        (WebCore::AccessibilityScrollbar::create):
+        * accessibility/AccessibilityScrollbar.h:
+        * accessibility/AccessibilitySearchFieldButtons.cpp:
+        (WebCore::AccessibilitySearchFieldCancelButton::create):
+        * accessibility/AccessibilitySearchFieldButtons.h:
+        * accessibility/AccessibilitySlider.cpp:
+        (WebCore::AccessibilitySlider::create):
+        (WebCore::AccessibilitySliderThumb::create):
+        * accessibility/AccessibilitySlider.h:
+        * accessibility/AccessibilitySpinButton.cpp:
+        (WebCore::AccessibilitySpinButton::create):
+        (WebCore::AccessibilitySpinButtonPart::create):
+        * accessibility/AccessibilitySpinButton.h:
+        * accessibility/AccessibilityTable.cpp:
+        (WebCore::AccessibilityTable::create):
+        * accessibility/AccessibilityTable.h:
+        * accessibility/AccessibilityTableCell.cpp:
+        (WebCore::AccessibilityTableCell::create):
+        * accessibility/AccessibilityTableCell.h:
+        * accessibility/AccessibilityTableColumn.cpp:
+        (WebCore::AccessibilityTableColumn::create):
+        * accessibility/AccessibilityTableColumn.h:
+        * accessibility/AccessibilityTableHeaderContainer.cpp:
+        (WebCore::AccessibilityTableHeaderContainer::create):
+        * accessibility/AccessibilityTableHeaderContainer.h:
+        * accessibility/AccessibilityTableRow.cpp:
+        (WebCore::AccessibilityTableRow::create):
+        * accessibility/AccessibilityTableRow.h:
+        * bindings/js/CachedScriptSourceProvider.h:
+        (WebCore::CachedScriptSourceProvider::create):
+        * bindings/js/DOMWrapperWorld.h:
+        (WebCore::DOMWrapperWorld::create):
+        * bindings/js/SerializedScriptValue.cpp:
+        (WebCore::CloneDeserializer::getJSValue):
+        * bindings/objc/DOMCustomXPathNSResolver.h:
+        (WebCore::DOMCustomXPathNSResolver::create):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateCallbackHeader):
+        * bridge/c/c_instance.h:
+        (JSC::Bindings::CInstance::create):
+        * crypto/CryptoKeyPair.h:
+        (WebCore::CryptoKeyPair::create):
+        * crypto/keys/CryptoKeyAES.h:
+        * crypto/keys/CryptoKeyHMAC.h:
+        * crypto/keys/CryptoKeyRSA.h:
+        * crypto/mac/CryptoKeyRSAMac.cpp:
+        (WebCore::CryptoKeyRSA::generatePair):
+        * css/DOMWindowCSS.cpp:
+        (WebCore::DOMWindowCSS::create):
+        * css/DOMWindowCSS.h:
+        * css/DashboardRegion.h:
+        (WebCore::DashboardRegion::create):
+        * css/FontLoader.h:
+        * dom/DOMError.h:
+        (WebCore::DOMError::create):
+        * dom/DOMStringList.h:
+        (WebCore::DOMStringList::create):
+        * dom/DataTransfer.cpp:
+        (WebCore::DataTransfer::createForCopyAndPaste):
+        (WebCore::DataTransfer::createForDragAndDrop):
+        * dom/DataTransfer.h:
+        * dom/DeviceMotionData.cpp:
+        (WebCore::DeviceMotionData::Acceleration::create):
+        (WebCore::DeviceMotionData::RotationRate::create):
+        (WebCore::DeviceMotionData::create):
+        * dom/DeviceMotionData.h:
+        * dom/DeviceOrientationData.cpp:
+        (WebCore::DeviceOrientationData::create):
+        * dom/DeviceOrientationData.h:
+        * dom/DocumentMarker.cpp:
+        (WebCore::DocumentMarkerDescription::create):
+        * editing/AlternativeTextController.cpp:
+        (WebCore::AutocorrectionAlternativeDetails::create):
+        (WebCore::DictationAlternativeDetails::create):
+        * editing/AlternativeTextController.h:
+        (WebCore::DictationMarkerDetails::create):
+        * editing/AppendNodeCommand.h:
+        (WebCore::AppendNodeCommand::create):
+        * editing/ApplyStyleCommand.h:
+        (WebCore::ApplyStyleCommand::create):
+        * editing/BreakBlockquoteCommand.h:
+        (WebCore::BreakBlockquoteCommand::create):
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::EditCommandComposition::create):
+        * editing/CompositeEditCommand.h:
+        * editing/CreateLinkCommand.h:
+        (WebCore::CreateLinkCommand::create):
+        * editing/DeleteFromTextNodeCommand.h:
+        (WebCore::DeleteFromTextNodeCommand::create):
+        * editing/DeleteSelectionCommand.h:
+        (WebCore::DeleteSelectionCommand::create):
+        * editing/DictationCommand.cpp:
+        (WebCore::DictationMarkerSupplier::create):
+        * editing/DictationCommand.h:
+        (WebCore::DictationCommand::create):
+        * editing/EditingStyle.h:
+        (WebCore::EditingStyle::create):
+        * editing/Editor.cpp:
+        (WebCore::Editor::applyStyle):
+        (WebCore::Editor::applyParagraphStyle):
+        * editing/FormatBlockCommand.h:
+        (WebCore::FormatBlockCommand::create):
+        * editing/IndentOutdentCommand.h:
+        (WebCore::IndentOutdentCommand::create):
+        * editing/InsertIntoTextNodeCommand.h:
+        (WebCore::InsertIntoTextNodeCommand::create):
+        * editing/InsertLineBreakCommand.h:
+        (WebCore::InsertLineBreakCommand::create):
+        * editing/InsertNodeBeforeCommand.h:
+        (WebCore::InsertNodeBeforeCommand::create):
+        * editing/InsertParagraphSeparatorCommand.h:
+        (WebCore::InsertParagraphSeparatorCommand::create):
+        * editing/InsertTextCommand.h:
+        (WebCore::InsertTextCommand::create):
+        (WebCore::InsertTextCommand::createWithMarkerSupplier):
+        * editing/MergeIdenticalElementsCommand.h:
+        (WebCore::MergeIdenticalElementsCommand::create):
+        * editing/ModifySelectionListLevel.h:
+        (WebCore::IncreaseSelectionListLevelCommand::create):
+        (WebCore::DecreaseSelectionListLevelCommand::create):
+        * editing/MoveSelectionCommand.h:
+        (WebCore::MoveSelectionCommand::create):
+        * editing/RemoveCSSPropertyCommand.h:
+        (WebCore::RemoveCSSPropertyCommand::create):
+        * editing/RemoveFormatCommand.h:
+        (WebCore::RemoveFormatCommand::create):
+        * editing/RemoveNodeCommand.h:
+        (WebCore::RemoveNodeCommand::create):
+        * editing/RemoveNodePreservingChildrenCommand.h:
+        (WebCore::RemoveNodePreservingChildrenCommand::create):
+        * editing/ReplaceNodeWithSpanCommand.h:
+        (WebCore::ReplaceNodeWithSpanCommand::create):
+        * editing/ReplaceSelectionCommand.h:
+        (WebCore::ReplaceSelectionCommand::create):
+        * editing/SetNodeAttributeCommand.h:
+        (WebCore::SetNodeAttributeCommand::create):
+        * editing/SetSelectionCommand.h:
+        (WebCore::SetSelectionCommand::create):
+        * editing/SimplifyMarkupCommand.h:
+        (WebCore::SimplifyMarkupCommand::create):
+        * editing/SpellChecker.cpp:
+        (WebCore::SpellCheckRequest::create):
+        * editing/SpellChecker.h:
+        * editing/SpellingCorrectionCommand.cpp:
+        (WebCore::SpellingCorrectionRecordUndoCommand::create):
+        * editing/SpellingCorrectionCommand.h:
+        (WebCore::SpellingCorrectionCommand::create):
+        * editing/SplitElementCommand.h:
+        (WebCore::SplitElementCommand::create):
+        * editing/SplitTextNodeCommand.h:
+        (WebCore::SplitTextNodeCommand::create):
+        * editing/SplitTextNodeContainingElementCommand.h:
+        (WebCore::SplitTextNodeContainingElementCommand::create):
+        * editing/TypingCommand.h:
+        (WebCore::TypingCommand::create):
+        * editing/UnlinkCommand.h:
+        (WebCore::UnlinkCommand::create):
+        * editing/WrapContentsInDummySpanCommand.h:
+        (WebCore::WrapContentsInDummySpanCommand::create):
+        * editing/ios/DictationCommandIOS.h:
+        (WebCore::DictationCommandIOS::create):
+        * fileapi/Blob.h:
+        (WebCore::Blob::create):
+        (WebCore::Blob::deserialize):
+        (WebCore::Blob::slice):
+        * fileapi/File.h:
+        * fileapi/FileList.h:
+        (WebCore::FileList::create):
+        * fileapi/FileReader.cpp:
+        (WebCore::FileReader::create):
+        * fileapi/FileReader.h:
+        * fileapi/FileReaderSync.h:
+        (WebCore::FileReaderSync::create):
+        * history/BackForwardList.h:
+        (WebCore::BackForwardList::create):
+        * history/HistoryItem.h:
+        (WebCore::HistoryItem::create):
+        * html/DOMURL.cpp:
+        (WebCore::DOMURL::create):
+        * html/DOMURL.h:
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::plugInImageElementIsolatedWorld):
+        * html/canvas/CanvasGradient.h:
+        (WebCore::CanvasGradient::create):
+        * html/canvas/CanvasPattern.cpp:
+        (WebCore::CanvasPattern::create):
+        * html/canvas/CanvasPattern.h:
+        * html/canvas/DOMPath.h:
+        * html/shadow/DetailsMarkerControl.cpp:
+        (WebCore::DetailsMarkerControl::create):
+        * html/shadow/DetailsMarkerControl.h:
+        * html/track/AudioTrack.h:
+        * html/track/AudioTrackList.h:
+        * html/track/DataCue.h:
+        * inspector/CommandLineAPIHost.cpp:
+        (WebCore::CommandLineAPIHost::create):
+        * inspector/CommandLineAPIHost.h:
+        * loader/DocumentLoader.h:
+        (WebCore::DocumentLoader::create):
+        * loader/FormState.cpp:
+        (WebCore::FormState::create):
+        * loader/FormState.h:
+        * loader/FormSubmission.cpp:
+        (WebCore::FormSubmission::create):
+        * loader/FormSubmission.h:
+        * loader/TextResourceDecoder.h:
+        (WebCore::TextResourceDecoder::create):
+        * loader/ThreadableLoaderClientWrapper.h:
+        (WebCore::ThreadableLoaderClientWrapper::create):
+        * loader/WorkerThreadableLoader.h:
+        (WebCore::WorkerThreadableLoader::create):
+        * loader/appcache/ApplicationCache.h:
+        (WebCore::ApplicationCache::create):
+        * loader/appcache/ApplicationCacheResource.h:
+        (WebCore::ApplicationCacheResource::create):
+        * loader/appcache/DOMApplicationCache.h:
+        * loader/archive/ArchiveResource.cpp:
+        (WebCore::ArchiveResource::create):
+        * loader/archive/ArchiveResource.h:
+        * loader/icon/IconDatabaseBase.h:
+        (WebCore::EnumCallback::create):
+        (WebCore::ObjectCallback::create):
+        * loader/icon/IconRecord.h:
+        (WebCore::IconRecord::create):
+        * mathml/MathMLInlineContainerElement.cpp:
+        (WebCore::MathMLInlineContainerElement::create):
+        * mathml/MathMLInlineContainerElement.h:
+        * mathml/MathMLMathElement.cpp:
+        (WebCore::MathMLMathElement::create):
+        * mathml/MathMLMathElement.h:
+        * mathml/MathMLMencloseElement.cpp:
+        (WebCore::MathMLMencloseElement::create):
+        * mathml/MathMLMencloseElement.h:
+        * mathml/MathMLSelectElement.cpp:
+        (WebCore::MathMLSelectElement::create):
+        * mathml/MathMLSelectElement.h:
+        * mathml/MathMLTextElement.cpp:
+        (WebCore::MathMLTextElement::create):
+        * mathml/MathMLTextElement.h:
+        * page/BarProp.h:
+        (WebCore::BarProp::create):
+        * page/Crypto.h:
+        (WebCore::Crypto::create):
+        * page/DOMSecurityPolicy.h:
+        (WebCore::DOMSecurityPolicy::create):
+        * page/DOMSelection.h:
+        (WebCore::DOMSelection::create):
+        * page/DOMWindow.h:
+        * page/DOMWindowExtension.h:
+        (WebCore::DOMWindowExtension::create):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::create):
+        * page/FrameView.h:
+        * page/animation/CompositeAnimation.h:
+        (WebCore::CompositeAnimation::create):
+        * page/scrolling/AsyncScrollingCoordinator.h:
+        * platform/Cursor.h:
+        (WebCore::SharedCursor::create):
+        * platform/FileChooser.cpp:
+        (WebCore::FileChooser::create):
+        * platform/FileChooser.h:
+        * platform/animation/Animation.h:
+        (WebCore::Animation::create):
+        * platform/audio/AudioBus.cpp:
+        (WebCore::AudioBus::create):
+        (WebCore::AudioBus::createBufferFromRange):
+        (WebCore::AudioBus::createBySampleRateConverting):
+        (WebCore::AudioBus::createByMixingToMono):
+        * platform/audio/AudioBus.h:
+        * platform/audio/AudioHardwareListener.cpp:
+        (WebCore::AudioHardwareListener::create):
+        * platform/audio/AudioHardwareListener.h:
+        * platform/audio/mac/AudioHardwareListenerMac.cpp:
+        (WebCore::AudioHardwareListener::create):
+        (WebCore::AudioHardwareListenerMac::create):
+        * platform/audio/mac/AudioHardwareListenerMac.h:
+        * platform/graphics/AudioTrackPrivate.h:
+        (WebCore::AudioTrackPrivate::create):
+        * platform/graphics/BitmapImage.h:
+        * platform/graphics/CrossfadeGeneratedImage.h:
+        * platform/graphics/FontFeatureSettings.h:
+        (WebCore::FontFeatureSettings::create):
+        * platform/graphics/Image.cpp:
+        (WebCore::Image::nullImage):
+        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
+        * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
+        (WebCore::AudioSourceProviderAVFObjC::create):
+        * platform/graphics/filters/DistantLightSource.h:
+        (WebCore::DistantLightSource::create):
+        * platform/graphics/filters/FEBlend.cpp:
+        (WebCore::FEBlend::create):
+        * platform/graphics/filters/FEBlend.h:
+        * platform/graphics/filters/FEColorMatrix.cpp:
+        (WebCore::FEColorMatrix::create):
+        * platform/graphics/filters/FEColorMatrix.h:
+        * platform/graphics/filters/FEComponentTransfer.cpp:
+        (WebCore::FEComponentTransfer::create):
+        * platform/graphics/filters/FEComponentTransfer.h:
+        * platform/graphics/filters/FEComposite.cpp:
+        (WebCore::FEComposite::create):
+        * platform/graphics/filters/FEComposite.h:
+        * platform/graphics/filters/FEConvolveMatrix.cpp:
+        (WebCore::FEConvolveMatrix::create):
+        * platform/graphics/filters/FEConvolveMatrix.h:
+        * platform/graphics/filters/FEDiffuseLighting.cpp:
+        (WebCore::FEDiffuseLighting::create):
+        * platform/graphics/filters/FEDiffuseLighting.h:
+        * platform/graphics/filters/FEDisplacementMap.cpp:
+        (WebCore::FEDisplacementMap::create):
+        * platform/graphics/filters/FEDisplacementMap.h:
+        * platform/graphics/filters/FEDropShadow.cpp:
+        (WebCore::FEDropShadow::create):
+        * platform/graphics/filters/FEDropShadow.h:
+        * platform/graphics/filters/FEFlood.cpp:
+        (WebCore::FEFlood::create):
+        * platform/graphics/filters/FEFlood.h:
+        * platform/graphics/filters/FEGaussianBlur.cpp:
+        (WebCore::FEGaussianBlur::create):
+        * platform/graphics/filters/FEGaussianBlur.h:
+        * platform/graphics/filters/FEMerge.cpp:
+        (WebCore::FEMerge::create):
+        * platform/graphics/filters/FEMerge.h:
+        * platform/graphics/filters/FEMorphology.cpp:
+        (WebCore::FEMorphology::create):
+        * platform/graphics/filters/FEMorphology.h:
+        * platform/graphics/filters/FEOffset.cpp:
+        (WebCore::FEOffset::create):
+        * platform/graphics/filters/FEOffset.h:
+        * platform/graphics/filters/FESpecularLighting.cpp:
+        (WebCore::FESpecularLighting::create):
+        * platform/graphics/filters/FESpecularLighting.h:
+        * platform/graphics/filters/FETile.cpp:
+        (WebCore::FETile::create):
+        * platform/graphics/filters/FETile.h:
+        * platform/graphics/filters/FETurbulence.cpp:
+        (WebCore::FETurbulence::create):
+        * platform/graphics/filters/FETurbulence.h:
+        * platform/graphics/ios/DisplayRefreshMonitorIOS.h:
+        (WebCore::DisplayRefreshMonitorIOS::create):
+        * platform/graphics/mac/ComplexTextController.h:
+        (WebCore::ComplexTextController::ComplexTextRun::create):
+        * platform/network/BlobData.h:
+        (WebCore::RawData::create):
+        (WebCore::BlobData::create):
+        * platform/network/BlobDataFileReference.h:
+        (WebCore::BlobDataFileReference::create):
+        * platform/network/cf/FormDataStreamCFNet.cpp:
+        * platform/text/BidiContext.cpp:
+        (WebCore::BidiContext::createUncached):
+        (WebCore::BidiContext::create):
+        * platform/text/BidiContext.h:
+        * plugins/DOMMimeType.h:
+        (WebCore::DOMMimeType::create):
+        * plugins/DOMMimeTypeArray.cpp:
+        (WebCore::DOMMimeTypeArray::item):
+        (WebCore::DOMMimeTypeArray::namedItem):
+        * plugins/DOMMimeTypeArray.h:
+        (WebCore::DOMMimeTypeArray::create):
+        * plugins/DOMPlugin.cpp:
+        (WebCore::DOMPlugin::item):
+        (WebCore::DOMPlugin::namedItem):
+        * plugins/DOMPlugin.h:
+        (WebCore::DOMPlugin::create):
+        * plugins/DOMPluginArray.cpp:
+        (WebCore::DOMPluginArray::item):
+        (WebCore::DOMPluginArray::namedItem):
+        * plugins/DOMPluginArray.h:
+        (WebCore::DOMPluginArray::create):
+        * plugins/PluginData.h:
+        (WebCore::PluginData::create):
+        * rendering/ClipPathOperation.h:
+        * rendering/CounterNode.cpp:
+        (WebCore::CounterNode::create):
+        * rendering/CounterNode.h:
+        * rendering/style/BasicShapes.h:
+        * rendering/style/CursorList.h:
+        (WebCore::CursorList::create):
+        * replay/CapturingInputCursor.cpp:
+        (WebCore::CapturingInputCursor::create):
+        * replay/CapturingInputCursor.h:
+        * storage/Storage.cpp:
+        (WebCore::Storage::create):
+        * storage/Storage.h:
+        * storage/StorageAreaImpl.cpp:
+        (WebCore::StorageAreaImpl::create):
+        * storage/StorageAreaImpl.h:
+        * storage/StorageAreaSync.cpp:
+        (WebCore::StorageAreaSync::create):
+        * storage/StorageAreaSync.h:
+        * storage/StorageMap.cpp:
+        (WebCore::StorageMap::create):
+        * storage/StorageMap.h:
+        * storage/StorageSyncManager.cpp:
+        (WebCore::StorageSyncManager::create):
+        * storage/StorageSyncManager.h:
+        * workers/DedicatedWorkerGlobalScope.cpp:
+        (WebCore::DedicatedWorkerGlobalScope::create):
+        * workers/DedicatedWorkerGlobalScope.h:
+        * workers/DedicatedWorkerThread.cpp:
+        (WebCore::DedicatedWorkerThread::create):
+        (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
+        * workers/DedicatedWorkerThread.h:
+        * workers/DefaultSharedWorkerRepository.cpp:
+        * workers/SharedWorkerGlobalScope.cpp:
+        (WebCore::SharedWorkerGlobalScope::create):
+        * workers/SharedWorkerGlobalScope.h:
+        * workers/SharedWorkerThread.cpp:
+        (WebCore::SharedWorkerThread::create):
+        (WebCore::SharedWorkerThread::createWorkerGlobalScope):
+        * workers/SharedWorkerThread.h:
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::importScripts):
+        * workers/WorkerLocation.h:
+        (WebCore::WorkerLocation::create):
+        * workers/WorkerScriptLoader.h:
+        (WebCore::WorkerScriptLoader::create):
+        * workers/WorkerThread.h:
+        * xml/DOMParser.h:
+        (WebCore::DOMParser::create):
+        * xml/NativeXPathNSResolver.h:
+        (WebCore::NativeXPathNSResolver::create):
+        * xml/XMLHttpRequest.cpp:
+        (WebCore::XMLHttpRequest::create):
+        * xml/XMLHttpRequest.h:
+        * xml/XMLHttpRequestProgressEventThrottle.cpp:
+        (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
+        * xml/XMLSerializer.h:
+        (WebCore::XMLSerializer::create):
+        * xml/XPathEvaluator.h:
+        (WebCore::XPathEvaluator::create):
+        * xml/XPathResult.h:
+        (WebCore::XPathResult::create):
+        * xml/XSLStyleSheet.h:
+        * xml/XSLTProcessor.h:
+        (WebCore::XSLTProcessor::create):
+
 2014-12-24  Benjamin Poulain  <bpoulain@apple.com>
 
         Small cleanup of RenderBlock::paint()
index fb134a5..5cb3cfb 100644 (file)
@@ -33,9 +33,9 @@ namespace WebCore {
 
 class Coordinates : public RefCounted<Coordinates> {
 public:
-    static PassRefPtr<Coordinates> create(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) { return adoptRef(new Coordinates(latitude, longitude, providesAltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed)); }
+    static Ref<Coordinates> create(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) { return adoptRef(*new Coordinates(latitude, longitude, providesAltitude, altitude, accuracy, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed)); }
 
-    PassRefPtr<Coordinates> isolatedCopy() const
+    Ref<Coordinates> isolatedCopy() const
     {
         return Coordinates::create(m_latitude, m_longitude, m_canProvideAltitude, m_altitude, m_accuracy, m_canProvideAltitudeAccuracy, m_altitudeAccuracy, m_canProvideHeading, m_heading, m_canProvideSpeed, m_speed);
     }
index 872a54e..082391a 100644 (file)
@@ -74,7 +74,7 @@ void RTCSessionDescriptionRequestImpl::requestSucceeded(PassRefPtr<RTCSessionDes
 void RTCSessionDescriptionRequestImpl::requestFailed(const String& error)
 {
     if (m_errorCallback)
-        m_errorCallback->handleEvent(DOMError::create(error).get());
+        m_errorCallback->handleEvent(DOMError::create(error).ptr());
 
     clear();
 }
index 2d42513..d10d1b4 100644 (file)
@@ -81,7 +81,7 @@ void RTCStatsRequestImpl::requestSucceeded(PassRefPtr<RTCStatsResponseBase> resp
 void RTCStatsRequestImpl::requestFailed(const String& error)
 {
     if (m_errorCallback)
-        m_errorCallback->handleEvent(DOMError::create(error).get());
+        m_errorCallback->handleEvent(DOMError::create(error).ptr());
 
     clear();
 }
index 1161158..d907578 100644 (file)
@@ -71,7 +71,7 @@ void RTCVoidRequestImpl::requestSucceeded()
 void RTCVoidRequestImpl::requestFailed(const String& error)
 {
     if (m_errorCallback.get())
-        m_errorCallback->handleEvent(DOMError::create(error).get());
+        m_errorCallback->handleEvent(DOMError::create(error).ptr());
 
     clear();
 }
index 4d2cc47..2b5c755 100644 (file)
@@ -145,7 +145,7 @@ RenderPtr<RenderElement> QuickTimePluginReplacement::createElementRenderer(HTMLP
 
 DOMWrapperWorld& QuickTimePluginReplacement::isolatedWorld()
 {
-    static DOMWrapperWorld& isolatedWorld = *DOMWrapperWorld::create(JSDOMWindow::commonVM()).leakRef();
+    static DOMWrapperWorld& isolatedWorld = DOMWrapperWorld::create(JSDOMWindow::commonVM()).leakRef();
     return isolatedWorld;
 }
 
index 290c67a..635e639 100644 (file)
@@ -33,9 +33,9 @@ namespace WebCore {
 
 class AnalyserNode : public AudioBasicInspectorNode {
 public:
-    static PassRefPtr<AnalyserNode> create(AudioContext* context, float sampleRate)
+    static Ref<AnalyserNode> create(AudioContext* context, float sampleRate)
     {
-        return adoptRef(new AnalyserNode(context, sampleRate));      
+        return adoptRef(*new AnalyserNode(context, sampleRate));
     }
 
     virtual ~AnalyserNode();
index e2ff1c6..31da94c 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<AudioBuffer> AudioBuffer::create(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate)
+RefPtr<AudioBuffer> AudioBuffer::create(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate)
 {
     if (sampleRate < 22050 || sampleRate > 96000 || numberOfChannels > AudioContext::maxNumberOfChannels() || !numberOfFrames)
         return nullptr;
     
-    return adoptRef(new AudioBuffer(numberOfChannels, numberOfFrames, sampleRate));
+    return adoptRef(*new AudioBuffer(numberOfChannels, numberOfFrames, sampleRate));
 }
 
-PassRefPtr<AudioBuffer> AudioBuffer::createFromAudioFileData(const void* data, size_t dataSize, bool mixToMono, float sampleRate)
+RefPtr<AudioBuffer> AudioBuffer::createFromAudioFileData(const void* data, size_t dataSize, bool mixToMono, float sampleRate)
 {
     RefPtr<AudioBus> bus = createBusFromInMemoryAudioFile(data, dataSize, mixToMono, sampleRate);
     if (bus.get())
-        return adoptRef(new AudioBuffer(bus.get()));
+        return adoptRef(*new AudioBuffer(bus.get()));
 
     return nullptr;
 }
index 0ce3261..e73bcea 100644 (file)
@@ -43,10 +43,10 @@ typedef int ExceptionCode;
 
 class AudioBuffer : public RefCounted<AudioBuffer> {
 public:   
-    static PassRefPtr<AudioBuffer> create(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate);
+    static RefPtr<AudioBuffer> create(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate);
 
     // Returns 0 if data is not a valid audio file.
-    static PassRefPtr<AudioBuffer> createFromAudioFileData(const void* data, size_t dataSize, bool mixToMono, float sampleRate);
+    static RefPtr<AudioBuffer> createFromAudioFileData(const void* data, size_t dataSize, bool mixToMono, float sampleRate);
 
     // Format
     size_t length() const { return m_length; }
index 45fdcb7..13bcacd 100644 (file)
@@ -49,9 +49,9 @@ const double DefaultGrainDuration = 0.020; // 20ms
 // to minimize linear interpolation aliasing.
 const double MaxRate = 1024;
 
-PassRefPtr<AudioBufferSourceNode> AudioBufferSourceNode::create(AudioContext* context, float sampleRate)
+Ref<AudioBufferSourceNode> AudioBufferSourceNode::create(AudioContext* context, float sampleRate)
 {
-    return adoptRef(new AudioBufferSourceNode(context, sampleRate));
+    return adoptRef(*new AudioBufferSourceNode(context, sampleRate));
 }
 
 AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* context, float sampleRate)
index fc0fad5..2049182 100644 (file)
@@ -45,7 +45,7 @@ class AudioContext;
 
 class AudioBufferSourceNode : public AudioScheduledSourceNode {
 public:
-    static PassRefPtr<AudioBufferSourceNode> create(AudioContext*, float sampleRate);
+    static Ref<AudioBufferSourceNode> create(AudioContext*, float sampleRate);
 
     virtual ~AudioBufferSourceNode();
 
index 7f36e26..7786837 100644 (file)
@@ -110,7 +110,7 @@ bool AudioContext::isSampleRateRangeGood(float sampleRate)
 const unsigned MaxHardwareContexts = 4;
 unsigned AudioContext::s_hardwareContextCount = 0;
     
-PassRefPtr<AudioContext> AudioContext::create(Document& document, ExceptionCode& ec)
+RefPtr<AudioContext> AudioContext::create(Document& document, ExceptionCode& ec)
 {
     UNUSED_PARAM(ec);
 
index 123d391..628131d 100644 (file)
@@ -77,10 +77,7 @@ class PeriodicWave;
 class AudioContext : public ActiveDOMObject, public ThreadSafeRefCounted<AudioContext>, public EventTargetWithInlineData, public MediaCanStartListener, public AudioProducer {
 public:
     // Create an AudioContext for rendering to the audio hardware.
-    static PassRefPtr<AudioContext> create(Document&, ExceptionCode&);
-
-    // Create an AudioContext for offline (non-realtime) rendering.
-    static PassRefPtr<AudioContext> createOfflineContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate, ExceptionCode&);
+    static RefPtr<AudioContext> create(Document&, ExceptionCode&);
 
     virtual ~AudioContext();
 
index 09fad60..3793040 100644 (file)
@@ -39,9 +39,9 @@ namespace WebCore {
 
 class AudioListener : public RefCounted<AudioListener> {
 public:
-    static PassRefPtr<AudioListener> create()
+    static Ref<AudioListener> create()
     {
-        return adoptRef(new AudioListener());
+        return adoptRef(*new AudioListener);
     }
 
     // Position
index 9b47ea8..d4e4047 100644 (file)
@@ -47,9 +47,9 @@ public:
     static const double DefaultSmoothingConstant;
     static const double SnapThreshold;
 
-    static PassRefPtr<AudioParam> create(AudioContext* context, const String& name, double defaultValue, double minValue, double maxValue, unsigned units = 0)
+    static Ref<AudioParam> create(AudioContext* context, const String& name, double defaultValue, double minValue, double maxValue, unsigned units = 0)
     {
-        return adoptRef(new AudioParam(context, name, defaultValue, minValue, maxValue, units));
+        return adoptRef(*new AudioParam(context, name, defaultValue, minValue, maxValue, units));
     }
 
     // AudioSummingJunction
index dde2aec..4ff4147 100644 (file)
@@ -46,9 +46,9 @@ public:
         ALLPASS = 7
     };
 
-    static PassRefPtr<BiquadFilterNode> create(AudioContext* context, float sampleRate)
+    static Ref<BiquadFilterNode> create(AudioContext* context, float sampleRate)
     {
-        return adoptRef(new BiquadFilterNode(context, sampleRate));      
+        return adoptRef(*new BiquadFilterNode(context, sampleRate));
     }
 
     String type() const;
index 4417a01..e0d3432 100644 (file)
@@ -37,9 +37,9 @@ class Reverb;
     
 class ConvolverNode : public AudioNode {
 public:
-    static PassRefPtr<ConvolverNode> create(AudioContext* context, float sampleRate)
+    static Ref<ConvolverNode> create(AudioContext* context, float sampleRate)
     {
-        return adoptRef(new ConvolverNode(context, sampleRate));      
+        return adoptRef(*new ConvolverNode(context, sampleRate));
     }
     
     virtual ~ConvolverNode();
index da61e69..76861b5 100644 (file)
@@ -28,7 +28,7 @@
 #include "AudioBasicProcessorNode.h"
 #include "DelayProcessor.h"
 #include "ExceptionCode.h"
-#include <wtf/PassRefPtr.h>
+#include <wtf/Ref.h>
 
 namespace WebCore {
 
@@ -36,9 +36,9 @@ class AudioParam;
 
 class DelayNode : public AudioBasicProcessorNode {
 public:
-    static PassRefPtr<DelayNode> create(AudioContext* context, float sampleRate, double maxDelayTime, ExceptionCode& ec)
+    static Ref<DelayNode> create(AudioContext* context, float sampleRate, double maxDelayTime, ExceptionCode& ec)
     {
-        return adoptRef(new DelayNode(context, sampleRate, maxDelayTime, ec));      
+        return adoptRef(*new DelayNode(context, sampleRate, maxDelayTime, ec));
     }
 
     AudioParam* delayTime();
index 123c0ca..1b2d3b9 100644 (file)
@@ -35,9 +35,9 @@ class DynamicsCompressor;
 
 class DynamicsCompressorNode : public AudioNode {
 public:
-    static PassRefPtr<DynamicsCompressorNode> create(AudioContext* context, float sampleRate)
+    static Ref<DynamicsCompressorNode> create(AudioContext* context, float sampleRate)
     {
-        return adoptRef(new DynamicsCompressorNode(context, sampleRate));
+        return adoptRef(*new DynamicsCompressorNode(context, sampleRate));
     }
 
     virtual ~DynamicsCompressorNode();
index ae38bf5..8770e38 100644 (file)
@@ -39,7 +39,7 @@ class SQLError;
 
 class ChangeVersionWrapper : public SQLTransactionWrapper {
 public:
-    static PassRefPtr<ChangeVersionWrapper> create(const String& oldVersion, const String& newVersion) { return adoptRef(new ChangeVersionWrapper(oldVersion, newVersion)); }
+    static Ref<ChangeVersionWrapper> create(const String& oldVersion, const String& newVersion) { return adoptRef(*new ChangeVersionWrapper(oldVersion, newVersion)); }
 
     virtual bool performPreflight(SQLTransactionBackend*);
     virtual bool performPostflight(SQLTransactionBackend*);
index eaba1f4..cd93154 100644 (file)
@@ -34,9 +34,9 @@
 
 namespace WebCore {
 
-PassRefPtr<DatabaseAuthorizer> DatabaseAuthorizer::create(const String& databaseInfoTableName)
+Ref<DatabaseAuthorizer> DatabaseAuthorizer::create(const String& databaseInfoTableName)
 {
-    return adoptRef(new DatabaseAuthorizer(databaseInfoTableName));
+    return adoptRef(*new DatabaseAuthorizer(databaseInfoTableName));
 }
 
 DatabaseAuthorizer::DatabaseAuthorizer(const String& databaseInfoTableName)
index 72df3f1..ee40870 100644 (file)
@@ -49,7 +49,7 @@ public:
         NoAccessMask = 1 << 2
     };
 
-    static PassRefPtr<DatabaseAuthorizer> create(const String& databaseInfoTableName);
+    static Ref<DatabaseAuthorizer> create(const String& databaseInfoTableName);
 
     int createTable(const String& tableName);
     int createTempTable(const String& tableName);
index 7a8a6eb..755a79d 100644 (file)
@@ -35,7 +35,6 @@
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
 #include <wtf/MessageQueue.h>
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
 #include <wtf/Threading.h>
 
@@ -50,7 +49,7 @@ class SQLTransactionCoordinator;
 
 class DatabaseThread : public ThreadSafeRefCounted<DatabaseThread> {
 public:
-    static PassRefPtr<DatabaseThread> create() { return adoptRef(new DatabaseThread); }
+    static Ref<DatabaseThread> create() { return adoptRef(*new DatabaseThread); }
     ~DatabaseThread();
 
     bool start();
index b03d1d4..83c6833 100644 (file)
@@ -498,7 +498,7 @@ ThreadableWebSocketChannel::SendResult WorkerThreadableWebSocketChannel::Bridge:
         ASSERT_UNUSED(context, context.isDocument());
         ASSERT(peer);
 
-        peer->send(*Blob::deserialize(capturedURL.url(), capturedType.string(), size));
+        peer->send(Blob::deserialize(capturedURL.url(), capturedType.string(), size));
     });
 
     Ref<Bridge> protect(*this);
index 097b3b3..a00b15c 100644 (file)
@@ -266,7 +266,7 @@ bool nodeHasRole(Node* node, const String& role)
     return SpaceSplitString(roleValue, true).contains(role);
 }
 
-static PassRefPtr<AccessibilityObject> createFromRenderer(RenderObject* renderer)
+static Ref<AccessibilityObject> createFromRenderer(RenderObject* renderer)
 {
     // FIXME: How could renderer->node() ever not be an Element?
     Node* node = renderer->node();
@@ -330,7 +330,7 @@ static PassRefPtr<AccessibilityObject> createFromRenderer(RenderObject* renderer
     return AccessibilityRenderObject::create(renderer);
 }
 
-static PassRefPtr<AccessibilityObject> createFromNode(Node* node)
+static Ref<AccessibilityObject> createFromNode(Node* node)
 {
     return AccessibilityNodeObject::create(node);
 }
index 9adb81f..65c0aa1 100644 (file)
@@ -49,9 +49,9 @@ AccessibilityARIAGrid::~AccessibilityARIAGrid()
 {
 }
 
-PassRefPtr<AccessibilityARIAGrid> AccessibilityARIAGrid::create(RenderObject* renderer)
+Ref<AccessibilityARIAGrid> AccessibilityARIAGrid::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityARIAGrid(renderer));
+    return adoptRef(*new AccessibilityARIAGrid(renderer));
 }
 
 bool AccessibilityARIAGrid::addTableCellChild(AccessibilityObject* child, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount)
index 82eee89..f16cb91 100644 (file)
@@ -39,7 +39,7 @@ class AccessibilityTableHeaderContainer;
 
 class AccessibilityARIAGrid final : public AccessibilityTable {
 public:
-    static PassRefPtr<AccessibilityARIAGrid> create(RenderObject*);
+    static Ref<AccessibilityARIAGrid> create(RenderObject*);
     virtual ~AccessibilityARIAGrid();
     
     virtual void addChildren() override;
index 104c8a6..7d3c575 100644 (file)
@@ -44,9 +44,9 @@ AccessibilityARIAGridCell::~AccessibilityARIAGridCell()
 {
 }
 
-PassRefPtr<AccessibilityARIAGridCell> AccessibilityARIAGridCell::create(RenderObject* renderer)
+Ref<AccessibilityARIAGridCell> AccessibilityARIAGridCell::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityARIAGridCell(renderer));
+    return adoptRef(*new AccessibilityARIAGridCell(renderer));
 }
 
 AccessibilityTable* AccessibilityARIAGridCell::parentTable() const
index 5586b07..1770247 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
     
 class AccessibilityARIAGridCell final : public AccessibilityTableCell {
 public:
-    static PassRefPtr<AccessibilityARIAGridCell> create(RenderObject*);
+    static Ref<AccessibilityARIAGridCell> create(RenderObject*);
     virtual ~AccessibilityARIAGridCell();
     
     // fills in the start location and row span of cell
index b725a17..69ee525 100644 (file)
@@ -44,9 +44,9 @@ AccessibilityARIAGridRow::~AccessibilityARIAGridRow()
 {
 }
 
-PassRefPtr<AccessibilityARIAGridRow> AccessibilityARIAGridRow::create(RenderObject* renderer)
+Ref<AccessibilityARIAGridRow> AccessibilityARIAGridRow::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityARIAGridRow(renderer));
+    return adoptRef(*new AccessibilityARIAGridRow(renderer));
 }
 
 bool AccessibilityARIAGridRow::isARIATreeGridRow() const
index 47b16b1..bf1a1c4 100644 (file)
@@ -37,7 +37,7 @@ class AccessibilityTable;
     
 class AccessibilityARIAGridRow final : public AccessibilityTableRow {
 public:
-    static PassRefPtr<AccessibilityARIAGridRow> create(RenderObject*);
+    static Ref<AccessibilityARIAGridRow> create(RenderObject*);
     virtual ~AccessibilityARIAGridRow();
     
     void disclosedRows(AccessibilityChildrenVector&);
index 9a9afb4..96bc139 100644 (file)
@@ -49,9 +49,9 @@ AccessibilityImageMapLink::~AccessibilityImageMapLink()
 {
 }    
 
-PassRefPtr<AccessibilityImageMapLink> AccessibilityImageMapLink::create()
+Ref<AccessibilityImageMapLink> AccessibilityImageMapLink::create()
 {
-    return adoptRef(new AccessibilityImageMapLink());
+    return adoptRef(*new AccessibilityImageMapLink());
 }
 
 AccessibilityObject* AccessibilityImageMapLink::parentObject() const
index 7e7c916..69a7e20 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
     
 class AccessibilityImageMapLink final : public AccessibilityMockObject {
 public:
-    static PassRefPtr<AccessibilityImageMapLink> create();
+    static Ref<AccessibilityImageMapLink> create();
     virtual ~AccessibilityImageMapLink();
     
     void setHTMLAreaElement(HTMLAreaElement* element) { m_areaElement = element; }
index 327d2a1..b2703ad 100644 (file)
@@ -49,9 +49,9 @@ AccessibilityList::~AccessibilityList()
 {
 }
 
-PassRefPtr<AccessibilityList> AccessibilityList::create(RenderObject* renderer)
+Ref<AccessibilityList> AccessibilityList::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityList(renderer));
+    return adoptRef(*new AccessibilityList(renderer));
 }
 
 bool AccessibilityList::computeAccessibilityIsIgnored() const
index 976e2bd..c2e5bf8 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
     
 class AccessibilityList final : public AccessibilityRenderObject {
 public:
-    static PassRefPtr<AccessibilityList> create(RenderObject*);
+    static Ref<AccessibilityList> create(RenderObject*);
     virtual ~AccessibilityList();
     
     bool isUnorderedList() const;
index a360dd3..7fc68a9 100644 (file)
@@ -49,10 +49,10 @@ AccessibilityListBox::AccessibilityListBox(RenderObject* renderer)
 AccessibilityListBox::~AccessibilityListBox()
 {
 }
-    
-PassRefPtr<AccessibilityListBox> AccessibilityListBox::create(RenderObject* renderer)
+
+Ref<AccessibilityListBox> AccessibilityListBox::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityListBox(renderer));
+    return adoptRef(*new AccessibilityListBox(renderer));
 }
     
 bool AccessibilityListBox::canSetSelectedChildrenAttribute() const
index 15c9845..ad2df1d 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
 
 class AccessibilityListBox final : public AccessibilityRenderObject {
 public:
-    static PassRefPtr<AccessibilityListBox> create(RenderObject*);
+    static Ref<AccessibilityListBox> create(RenderObject*);
     virtual ~AccessibilityListBox();
     
     virtual bool canSetSelectedChildrenAttribute() const override;
index caa6db0..1188ecd 100644 (file)
@@ -54,9 +54,9 @@ AccessibilityListBoxOption::~AccessibilityListBoxOption()
 {
 }    
     
-PassRefPtr<AccessibilityListBoxOption> AccessibilityListBoxOption::create()
+Ref<AccessibilityListBoxOption> AccessibilityListBoxOption::create()
 {
-    return adoptRef(new AccessibilityListBoxOption());
+    return adoptRef(*new AccessibilityListBoxOption());
 }
     
 bool AccessibilityListBoxOption::isEnabled() const
index 4bea719..31c4336 100644 (file)
@@ -42,7 +42,7 @@ class HTMLSelectElement;
     
 class AccessibilityListBoxOption final : public AccessibilityObject {
 public:
-    static PassRefPtr<AccessibilityListBoxOption> create();
+    static Ref<AccessibilityListBoxOption> create();
     virtual ~AccessibilityListBoxOption();
     
     void setHTMLElement(HTMLElement* element) { m_optionElement = element; }
index 887bb99..a59d168 100644 (file)
@@ -53,7 +53,7 @@ AccessibilityMediaControl::AccessibilityMediaControl(RenderObject* renderer)
 {
 }
 
-PassRefPtr<AccessibilityObject> AccessibilityMediaControl::create(RenderObject* renderer)
+Ref<AccessibilityObject> AccessibilityMediaControl::create(RenderObject* renderer)
 {
     ASSERT(renderer->node());
 
@@ -69,7 +69,7 @@ PassRefPtr<AccessibilityObject> AccessibilityMediaControl::create(RenderObject*
         return AccessibilityMediaControlsContainer::create(renderer);
 
     default:
-        return adoptRef(new AccessibilityMediaControl(renderer));
+        return adoptRef(*new AccessibilityMediaControl(renderer));
     }
 }
 
@@ -222,9 +222,9 @@ AccessibilityMediaControlsContainer::AccessibilityMediaControlsContainer(RenderO
 {
 }
 
-PassRefPtr<AccessibilityObject> AccessibilityMediaControlsContainer::create(RenderObject* renderer)
+Ref<AccessibilityObject> AccessibilityMediaControlsContainer::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityMediaControlsContainer(renderer));
+    return adoptRef(*new AccessibilityMediaControlsContainer(renderer));
 }
 
 String AccessibilityMediaControlsContainer::accessibilityDescription() const
@@ -266,9 +266,9 @@ AccessibilityMediaTimeline::AccessibilityMediaTimeline(RenderObject* renderer)
 {
 }
 
-PassRefPtr<AccessibilityObject> AccessibilityMediaTimeline::create(RenderObject* renderer)
+Ref<AccessibilityObject> AccessibilityMediaTimeline::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityMediaTimeline(renderer));
+    return adoptRef(*new AccessibilityMediaTimeline(renderer));
 }
 
 String AccessibilityMediaTimeline::valueDescription() const
@@ -296,9 +296,9 @@ AccessibilityMediaTimeDisplay::AccessibilityMediaTimeDisplay(RenderObject* rende
 {
 }
 
-PassRefPtr<AccessibilityObject> AccessibilityMediaTimeDisplay::create(RenderObject* renderer)
+Ref<AccessibilityObject> AccessibilityMediaTimeDisplay::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityMediaTimeDisplay(renderer));
+    return adoptRef(*new AccessibilityMediaTimeDisplay(renderer));
 }
 
 bool AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored() const
index bc6bd54..a0ce717 100644 (file)
@@ -40,7 +40,7 @@ namespace WebCore {
 class AccessibilityMediaControl : public AccessibilityRenderObject {
 
 public:
-    static PassRefPtr<AccessibilityObject> create(RenderObject*);
+    static Ref<AccessibilityObject> create(RenderObject*);
     virtual ~AccessibilityMediaControl() { }
 
     virtual AccessibilityRole roleValue() const override;
@@ -63,7 +63,7 @@ private:
 class AccessibilityMediaTimeline final : public AccessibilitySlider {
 
 public:
-    static PassRefPtr<AccessibilityObject> create(RenderObject*);
+    static Ref<AccessibilityObject> create(RenderObject*);
     virtual ~AccessibilityMediaTimeline() { }
 
     virtual String helpText() const override;
@@ -80,7 +80,7 @@ private:
 class AccessibilityMediaControlsContainer final : public AccessibilityMediaControl {
 
 public:
-    static PassRefPtr<AccessibilityObject> create(RenderObject*);
+    static Ref<AccessibilityObject> create(RenderObject*);
     virtual ~AccessibilityMediaControlsContainer() { }
 
     virtual AccessibilityRole roleValue() const override { return ToolbarRole; }
@@ -99,7 +99,7 @@ private:
 class AccessibilityMediaTimeDisplay final : public AccessibilityMediaControl {
 
 public:
-    static PassRefPtr<AccessibilityObject> create(RenderObject*);
+    static Ref<AccessibilityObject> create(RenderObject*);
     virtual ~AccessibilityMediaTimeDisplay() { }
 
     virtual AccessibilityRole roleValue() const override { return ApplicationTimerRole; }
index a9df1d8..147acf1 100644 (file)
@@ -37,9 +37,9 @@ AccessibilityMenuList::AccessibilityMenuList(RenderMenuList* renderer)
 {
 }
 
-PassRefPtr<AccessibilityMenuList> AccessibilityMenuList::create(RenderMenuList* renderer)
+Ref<AccessibilityMenuList> AccessibilityMenuList::create(RenderMenuList* renderer)
 {
-    return adoptRef(new AccessibilityMenuList(renderer));
+    return adoptRef(*new AccessibilityMenuList(renderer));
 }
 
 bool AccessibilityMenuList::press()
index bc75c17..c081a72 100644 (file)
@@ -37,7 +37,7 @@ class RenderMenuList;
 
 class AccessibilityMenuList final : public AccessibilityRenderObject {
 public:
-    static PassRefPtr<AccessibilityMenuList> create(RenderMenuList* renderer);
+    static Ref<AccessibilityMenuList> create(RenderMenuList* renderer);
 
     virtual bool isCollapsed() const override;
     virtual bool press() override;
index e13c5fb..b681503 100644 (file)
@@ -35,7 +35,7 @@ class HTMLElement;
 
 class AccessibilityMenuListOption final : public AccessibilityMockObject {
 public:
-    static PassRefPtr<AccessibilityMenuListOption> create() { return adoptRef(new AccessibilityMenuListOption); }
+    static Ref<AccessibilityMenuListOption> create() { return adoptRef(*new AccessibilityMenuListOption); }
 
     void setElement(HTMLElement*);
 
index 2b3530e..6b4d223 100644 (file)
@@ -37,7 +37,7 @@ class HTMLSelectElement;
 
 class AccessibilityMenuListPopup final : public AccessibilityMockObject {
 public:
-    static PassRefPtr<AccessibilityMenuListPopup> create() { return adoptRef(new AccessibilityMenuListPopup); }
+    static Ref<AccessibilityMenuListPopup> create() { return adoptRef(*new AccessibilityMenuListPopup); }
 
     virtual bool isEnabled() const override;
     virtual bool isOffScreen() const override;
index 5b1f76b..5cf9f2d 100644 (file)
@@ -117,9 +117,9 @@ void AccessibilityNodeObject::init()
     m_role = determineAccessibilityRole();
 }
 
-PassRefPtr<AccessibilityNodeObject> AccessibilityNodeObject::create(Node* node)
+Ref<AccessibilityNodeObject> AccessibilityNodeObject::create(Node* node)
 {
-    return adoptRef(new AccessibilityNodeObject(node));
+    return adoptRef(*new AccessibilityNodeObject(node));
 }
 
 void AccessibilityNodeObject::detach(AccessibilityDetachmentType detachmentType, AXObjectCache* cache)
index 1383dca..3e7572f 100644 (file)
@@ -62,7 +62,7 @@ enum MouseButtonListenerResultFilter {
 
 class AccessibilityNodeObject : public AccessibilityObject {
 public:
-    static PassRefPtr<AccessibilityNodeObject> create(Node*);
+    static Ref<AccessibilityNodeObject> create(Node*);
     virtual ~AccessibilityNodeObject();
 
     virtual void init() override;
index aaf0c6c..f3a13d9 100644 (file)
@@ -38,9 +38,9 @@ AccessibilityProgressIndicator::AccessibilityProgressIndicator(RenderProgress* r
 {
 }
 
-PassRefPtr<AccessibilityProgressIndicator> AccessibilityProgressIndicator::create(RenderProgress* renderer)
+Ref<AccessibilityProgressIndicator> AccessibilityProgressIndicator::create(RenderProgress* renderer)
 {
-    return adoptRef(new AccessibilityProgressIndicator(renderer));
+    return adoptRef(*new AccessibilityProgressIndicator(renderer));
 }
     
 #if ENABLE(METER_ELEMENT)
@@ -49,9 +49,9 @@ AccessibilityProgressIndicator::AccessibilityProgressIndicator(RenderMeter* rend
 {
 }
 
-PassRefPtr<AccessibilityProgressIndicator> AccessibilityProgressIndicator::create(RenderMeter* renderer)
+Ref<AccessibilityProgressIndicator> AccessibilityProgressIndicator::create(RenderMeter* renderer)
 {
-    return adoptRef(new AccessibilityProgressIndicator(renderer));
+    return adoptRef(*new AccessibilityProgressIndicator(renderer));
 }
 #endif
 
index 0c480f6..f58f394 100644 (file)
@@ -35,9 +35,9 @@ class RenderProgress;
     
 class AccessibilityProgressIndicator final : public AccessibilityRenderObject {
 public:
-    static PassRefPtr<AccessibilityProgressIndicator> create(RenderProgress*);
+    static Ref<AccessibilityProgressIndicator> create(RenderProgress*);
 #if ENABLE(METER_ELEMENT)
-    static PassRefPtr<AccessibilityProgressIndicator> create(RenderMeter*);
+    static Ref<AccessibilityProgressIndicator> create(RenderMeter*);
 #endif
     virtual Element* element() const override;
 
index 84d8ccc..7cae7f9 100644 (file)
@@ -132,9 +132,9 @@ void AccessibilityRenderObject::init()
     AccessibilityNodeObject::init();
 }
 
-PassRefPtr<AccessibilityRenderObject> AccessibilityRenderObject::create(RenderObject* renderer)
+Ref<AccessibilityRenderObject> AccessibilityRenderObject::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityRenderObject(renderer));
+    return adoptRef(*new AccessibilityRenderObject(renderer));
 }
 
 void AccessibilityRenderObject::detach(AccessibilityDetachmentType detachmentType, AXObjectCache* cache)
index 6a3c1eb..e9582fb 100644 (file)
@@ -58,7 +58,7 @@ class Widget;
     
 class AccessibilityRenderObject : public AccessibilityNodeObject {
 public:
-    static PassRefPtr<AccessibilityRenderObject> create(RenderObject*);
+    static Ref<AccessibilityRenderObject> create(RenderObject*);
     virtual ~AccessibilityRenderObject();
 
     virtual void init() override;
index e2ad00f..2b62d92 100644 (file)
@@ -43,9 +43,9 @@ AccessibilitySVGRoot::~AccessibilitySVGRoot()
 {
 }
 
-PassRefPtr<AccessibilitySVGRoot> AccessibilitySVGRoot::create(RenderObject* renderer)
+Ref<AccessibilitySVGRoot> AccessibilitySVGRoot::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilitySVGRoot(renderer));
+    return adoptRef(*new AccessibilitySVGRoot(renderer));
 }
     
 AccessibilityObject* AccessibilitySVGRoot::parentObject() const
index 0b82fee..44eedc5 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
 
 class AccessibilitySVGRoot final : public AccessibilityRenderObject {
 public:
-    static PassRefPtr<AccessibilitySVGRoot> create(RenderObject*);
+    static Ref<AccessibilitySVGRoot> create(RenderObject*);
     virtual ~AccessibilitySVGRoot();
     
     void setParent(AccessibilityObject* parent) { m_parent = parent; }
index c900098..2e56683 100644 (file)
@@ -54,9 +54,9 @@ void AccessibilityScrollView::detach(AccessibilityDetachmentType detachmentType,
     m_scrollView = nullptr;
 }
 
-PassRefPtr<AccessibilityScrollView> AccessibilityScrollView::create(ScrollView* view)
+Ref<AccessibilityScrollView> AccessibilityScrollView::create(ScrollView* view)
 {
-    return adoptRef(new AccessibilityScrollView(view));
+    return adoptRef(*new AccessibilityScrollView(view));
 }
     
 AccessibilityObject* AccessibilityScrollView::scrollBar(AccessibilityOrientation orientation)
index 91519c8..c62c753 100644 (file)
@@ -36,7 +36,7 @@ class ScrollView;
     
 class AccessibilityScrollView final : public AccessibilityObject {
 public:
-    static PassRefPtr<AccessibilityScrollView> create(ScrollView*);    
+    static Ref<AccessibilityScrollView> create(ScrollView*);
     virtual AccessibilityRole roleValue() const override { return ScrollAreaRole; }
     ScrollView* scrollView() const { return m_scrollView; }
 
index eedc269..8f81e89 100644 (file)
@@ -42,9 +42,9 @@ AccessibilityScrollbar::AccessibilityScrollbar(Scrollbar* scrollbar)
     ASSERT(scrollbar);
 }
 
-PassRefPtr<AccessibilityScrollbar> AccessibilityScrollbar::create(Scrollbar* scrollbar)
+Ref<AccessibilityScrollbar> AccessibilityScrollbar::create(Scrollbar* scrollbar)
 {
-    return adoptRef(new AccessibilityScrollbar(scrollbar));
+    return adoptRef(*new AccessibilityScrollbar(scrollbar));
 }
     
 LayoutRect AccessibilityScrollbar::elementRect() const
index 4370449..2af3c95 100644 (file)
@@ -37,7 +37,7 @@ class Scrollbar;
 
 class AccessibilityScrollbar final : public AccessibilityMockObject {
 public:
-    static PassRefPtr<AccessibilityScrollbar> create(Scrollbar*);
+    static Ref<AccessibilityScrollbar> create(Scrollbar*);
 
     Scrollbar* scrollbar() const { return m_scrollbar.get(); }
     
index 3d4e70c..cafa734 100644 (file)
@@ -31,9 +31,9 @@
 
 namespace WebCore {
 
-PassRefPtr<AccessibilitySearchFieldCancelButton> AccessibilitySearchFieldCancelButton::create(RenderObject* renderer)
+Ref<AccessibilitySearchFieldCancelButton> AccessibilitySearchFieldCancelButton::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilitySearchFieldCancelButton(renderer));
+    return adoptRef(*new AccessibilitySearchFieldCancelButton(renderer));
 }
 
 AccessibilitySearchFieldCancelButton::AccessibilitySearchFieldCancelButton(RenderObject* renderer)
index 96f58be..eb64a12 100644 (file)
@@ -32,7 +32,7 @@ namespace WebCore {
 
 class AccessibilitySearchFieldCancelButton final : public AccessibilityRenderObject {
 public:
-    static PassRefPtr<AccessibilitySearchFieldCancelButton> create(RenderObject*);
+    static Ref<AccessibilitySearchFieldCancelButton> create(RenderObject*);
     
     virtual String accessibilityDescription() const override;
     virtual void accessibilityText(Vector<AccessibilityText>&) override;
index 6b870a6..d7ba9e4 100644 (file)
@@ -45,9 +45,9 @@ AccessibilitySlider::AccessibilitySlider(RenderObject* renderer)
 {
 }
 
-PassRefPtr<AccessibilitySlider> AccessibilitySlider::create(RenderObject* renderer)
+Ref<AccessibilitySlider> AccessibilitySlider::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilitySlider(renderer));
+    return adoptRef(*new AccessibilitySlider(renderer));
 }
 
 AccessibilityOrientation AccessibilitySlider::orientation() const
@@ -146,9 +146,9 @@ AccessibilitySliderThumb::AccessibilitySliderThumb()
 {
 }
 
-PassRefPtr<AccessibilitySliderThumb> AccessibilitySliderThumb::create()
+Ref<AccessibilitySliderThumb> AccessibilitySliderThumb::create()
 {
-    return adoptRef(new AccessibilitySliderThumb());
+    return adoptRef(*new AccessibilitySliderThumb());
 }
     
 LayoutRect AccessibilitySliderThumb::elementRect() const
index b0dd020..1f2e573 100644 (file)
@@ -38,7 +38,7 @@ class HTMLInputElement;
 
 class AccessibilitySlider : public AccessibilityRenderObject {
 public:
-    static PassRefPtr<AccessibilitySlider> create(RenderObject*);
+    static Ref<AccessibilitySlider> create(RenderObject*);
     virtual ~AccessibilitySlider() { }
 
 protected:
@@ -67,7 +67,7 @@ private:
 
 class AccessibilitySliderThumb final : public AccessibilityMockObject {
 public:
-    static PassRefPtr<AccessibilitySliderThumb> create();
+    static Ref<AccessibilitySliderThumb> create();
     virtual ~AccessibilitySliderThumb() { }
 
     virtual AccessibilityRole roleValue() const override { return SliderThumbRole; }
index 3ce9419..0c53370 100644 (file)
@@ -31,9 +31,9 @@
 
 namespace WebCore {
 
-PassRefPtr<AccessibilitySpinButton> AccessibilitySpinButton::create()
+Ref<AccessibilitySpinButton> AccessibilitySpinButton::create()
 {
-    return adoptRef(new AccessibilitySpinButton);
+    return adoptRef(*new AccessibilitySpinButton);
 }
     
 AccessibilitySpinButton::AccessibilitySpinButton()
@@ -109,9 +109,9 @@ AccessibilitySpinButtonPart::AccessibilitySpinButtonPart()
 {
 }
     
-PassRefPtr<AccessibilitySpinButtonPart> AccessibilitySpinButtonPart::create()
+Ref<AccessibilitySpinButtonPart> AccessibilitySpinButtonPart::create()
 {
-    return adoptRef(new AccessibilitySpinButtonPart);
+    return adoptRef(*new AccessibilitySpinButtonPart);
 }
 
 LayoutRect AccessibilitySpinButtonPart::elementRect() const
index ce6a9bd..e0cb6c3 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
     
 class AccessibilitySpinButton final : public AccessibilityMockObject {
 public:
-    static PassRefPtr<AccessibilitySpinButton> create();
+    static Ref<AccessibilitySpinButton> create();
     virtual ~AccessibilitySpinButton();
     
     void setSpinButtonElement(SpinButtonElement* spinButton) { m_spinButtonElement = spinButton; }
@@ -58,7 +58,7 @@ private:
    
 class AccessibilitySpinButtonPart final : public AccessibilityMockObject {
 public:
-    static PassRefPtr<AccessibilitySpinButtonPart> create();
+    static Ref<AccessibilitySpinButtonPart> create();
     virtual ~AccessibilitySpinButtonPart() { }
     
     bool isIncrementor() const { return m_isIncrementor; }
index 696d076..be1c407 100644 (file)
@@ -65,9 +65,9 @@ void AccessibilityTable::init()
     m_isExposableThroughAccessibility = computeIsTableExposableThroughAccessibility();
 }
 
-PassRefPtr<AccessibilityTable> AccessibilityTable::create(RenderObject* renderer)
+Ref<AccessibilityTable> AccessibilityTable::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityTable(renderer));
+    return adoptRef(*new AccessibilityTable(renderer));
 }
 
 bool AccessibilityTable::hasARIARole() const
index cd5bbe7..1efd620 100644 (file)
@@ -40,7 +40,7 @@ class RenderTableSection;
     
 class AccessibilityTable : public AccessibilityRenderObject {
 public:
-    static PassRefPtr<AccessibilityTable> create(RenderObject*);
+    static Ref<AccessibilityTable> create(RenderObject*);
     virtual ~AccessibilityTable();
 
     virtual void init() override final;
index 6602d07..7cdaf75 100644 (file)
@@ -51,9 +51,9 @@ AccessibilityTableCell::~AccessibilityTableCell()
 {
 }
 
-PassRefPtr<AccessibilityTableCell> AccessibilityTableCell::create(RenderObject* renderer)
+Ref<AccessibilityTableCell> AccessibilityTableCell::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityTableCell(renderer));
+    return adoptRef(*new AccessibilityTableCell(renderer));
 }
 
 bool AccessibilityTableCell::computeAccessibilityIsIgnored() const
index 68758b5..859a258 100644 (file)
@@ -37,7 +37,7 @@ class AccessibilityTable;
     
 class AccessibilityTableCell : public AccessibilityRenderObject {
 public:
-    static PassRefPtr<AccessibilityTableCell> create(RenderObject*);
+    static Ref<AccessibilityTableCell> create(RenderObject*);
     virtual ~AccessibilityTableCell();
     
     virtual bool isTableCell() const override final;
index b51eb75..02c4e30 100644 (file)
@@ -49,9 +49,9 @@ AccessibilityTableColumn::~AccessibilityTableColumn()
 {
 }    
 
-PassRefPtr<AccessibilityTableColumn> AccessibilityTableColumn::create()
+Ref<AccessibilityTableColumn> AccessibilityTableColumn::create()
 {
-    return adoptRef(new AccessibilityTableColumn());
+    return adoptRef(*new AccessibilityTableColumn());
 }
 
 void AccessibilityTableColumn::setParent(AccessibilityObject* parent)
index 67c44b8..0dac478 100644 (file)
@@ -39,7 +39,7 @@ class RenderTableSection;
 
 class AccessibilityTableColumn final : public AccessibilityMockObject {
 public:
-    static PassRefPtr<AccessibilityTableColumn> create();
+    static Ref<AccessibilityTableColumn> create();
     virtual ~AccessibilityTableColumn();
     
     AccessibilityObject* headerObject();
index 3d0307f..e301148 100644 (file)
@@ -42,9 +42,9 @@ AccessibilityTableHeaderContainer::~AccessibilityTableHeaderContainer()
 {
 }
 
-PassRefPtr<AccessibilityTableHeaderContainer> AccessibilityTableHeaderContainer::create()
+Ref<AccessibilityTableHeaderContainer> AccessibilityTableHeaderContainer::create()
 {
-    return adoptRef(new AccessibilityTableHeaderContainer());
+    return adoptRef(*new AccessibilityTableHeaderContainer());
 }
     
 LayoutRect AccessibilityTableHeaderContainer::elementRect() const
index 266d14c..e4ce740 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 
 class AccessibilityTableHeaderContainer final : public AccessibilityMockObject {
 public:
-    static PassRefPtr<AccessibilityTableHeaderContainer> create();
+    static Ref<AccessibilityTableHeaderContainer> create();
     virtual ~AccessibilityTableHeaderContainer();
     
     virtual AccessibilityRole roleValue() const override { return TableHeaderContainerRole; }
index 665295e..86b8f65 100644 (file)
@@ -51,9 +51,9 @@ AccessibilityTableRow::~AccessibilityTableRow()
 {
 }
 
-PassRefPtr<AccessibilityTableRow> AccessibilityTableRow::create(RenderObject* renderer)
+Ref<AccessibilityTableRow> AccessibilityTableRow::create(RenderObject* renderer)
 {
-    return adoptRef(new AccessibilityTableRow(renderer));
+    return adoptRef(*new AccessibilityTableRow(renderer));
 }
 
 AccessibilityRole AccessibilityTableRow::determineAccessibilityRole()
index f0891be..aa1fd58 100644 (file)
@@ -37,7 +37,7 @@ class AccessibilityTable;
 
 class AccessibilityTableRow : public AccessibilityRenderObject {
 public:
-    static PassRefPtr<AccessibilityTableRow> create(RenderObject*);
+    static Ref<AccessibilityTableRow> create(RenderObject*);
     virtual ~AccessibilityTableRow();
 
     // retrieves the "row" header (a th tag in the rightmost column)
index 15b1814..267169a 100644 (file)
@@ -91,7 +91,7 @@ struct _WebKitAccessiblePrivate {
 
 static AccessibilityObject* fallbackObject()
 {
-    static AccessibilityObject* object = AccessibilityListBoxOption::create().leakRef();
+    static AccessibilityObject* object = &AccessibilityListBoxOption::create().leakRef();
     return object;
 }
 
index b95fdc8..2a228d3 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 class CachedScriptSourceProvider : public JSC::SourceProvider, public CachedResourceClient {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    static PassRefPtr<CachedScriptSourceProvider> create(CachedScript* cachedScript) { return adoptRef(new CachedScriptSourceProvider(cachedScript)); }
+    static Ref<CachedScriptSourceProvider> create(CachedScript* cachedScript) { return adoptRef(*new CachedScriptSourceProvider(cachedScript)); }
 
     virtual ~CachedScriptSourceProvider()
     {
index b3f369a..f88e1c4 100644 (file)
@@ -35,9 +35,9 @@ typedef HashMap<void*, JSC::Weak<JSC::JSObject>> DOMObjectWrapperMap;
 
 class DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
 public:
-    static PassRefPtr<DOMWrapperWorld> create(JSC::VM& vm, bool isNormal = false)
+    static Ref<DOMWrapperWorld> create(JSC::VM& vm, bool isNormal = false)
     {
-        return adoptRef(new DOMWrapperWorld(vm, isNormal));
+        return adoptRef(*new DOMWrapperWorld(vm, isNormal));
     }
     WEBCORE_EXPORT ~DOMWrapperWorld();
 
index e6c8373..dca5603 100644 (file)
@@ -2127,6 +2127,12 @@ private:
         return toJS(m_exec, jsCast<JSDOMGlobalObject*>(m_globalObject), nativeObj);
     }
 
+    template<class T>
+    JSValue getJSValue(T& nativeObj)
+    {
+        return getJSValue(&nativeObj);
+    }
+
     JSValue readTerminal()
     {
         SerializationTag tag = readTag();
index 1dab9a0..59bd78e 100644 (file)
@@ -37,7 +37,7 @@ namespace WebCore {
 
     class DOMCustomXPathNSResolver : public XPathNSResolver {
     public:
-        static PassRefPtr<DOMCustomXPathNSResolver> create(id <DOMXPathNSResolver> customResolver) { return adoptRef(new DOMCustomXPathNSResolver(customResolver)); }
+        static Ref<DOMCustomXPathNSResolver> create(id <DOMXPathNSResolver> customResolver) { return adoptRef(*new DOMCustomXPathNSResolver(customResolver)); }
         virtual ~DOMCustomXPathNSResolver();
 
         virtual String lookupNamespaceURI(const String& prefix);
index 8595d19..d3f5d37 100644 (file)
@@ -3413,9 +3413,9 @@ sub GenerateCallbackHeader
     push(@headerContent, "public:\n");
 
     # The static create() method.
-    push(@headerContent, "    static PassRefPtr<$className> create(JSC::JSObject* callback, JSDOMGlobalObject* globalObject)\n");
+    push(@headerContent, "    static Ref<$className> create(JSC::JSObject* callback, JSDOMGlobalObject* globalObject)\n");
     push(@headerContent, "    {\n");
-    push(@headerContent, "        return adoptRef(new $className(callback, globalObject));\n");
+    push(@headerContent, "        return adoptRef(*new $className(callback, globalObject));\n");
     push(@headerContent, "    }\n\n");
 
     # ScriptExecutionContext
index 8596405..db9d10f 100644 (file)
@@ -43,9 +43,9 @@ class CClass;
 
 class CInstance : public Instance {
 public:
-    static PassRefPtr<CInstance> create(NPObject* object, PassRefPtr<RootObject> rootObject)
+    static Ref<CInstance> create(NPObject* object, PassRefPtr<RootObject> rootObject)
     {
-        return adoptRef(new CInstance(object, rootObject));
+        return adoptRef(*new CInstance(object, rootObject));
     }
 
     static void setGlobalException(String);
index 9bc76d3..fb27ce9 100644 (file)
@@ -37,9 +37,9 @@ namespace WebCore {
 
 class CryptoKeyPair : public RefCounted<CryptoKeyPair> {
 public:
-    static PassRefPtr<CryptoKeyPair> create(PassRefPtr<CryptoKey> publicKey, PassRefPtr<CryptoKey> privateKey)
+    static Ref<CryptoKeyPair> create(PassRefPtr<CryptoKey> publicKey, PassRefPtr<CryptoKey> privateKey)
     {
-        return adoptRef(new CryptoKeyPair(publicKey, privateKey));
+        return adoptRef(*new CryptoKeyPair(publicKey, privateKey));
     }
     ~CryptoKeyPair();
 
index 0b7bb61..18b01b4 100644 (file)
@@ -36,9 +36,9 @@ namespace WebCore {
 
 class CryptoKeyAES final : public CryptoKey {
 public:
-    static PassRefPtr<CryptoKeyAES> create(CryptoAlgorithmIdentifier algorithm, const Vector<uint8_t>& key, bool extractable, CryptoKeyUsage usage)
+    static Ref<CryptoKeyAES> create(CryptoAlgorithmIdentifier algorithm, const Vector<uint8_t>& key, bool extractable, CryptoKeyUsage usage)
     {
-        return adoptRef(new CryptoKeyAES(algorithm, key, extractable, usage));
+        return adoptRef(*new CryptoKeyAES(algorithm, key, extractable, usage));
     }
     virtual ~CryptoKeyAES();
 
index b783c66..ca5131b 100644 (file)
@@ -35,9 +35,9 @@ namespace WebCore {
 
 class CryptoKeyHMAC final : public CryptoKey {
 public:
-    static PassRefPtr<CryptoKeyHMAC> create(const Vector<uint8_t>& key, CryptoAlgorithmIdentifier hash, bool extractable, CryptoKeyUsage usage)
+    static Ref<CryptoKeyHMAC> create(const Vector<uint8_t>& key, CryptoAlgorithmIdentifier hash, bool extractable, CryptoKeyUsage usage)
     {
-        return adoptRef(new CryptoKeyHMAC(key, hash, extractable, usage));
+        return adoptRef(*new CryptoKeyHMAC(key, hash, extractable, usage));
     }
     virtual ~CryptoKeyHMAC();
 
index 1fc4231..1aa5316 100644 (file)
@@ -49,9 +49,9 @@ class PromiseWrapper;
 
 class CryptoKeyRSA final : public CryptoKey {
 public:
-    static PassRefPtr<CryptoKeyRSA> create(CryptoAlgorithmIdentifier identifier, CryptoKeyType type, PlatformRSAKey platformKey, bool extractable, CryptoKeyUsage usage)
+    static Ref<CryptoKeyRSA> create(CryptoAlgorithmIdentifier identifier, CryptoKeyType type, PlatformRSAKey platformKey, bool extractable, CryptoKeyUsage usage)
     {
-        return adoptRef(new CryptoKeyRSA(identifier, type, platformKey, extractable, usage));
+        return adoptRef(*new CryptoKeyRSA(identifier, type, platformKey, extractable, usage));
     }
     static PassRefPtr<CryptoKeyRSA> create(CryptoAlgorithmIdentifier, const CryptoKeyDataRSAComponents&, bool extractable, CryptoKeyUsage);
     virtual ~CryptoKeyRSA();
index 0fa174c..b56ac22 100644 (file)
@@ -267,7 +267,7 @@ void CryptoKeyRSA::generatePair(CryptoAlgorithmIdentifier algorithm, unsigned mo
         dispatch_async(dispatch_get_main_queue(), ^{
             RefPtr<CryptoKeyRSA> publicKey = CryptoKeyRSA::create(algorithm, CryptoKeyType::Public, ccPublicKey, true, usage);
             RefPtr<CryptoKeyRSA> privateKey = CryptoKeyRSA::create(algorithm, CryptoKeyType::Private, ccPrivateKey, extractable, usage);
-            (*localCallback)(*CryptoKeyPair::create(publicKey.release(), privateKey.release()));
+            (*localCallback)(CryptoKeyPair::create(publicKey.release(), privateKey.release()));
             delete localCallback;
         });
     });
index 5bc83c2..58782c7 100644 (file)
@@ -36,9 +36,9 @@
 
 namespace WebCore {
 
-PassRefPtr<DOMWindowCSS> DOMWindowCSS::create()
+Ref<DOMWindowCSS> DOMWindowCSS::create()
 {
-    return adoptRef(new DOMWindowCSS());
+    return adoptRef(*new DOMWindowCSS);
 }
 
 static String valueWithoutImportant(const String& value)
index 79d5d97..105ecb6 100644 (file)
 #define DOMWindowCSS_h
 
 #include <wtf/Forward.h>
-#include <wtf/PassRefPtr.h>
+#include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
 
 class DOMWindowCSS : public RefCounted<DOMWindowCSS> {
 public:
-    WEBCORE_EXPORT static PassRefPtr<DOMWindowCSS> create();
+    WEBCORE_EXPORT static Ref<DOMWindowCSS> create();
 
     bool supports(const String& property, const String& value) const;
     bool supports(const String& conditionText) const;
index 5b5f0bd..2a31b42 100644 (file)
@@ -29,7 +29,7 @@ namespace WebCore {
 
 class DashboardRegion : public RectBase, public RefCounted<DashboardRegion> {
 public:
-    static PassRefPtr<DashboardRegion> create() { return adoptRef(new DashboardRegion); }
+    static Ref<DashboardRegion> create() { return adoptRef(*new DashboardRegion); }
     bool equals(const DashboardRegion& other) const
     {
         return m_label == other.m_label && m_geometryType == other.m_geometryType
index b6d6d91..37e7a6a 100644 (file)
@@ -51,9 +51,9 @@ class ScriptExecutionContext;
 
 class FontLoader final : public RefCounted<FontLoader>, public ActiveDOMObject, public EventTarget {
 public:
-    static PassRefPtr<FontLoader> create(Document* document)
+    static Ref<FontLoader> create(Document* document)
     {
-        return adoptRef<FontLoader>(new FontLoader(document));
+        return adoptRef<FontLoader>(*new FontLoader(document));
     }
     virtual ~FontLoader();
 
index e9f3d0b..e6c8518 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef DOMError_h
 #define DOMError_h
 
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
 
@@ -34,9 +33,9 @@ namespace WebCore {
 
 class DOMError : public RefCounted<DOMError> {
 public:
-    static PassRefPtr<DOMError> create(const String& name)
+    static Ref<DOMError> create(const String& name)
     {
-        return adoptRef(new DOMError(name));
+        return adoptRef(*new DOMError(name));
     }
     virtual ~DOMError() { }
 
index d365799..5b4511b 100644 (file)
@@ -37,9 +37,9 @@ namespace WebCore {
 //        than creating the list statically as is currently the only option.
 class DOMStringList : public RefCounted<DOMStringList> {
 public:
-    static PassRefPtr<DOMStringList> create()
+    static Ref<DOMStringList> create()
     {
-        return adoptRef(new DOMStringList());
+        return adoptRef(*new DOMStringList);
     }
 
     bool isEmpty() const { return m_strings.isEmpty(); }
index 384c85f..85fce75 100644 (file)
@@ -72,9 +72,9 @@ DataTransfer::DataTransfer(DataTransferAccessPolicy policy, std::unique_ptr<Past
 #endif
 }
 
-PassRefPtr<DataTransfer> DataTransfer::createForCopyAndPaste(DataTransferAccessPolicy policy)
+Ref<DataTransfer> DataTransfer::createForCopyAndPaste(DataTransferAccessPolicy policy)
 {
-    return adoptRef(new DataTransfer(policy, policy == DataTransferAccessPolicy::Writable ? Pasteboard::createPrivate() : Pasteboard::createForCopyAndPaste()));
+    return adoptRef(*new DataTransfer(policy, policy == DataTransferAccessPolicy::Writable ? Pasteboard::createPrivate() : Pasteboard::createForCopyAndPaste()));
 }
 
 DataTransfer::~DataTransfer()
@@ -229,14 +229,14 @@ void DataTransfer::setDragImage(Element*, int, int)
 
 #else
 
-PassRefPtr<DataTransfer> DataTransfer::createForDragAndDrop()
+Ref<DataTransfer> DataTransfer::createForDragAndDrop()
 {
-    return adoptRef(new DataTransfer(DataTransferAccessPolicy::Writable, Pasteboard::createForDragAndDrop(), DragAndDrop));
+    return adoptRef(*new DataTransfer(DataTransferAccessPolicy::Writable, Pasteboard::createForDragAndDrop(), DragAndDrop));
 }
 
-PassRefPtr<DataTransfer> DataTransfer::createForDragAndDrop(DataTransferAccessPolicy policy, const DragData& dragData)
+Ref<DataTransfer> DataTransfer::createForDragAndDrop(DataTransferAccessPolicy policy, const DragData& dragData)
 {
-    return adoptRef(new DataTransfer(policy, Pasteboard::createForDragAndDrop(dragData), DragAndDrop, dragData.containsFiles()));
+    return adoptRef(*new DataTransfer(policy, Pasteboard::createForDragAndDrop(dragData), DragAndDrop, dragData.containsFiles()));
 }
 
 bool DataTransfer::canSetDragImage() const
index ca83b9f..84a3011 100644 (file)
@@ -44,7 +44,7 @@ namespace WebCore {
 
     class DataTransfer : public RefCounted<DataTransfer> {
     public:
-        static PassRefPtr<DataTransfer> createForCopyAndPaste(DataTransferAccessPolicy);
+        static Ref<DataTransfer> createForCopyAndPaste(DataTransferAccessPolicy);
 
         WEBCORE_EXPORT ~DataTransfer();
 
@@ -82,8 +82,8 @@ namespace WebCore {
         Pasteboard& pasteboard() { return *m_pasteboard; }
 
 #if ENABLE(DRAG_SUPPORT)
-        static PassRefPtr<DataTransfer> createForDragAndDrop();
-        static PassRefPtr<DataTransfer> createForDragAndDrop(DataTransferAccessPolicy, const DragData&);
+        static Ref<DataTransfer> createForDragAndDrop();
+        static Ref<DataTransfer> createForDragAndDrop(DataTransferAccessPolicy, const DragData&);
 
         bool dropEffectIsUninitialized() const { return m_dropEffect == "uninitialized"; }
 
index 441c80d..83ac253 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<DeviceMotionData::Acceleration> DeviceMotionData::Acceleration::create(bool canProvideX, double x,
-                                                                                  bool canProvideY, double y,
-                                                                                  bool canProvideZ, double z)
+Ref<DeviceMotionData::Acceleration> DeviceMotionData::Acceleration::create(bool canProvideX, double x,
+                                                                           bool canProvideY, double y,
+                                                                           bool canProvideZ, double z)
 {
-    return adoptRef(new DeviceMotionData::Acceleration(canProvideX, x, canProvideY, y, canProvideZ, z));
+    return adoptRef(*new DeviceMotionData::Acceleration(canProvideX, x, canProvideY, y, canProvideZ, z));
 }
 
 DeviceMotionData::Acceleration::Acceleration(bool canProvideX, double x, bool canProvideY, double y, bool canProvideZ, double z)
@@ -46,11 +46,11 @@ DeviceMotionData::Acceleration::Acceleration(bool canProvideX, double x, bool ca
 {
 }
 
-PassRefPtr<DeviceMotionData::RotationRate> DeviceMotionData::RotationRate::create(bool canProvideAlpha, double alpha,
-                                                                                  bool canProvideBeta, double beta,
-                                                                                  bool canProvideGamma, double gamma)
+Ref<DeviceMotionData::RotationRate> DeviceMotionData::RotationRate::create(bool canProvideAlpha, double alpha,
+                                                                           bool canProvideBeta, double beta,
+                                                                           bool canProvideGamma, double gamma)
 {
-    return adoptRef(new DeviceMotionData::RotationRate(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma));
+    return adoptRef(*new DeviceMotionData::RotationRate(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma));
 }
 
 DeviceMotionData::RotationRate::RotationRate(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
@@ -63,15 +63,15 @@ DeviceMotionData::RotationRate::RotationRate(bool canProvideAlpha, double alpha,
 {
 }
 
-PassRefPtr<DeviceMotionData> DeviceMotionData::create()
+Ref<DeviceMotionData> DeviceMotionData::create()
 {
-    return adoptRef(new DeviceMotionData);
+    return adoptRef(*new DeviceMotionData);
 }
 
-PassRefPtr<DeviceMotionData> DeviceMotionData::create(PassRefPtr<Acceleration> acceleration, PassRefPtr<Acceleration> accelerationIncludingGravity,
-                                                      PassRefPtr<RotationRate> rotationRate, bool canProvideInterval, double interval)
+Ref<DeviceMotionData> DeviceMotionData::create(PassRefPtr<Acceleration> acceleration, PassRefPtr<Acceleration> accelerationIncludingGravity,
+                                               PassRefPtr<RotationRate> rotationRate, bool canProvideInterval, double interval)
 {
-    return adoptRef(new DeviceMotionData(acceleration, accelerationIncludingGravity, rotationRate, canProvideInterval, interval));
+    return adoptRef(*new DeviceMotionData(acceleration, accelerationIncludingGravity, rotationRate, canProvideInterval, interval));
 }
 
 DeviceMotionData::DeviceMotionData()
index f141a35..fded74f 100644 (file)
@@ -36,7 +36,7 @@ class DeviceMotionData : public RefCounted<DeviceMotionData> {
 public:
     class Acceleration : public RefCounted<DeviceMotionData::Acceleration> {
     public:
-        WEBCORE_EXPORT static PassRefPtr<Acceleration> create(bool canProvideX, double x, bool canProvideY, double y, bool canProvideZ, double z);
+        WEBCORE_EXPORT static Ref<Acceleration> create(bool canProvideX, double x, bool canProvideY, double y, bool canProvideZ, double z);
 
         bool canProvideX() const { return m_canProvideX; }
         bool canProvideY() const { return m_canProvideY; }
@@ -60,7 +60,7 @@ public:
 
     class RotationRate : public RefCounted<DeviceMotionData::RotationRate> {
     public:
-        WEBCORE_EXPORT static PassRefPtr<RotationRate> create(bool canProvideAlpha, double alpha, bool canProvideBeta,  double beta, bool canProvideGamma, double gamma);
+        WEBCORE_EXPORT static Ref<RotationRate> create(bool canProvideAlpha, double alpha, bool canProvideBeta,  double beta, bool canProvideGamma, double gamma);
 
         bool canProvideAlpha() const { return m_canProvideAlpha; }
         bool canProvideBeta() const { return m_canProvideBeta; }
@@ -82,9 +82,9 @@ public:
         bool m_canProvideGamma;
     };
 
-    WEBCORE_EXPORT static PassRefPtr<DeviceMotionData> create();
-    static PassRefPtr<DeviceMotionData> create(PassRefPtr<Acceleration> acceleration, PassRefPtr<Acceleration> accelerationIncludingGravity,
-                                               PassRefPtr<RotationRate> rotationRate, bool canProvideInterval, double interval);
+    WEBCORE_EXPORT static Ref<DeviceMotionData> create();
+    static Ref<DeviceMotionData> create(PassRefPtr<Acceleration> acceleration, PassRefPtr<Acceleration> accelerationIncludingGravity,
+                                        PassRefPtr<RotationRate> rotationRate, bool canProvideInterval, double interval);
 
     const Acceleration* acceleration() const { return m_acceleration.get(); }
     const Acceleration* accelerationIncludingGravity() const { return m_accelerationIncludingGravity.get(); }
index d6a5f2c..5465ca9 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<DeviceOrientationData> DeviceOrientationData::create()
+Ref<DeviceOrientationData> DeviceOrientationData::create()
 {
-    return adoptRef(new DeviceOrientationData);
+    return adoptRef(*new DeviceOrientationData);
 }
 
 #if PLATFORM(IOS)
 // FIXME: We should reconcile the iOS and OpenSource differences.
-PassRefPtr<DeviceOrientationData> DeviceOrientationData::create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma, bool canProvideCompassHeading, double compassHeading, bool canProvideCompassAccuracy, double compassAccuracy)
+Ref<DeviceOrientationData> DeviceOrientationData::create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma, bool canProvideCompassHeading, double compassHeading, bool canProvideCompassAccuracy, double compassAccuracy)
 {
-    return adoptRef(new DeviceOrientationData(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma, canProvideCompassHeading, compassHeading, canProvideCompassAccuracy, compassAccuracy));
+    return adoptRef(*new DeviceOrientationData(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma, canProvideCompassHeading, compassHeading, canProvideCompassAccuracy, compassAccuracy));
 }
 #else
-PassRefPtr<DeviceOrientationData> DeviceOrientationData::create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma, bool canProvideAbsolute, bool absolute)
+Ref<DeviceOrientationData> DeviceOrientationData::create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma, bool canProvideAbsolute, bool absolute)
 {
-    return adoptRef(new DeviceOrientationData(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma, canProvideAbsolute, absolute));
+    return adoptRef(*new DeviceOrientationData(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma, canProvideAbsolute, absolute));
 }
 #endif
 
index 48a7aac..cd9fd4f 100644 (file)
 #ifndef DeviceOrientationData_h
 #define DeviceOrientationData_h
 
-#include <wtf/PassRefPtr.h>
+#include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
 
 class DeviceOrientationData : public RefCounted<DeviceOrientationData> {
 public:
-    static PassRefPtr<DeviceOrientationData> create();
+    static Ref<DeviceOrientationData> create();
 #if PLATFORM(IOS)
-    WEBCORE_EXPORT static PassRefPtr<DeviceOrientationData> create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma, bool canProvideCompassHeading, double compassHeading, bool canProvideCompassAccuracy, double compassAccuracy);
+    WEBCORE_EXPORT static Ref<DeviceOrientationData> create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma, bool canProvideCompassHeading, double compassHeading, bool canProvideCompassAccuracy, double compassAccuracy);
 #else
-    WEBCORE_EXPORT static PassRefPtr<DeviceOrientationData> create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma, bool canProvideAbsolute = false, bool absolute = false);
+    WEBCORE_EXPORT static Ref<DeviceOrientationData> create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma, bool canProvideAbsolute = false, bool absolute = false);
 #endif
 
     double alpha() const;
index cec59bd..05f080d 100644 (file)
@@ -39,7 +39,7 @@ DocumentMarkerDetails::~DocumentMarkerDetails()
 
 class DocumentMarkerDescription : public DocumentMarkerDetails {
 public:
-    static PassRefPtr<DocumentMarkerDescription> create(const String&);
+    static Ref<DocumentMarkerDescription> create(const String&);
 
     const String& description() const { return m_description; }
     virtual bool isDescription() const override { return true; }
@@ -53,9 +53,9 @@ private:
     String m_description;
 };
 
-PassRefPtr<DocumentMarkerDescription> DocumentMarkerDescription::create(const String& description)
+Ref<DocumentMarkerDescription> DocumentMarkerDescription::create(const String& description)
 {
-    return adoptRef(new DocumentMarkerDescription(description));
+    return adoptRef(*new DocumentMarkerDescription(description));
 }
 
 inline DocumentMarkerDescription* toDocumentMarkerDescription(DocumentMarkerDetails* details)
index 6d73cae..9bceba5 100644 (file)
@@ -52,9 +52,9 @@ namespace WebCore {
 
 class AutocorrectionAlternativeDetails : public AlternativeTextDetails {
 public:
-    static PassRefPtr<AutocorrectionAlternativeDetails> create(const String& replacementString)
+    static Ref<AutocorrectionAlternativeDetails> create(const String& replacementString)
     {
-        return adoptRef(new AutocorrectionAlternativeDetails(replacementString));
+        return adoptRef(*new AutocorrectionAlternativeDetails(replacementString));
     }
     
     const String& replacementString() const { return m_replacementString; }
@@ -68,9 +68,9 @@ private:
 
 class DictationAlternativeDetails : public AlternativeTextDetails {
 public:
-    static PassRefPtr<DictationAlternativeDetails> create(uint64_t dictationContext)
+    static Ref<DictationAlternativeDetails> create(uint64_t dictationContext)
     {
-        return adoptRef(new DictationAlternativeDetails(dictationContext));
+        return adoptRef(*new DictationAlternativeDetails(dictationContext));
     }
 
     uint64_t dictationContext() const { return m_dictationContext; }
index b106ac5..1232196 100644 (file)
@@ -62,9 +62,9 @@ struct AlternativeTextInfo {
 
 class DictationMarkerDetails : public DocumentMarkerDetails {
 public:
-    static PassRefPtr<DictationMarkerDetails> create(const String& originalText, uint64_t dictationContext)
+    static Ref<DictationMarkerDetails> create(const String& originalText, uint64_t dictationContext)
     {
-        return adoptRef(new DictationMarkerDetails(originalText, dictationContext));
+        return adoptRef(*new DictationMarkerDetails(originalText, dictationContext));
     }
     const String& originalText() const { return m_originalText; }
     uint64_t dictationContext() const { return m_dictationContext; }
index 1854fd2..d64b04e 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class AppendNodeCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<AppendNodeCommand> create(PassRefPtr<ContainerNode> parent, PassRefPtr<Node> node)
+    static Ref<AppendNodeCommand> create(PassRefPtr<ContainerNode> parent, PassRefPtr<Node> node)
     {
-        return adoptRef(new AppendNodeCommand(parent, node));
+        return adoptRef(*new AppendNodeCommand(parent, node));
     }
 
 private:
index 10f6154..e99e36a 100644 (file)
@@ -48,21 +48,21 @@ public:
     enum EAddStyledElement { AddStyledElement, DoNotAddStyledElement };
     typedef bool (*IsInlineElementToRemoveFunction)(const Element*);
 
-    static PassRefPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
+    static Ref<ApplyStyleCommand> create(Document& document, const EditingStyle* style, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
     {
-        return adoptRef(new ApplyStyleCommand(document, style, action, level));
+        return adoptRef(*new ApplyStyleCommand(document, style, action, level));
     }
-    static PassRefPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, const Position& start, const Position& end, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
+    static Ref<ApplyStyleCommand> create(Document& document, const EditingStyle* style, const Position& start, const Position& end, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
     {
-        return adoptRef(new ApplyStyleCommand(document, style, start, end, action, level));
+        return adoptRef(*new ApplyStyleCommand(document, style, start, end, action, level));
     }
-    static PassRefPtr<ApplyStyleCommand> create(PassRefPtr<Element> element, bool removeOnly = false, EditAction action = EditActionChangeAttributes)
+    static Ref<ApplyStyleCommand> create(PassRefPtr<Element> element, bool removeOnly = false, EditAction action = EditActionChangeAttributes)
     {
-        return adoptRef(new ApplyStyleCommand(element, removeOnly, action));
+        return adoptRef(*new ApplyStyleCommand(element, removeOnly, action));
     }
-    static PassRefPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, IsInlineElementToRemoveFunction isInlineElementToRemoveFunction, EditAction action = EditActionChangeAttributes)
+    static Ref<ApplyStyleCommand> create(Document& document, const EditingStyle* style, IsInlineElementToRemoveFunction isInlineElementToRemoveFunction, EditAction action = EditActionChangeAttributes)
     {
-        return adoptRef(new ApplyStyleCommand(document, style, isInlineElementToRemoveFunction, action));
+        return adoptRef(*new ApplyStyleCommand(document, style, isInlineElementToRemoveFunction, action));
     }
 
 private:
index 438e15a..7ced950 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class BreakBlockquoteCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<BreakBlockquoteCommand> create(Document& document)
+    static Ref<BreakBlockquoteCommand> create(Document& document)
     {
-        return adoptRef(new BreakBlockquoteCommand(document));
+        return adoptRef(*new BreakBlockquoteCommand(document));
     }
 
 private:
index 372b557..6e033b9 100644 (file)
@@ -76,10 +76,10 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-PassRefPtr<EditCommandComposition> EditCommandComposition::create(Document& document,
+Ref<EditCommandComposition> EditCommandComposition::create(Document& document,
     const VisibleSelection& startingSelection, const VisibleSelection& endingSelection, EditAction editAction)
 {
-    return adoptRef(new EditCommandComposition(document, startingSelection, endingSelection, editAction));
+    return adoptRef(*new EditCommandComposition(document, startingSelection, endingSelection, editAction));
 }
 
 EditCommandComposition::EditCommandComposition(Document& document, const VisibleSelection& startingSelection, const VisibleSelection& endingSelection, EditAction editAction)
index 5ff8862..c2b489d 100644 (file)
@@ -40,7 +40,7 @@ class Text;
 
 class EditCommandComposition : public UndoStep {
 public:
-    static PassRefPtr<EditCommandComposition> create(Document&, const VisibleSelection&, const VisibleSelection&, EditAction);
+    static Ref<EditCommandComposition> create(Document&, const VisibleSelection&, const VisibleSelection&, EditAction);
 
     virtual void unapply() override;
     virtual void reapply() override;
index 92b3dc7..88cece1 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class CreateLinkCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<CreateLinkCommand> create(Document& document, const String& linkURL)
+    static Ref<CreateLinkCommand> create(Document& document, const String& linkURL)
     {
-        return adoptRef(new CreateLinkCommand(document, linkURL));
+        return adoptRef(*new CreateLinkCommand(document, linkURL));
     }
 
     bool isCreateLinkCommand() const { return true; }
index 8d1f673..2491f05 100644 (file)
@@ -34,9 +34,9 @@ class Text;
 
 class DeleteFromTextNodeCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<DeleteFromTextNodeCommand> create(PassRefPtr<Text> node, unsigned offset, unsigned count)
+    static Ref<DeleteFromTextNodeCommand> create(PassRefPtr<Text> node, unsigned offset, unsigned count)
     {
-        return adoptRef(new DeleteFromTextNodeCommand(node, offset, count));
+        return adoptRef(*new DeleteFromTextNodeCommand(node, offset, count));
     }
 
 private:
index 19667d0..e5bf51d 100644 (file)
@@ -34,13 +34,13 @@ class EditingStyle;
 
 class DeleteSelectionCommand : public CompositeEditCommand { 
 public:
-    static PassRefPtr<DeleteSelectionCommand> create(Document& document, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = false, bool sanitizeMarkup = true)
+    static Ref<DeleteSelectionCommand> create(Document& document, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = false, bool sanitizeMarkup = true)
     {
-        return adoptRef(new DeleteSelectionCommand(document, smartDelete, mergeBlocksAfterDelete, replace, expandForSpecialElements, sanitizeMarkup));
+        return adoptRef(*new DeleteSelectionCommand(document, smartDelete, mergeBlocksAfterDelete, replace, expandForSpecialElements, sanitizeMarkup));
     }
-    static PassRefPtr<DeleteSelectionCommand> create(const VisibleSelection& selection, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = false, bool sanitizeMarkup = true)
+    static Ref<DeleteSelectionCommand> create(const VisibleSelection& selection, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = false, bool sanitizeMarkup = true)
     {
-        return adoptRef(new DeleteSelectionCommand(selection, smartDelete, mergeBlocksAfterDelete, replace, expandForSpecialElements, sanitizeMarkup));
+        return adoptRef(*new DeleteSelectionCommand(selection, smartDelete, mergeBlocksAfterDelete, replace, expandForSpecialElements, sanitizeMarkup));
     }
 
 protected:
index 88866e8..c173df4 100644 (file)
@@ -55,9 +55,9 @@ private:
 
 class DictationMarkerSupplier : public TextInsertionMarkerSupplier {
 public:
-    static PassRefPtr<DictationMarkerSupplier> create(const Vector<DictationAlternative>& alternatives)
+    static Ref<DictationMarkerSupplier> create(const Vector<DictationAlternative>& alternatives)
     {
-        return adoptRef(new DictationMarkerSupplier(alternatives));
+        return adoptRef(*new DictationMarkerSupplier(alternatives));
     }
 
     virtual void addMarkersToTextNode(Text* textNode, unsigned offsetOfInsertion, const String& textToBeInserted)
index d4f6d45..22feb17 100644 (file)
@@ -39,9 +39,9 @@ public:
     static void insertText(Document&, const String&, const Vector<DictationAlternative>& alternatives, const VisibleSelection&);
     virtual bool isDictationCommand() const { return true; }
 private:
-    static PassRefPtr<DictationCommand> create(Document& document, const String& text, const Vector<DictationAlternative>& alternatives)
+    static Ref<DictationCommand> create(Document& document, const String& text, const Vector<DictationAlternative>& alternatives)
     {
-        return adoptRef(new DictationCommand(document, text, alternatives));
+        return adoptRef(*new DictationCommand(document, text, alternatives));
     }
 
     DictationCommand(Document&, const String& text, const Vector<DictationAlternative>& alternatives);
index 8ee7550..9541caa 100644 (file)
@@ -70,29 +70,29 @@ public:
     enum ShouldExtractMatchingStyle { ExtractMatchingStyle, DoNotExtractMatchingStyle };
     static float NoFontDelta;
 
-    static PassRefPtr<EditingStyle> create()
+    static Ref<EditingStyle> create()
     {
-        return adoptRef(new EditingStyle());
+        return adoptRef(*new EditingStyle);
     }
 
-    static PassRefPtr<EditingStyle> create(Node* node, PropertiesToInclude propertiesToInclude = OnlyEditingInheritableProperties)
+    static Ref<EditingStyle> create(Node* node, PropertiesToInclude propertiesToInclude = OnlyEditingInheritableProperties)
     {
-        return adoptRef(new EditingStyle(node, propertiesToInclude));
+        return adoptRef(*new EditingStyle(node, propertiesToInclude));
     }
 
-    static PassRefPtr<EditingStyle> create(const Position& position, PropertiesToInclude propertiesToInclude = OnlyEditingInheritableProperties)
+    static Ref<EditingStyle> create(const Position& position, PropertiesToInclude propertiesToInclude = OnlyEditingInheritableProperties)
     {
-        return adoptRef(new EditingStyle(position, propertiesToInclude));
+        return adoptRef(*new EditingStyle(position, propertiesToInclude));
     }
 
-    static PassRefPtr<EditingStyle> create(const StyleProperties* style)
+    static Ref<EditingStyle> create(const StyleProperties* style)
     {
-        return adoptRef(new EditingStyle(style));
+        return adoptRef(*new EditingStyle(style));
     }
 
-    static PassRefPtr<EditingStyle> create(CSSPropertyID propertyID, const String& value)
+    static Ref<EditingStyle> create(CSSPropertyID propertyID, const String& value)
     {
-        return adoptRef(new EditingStyle(propertyID, value));
+        return adoptRef(*new EditingStyle(propertyID, value));
     }
 
     WEBCORE_EXPORT ~EditingStyle();
index 5d73417..7d84003 100644 (file)
@@ -895,7 +895,7 @@ void Editor::applyStyle(StyleProperties* style, EditAction editingAction)
         break;
     case VisibleSelection::RangeSelection:
         if (style)
-            applyCommand(ApplyStyleCommand::create(document(), EditingStyle::create(style).get(), editingAction));
+            applyCommand(ApplyStyleCommand::create(document(), EditingStyle::create(style).ptr(), editingAction));
         break;
     }
 }
@@ -914,7 +914,7 @@ void Editor::applyParagraphStyle(StyleProperties* style, EditAction editingActio
     case VisibleSelection::CaretSelection:
     case VisibleSelection::RangeSelection:
         if (style)
-            applyCommand(ApplyStyleCommand::create(document(), EditingStyle::create(style).get(), editingAction, ApplyStyleCommand::ForceBlockProperties));
+            applyCommand(ApplyStyleCommand::create(document(), EditingStyle::create(style).ptr(), editingAction, ApplyStyleCommand::ForceBlockProperties));
         break;
     }
 }
index b45ded3..8c01c02 100644 (file)
@@ -40,9 +40,9 @@ class VisiblePosition;
 
 class FormatBlockCommand : public ApplyBlockElementCommand {
 public:
-    static PassRefPtr<FormatBlockCommand> create(Document& document, const QualifiedName& tagName)
+    static Ref<FormatBlockCommand> create(Document& document, const QualifiedName& tagName)
     {
-        return adoptRef(new FormatBlockCommand(document, tagName));
+        return adoptRef(*new FormatBlockCommand(document, tagName));
     }
     
     virtual bool preservesTypingStyle() const { return true; }
index de92a70..92a428a 100644 (file)
@@ -34,9 +34,9 @@ namespace WebCore {
 class IndentOutdentCommand : public ApplyBlockElementCommand {
 public:
     enum EIndentType { Indent, Outdent };
-    static PassRefPtr<IndentOutdentCommand> create(Document& document, EIndentType type, int marginInPixels = 0)
+    static Ref<IndentOutdentCommand> create(Document& document, EIndentType type, int marginInPixels = 0)
     {
-        return adoptRef(new IndentOutdentCommand(document, type, marginInPixels));
+        return adoptRef(*new IndentOutdentCommand(document, type, marginInPixels));
     }
 
     virtual bool preservesTypingStyle() const { return true; }
index f2864f5..310bbb3 100644 (file)
@@ -34,9 +34,9 @@ class Text;
 
 class InsertIntoTextNodeCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<InsertIntoTextNodeCommand> create(PassRefPtr<Text> node, unsigned offset, const String& text)
+    static Ref<InsertIntoTextNodeCommand> create(PassRefPtr<Text> node, unsigned offset, const String& text)
     {
-        return adoptRef(new InsertIntoTextNodeCommand(node, offset, text));
+        return adoptRef(*new InsertIntoTextNodeCommand(node, offset, text));
     }
 
 private:
index 700a968..5f8ac58 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class InsertLineBreakCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<InsertLineBreakCommand> create(Document& document)
+    static Ref<InsertLineBreakCommand> create(Document& document)
     {
-        return adoptRef(new InsertLineBreakCommand(document));
+        return adoptRef(*new InsertLineBreakCommand(document));
     }
 
 private:
index 1b01dc5..d4b762d 100644 (file)
@@ -32,10 +32,10 @@ namespace WebCore {
 
 class InsertNodeBeforeCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<InsertNodeBeforeCommand> create(PassRefPtr<Node> childToInsert, PassRefPtr<Node> childToInsertBefore,
+    static Ref<InsertNodeBeforeCommand> create(PassRefPtr<Node> childToInsert, PassRefPtr<Node> childToInsertBefore,
         ShouldAssumeContentIsAlwaysEditable shouldAssumeContentIsAlwaysEditable)
     {
-        return adoptRef(new InsertNodeBeforeCommand(childToInsert, childToInsertBefore, shouldAssumeContentIsAlwaysEditable));
+        return adoptRef(*new InsertNodeBeforeCommand(childToInsert, childToInsertBefore, shouldAssumeContentIsAlwaysEditable));
     }
 
 private:
index b297d0a..1281f0c 100644 (file)
@@ -34,9 +34,9 @@ class EditingStyle;
 
 class InsertParagraphSeparatorCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<InsertParagraphSeparatorCommand> create(Document& document, bool useDefaultParagraphElement = false, bool pasteBlockqutoeIntoUnquotedArea = false)
+    static Ref<InsertParagraphSeparatorCommand> create(Document& document, bool useDefaultParagraphElement = false, bool pasteBlockqutoeIntoUnquotedArea = false)
     {
-        return adoptRef(new InsertParagraphSeparatorCommand(document, useDefaultParagraphElement, pasteBlockqutoeIntoUnquotedArea));
+        return adoptRef(*new InsertParagraphSeparatorCommand(document, useDefaultParagraphElement, pasteBlockqutoeIntoUnquotedArea));
     }
 
 private:
index 39f1f75..f10d2fe 100644 (file)
@@ -48,15 +48,15 @@ public:
         RebalanceAllWhitespaces
     };
 
-    static PassRefPtr<InsertTextCommand> create(Document& document, const String& text, bool selectInsertedText = false,
+    static Ref<InsertTextCommand> create(Document& document, const String& text, bool selectInsertedText = false,
         RebalanceType rebalanceType = RebalanceLeadingAndTrailingWhitespaces)
     {
-        return adoptRef(new InsertTextCommand(document, text, selectInsertedText, rebalanceType));
+        return adoptRef(*new InsertTextCommand(document, text, selectInsertedText, rebalanceType));
     }
 
-    static PassRefPtr<InsertTextCommand> createWithMarkerSupplier(Document& document, const String& text, PassRefPtr<TextInsertionMarkerSupplier> markerSupplier)
+    static Ref<InsertTextCommand> createWithMarkerSupplier(Document& document, const String& text, PassRefPtr<TextInsertionMarkerSupplier> markerSupplier)
     {
-        return adoptRef(new InsertTextCommand(document, text, markerSupplier));
+        return adoptRef(*new InsertTextCommand(document, text, markerSupplier));
     }
 
 private:
index 5a5dd72..638828c 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class MergeIdenticalElementsCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<MergeIdenticalElementsCommand> create(PassRefPtr<Element> element1, PassRefPtr<Element> element2)
+    static Ref<MergeIdenticalElementsCommand> create(PassRefPtr<Element> element1, PassRefPtr<Element> element2)
     {
-        return adoptRef(new MergeIdenticalElementsCommand(element1, element2));
+        return adoptRef(*new MergeIdenticalElementsCommand(element1, element2));
     }
 
 private:
index 367af64..ed694ca 100644 (file)
@@ -57,9 +57,9 @@ private:
     enum Type { InheritedListType, OrderedList, UnorderedList };
     static PassRefPtr<Node> increaseSelectionListLevel(Document*, Type);
 
-    static PassRefPtr<IncreaseSelectionListLevelCommand> create(Document& document, Type type)
+    static Ref<IncreaseSelectionListLevelCommand> create(Document& document, Type type)
     {
-        return adoptRef(new IncreaseSelectionListLevelCommand(document, type));
+        return adoptRef(*new IncreaseSelectionListLevelCommand(document, type));
     }
     
     IncreaseSelectionListLevelCommand(Document&, Type);
@@ -77,9 +77,9 @@ public:
     static void decreaseSelectionListLevel(Document*);
 
 private:
-    static PassRefPtr<DecreaseSelectionListLevelCommand> create(Document& document)
+    static Ref<DecreaseSelectionListLevelCommand> create(Document& document)
     {
-        return adoptRef(new DecreaseSelectionListLevelCommand(document));
+        return adoptRef(*new DecreaseSelectionListLevelCommand(document));
     }
 
     explicit DecreaseSelectionListLevelCommand(Document&);
index 14943b5..ac09995 100644 (file)
@@ -34,9 +34,9 @@ class DocumentFragment;
 
 class MoveSelectionCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<MoveSelectionCommand> create(PassRefPtr<DocumentFragment> fragment, const Position& position, bool smartInsert = false, bool smartDelete = false)
+    static Ref<MoveSelectionCommand> create(PassRefPtr<DocumentFragment> fragment, const Position& position, bool smartInsert = false, bool smartDelete = false)
     {
-        return adoptRef(new MoveSelectionCommand(fragment, position, smartInsert, smartDelete));
+        return adoptRef(*new MoveSelectionCommand(fragment, position, smartInsert, smartDelete));
     }
 
 private:
index 00457fd..e323031 100644 (file)
@@ -35,9 +35,9 @@ class StyledElement;
 
 class RemoveCSSPropertyCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<RemoveCSSPropertyCommand> create(Document& document, PassRefPtr<StyledElement> element, CSSPropertyID property)
+    static Ref<RemoveCSSPropertyCommand> create(Document& document, PassRefPtr<StyledElement> element, CSSPropertyID property)
     {
-        return adoptRef(new RemoveCSSPropertyCommand(document, element, property));
+        return adoptRef(*new RemoveCSSPropertyCommand(document, element, property));
     }
 
 private:
index f014adf..ce86332 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class RemoveFormatCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<RemoveFormatCommand> create(Document& document)
+    static Ref<RemoveFormatCommand> create(Document& document)
     {
-        return adoptRef(new RemoveFormatCommand(document));
+        return adoptRef(*new RemoveFormatCommand(document));
     }
 
 private:
index b4b12c1..181e985 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class RemoveNodeCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<RemoveNodeCommand> create(PassRefPtr<Node> node, ShouldAssumeContentIsAlwaysEditable shouldAssumeContentIsAlwaysEditable)
+    static Ref<RemoveNodeCommand> create(PassRefPtr<Node> node, ShouldAssumeContentIsAlwaysEditable shouldAssumeContentIsAlwaysEditable)
     {
-        return adoptRef(new RemoveNodeCommand(node, shouldAssumeContentIsAlwaysEditable));
+        return adoptRef(*new RemoveNodeCommand(node, shouldAssumeContentIsAlwaysEditable));
     }
 
 private:
index db5219d..4b91974 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class RemoveNodePreservingChildrenCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<RemoveNodePreservingChildrenCommand> create(PassRefPtr<Node> node, ShouldAssumeContentIsAlwaysEditable shouldAssumeContentIsAlwaysEditable)
+    static Ref<RemoveNodePreservingChildrenCommand> create(PassRefPtr<Node> node, ShouldAssumeContentIsAlwaysEditable shouldAssumeContentIsAlwaysEditable)
     {
-        return adoptRef(new RemoveNodePreservingChildrenCommand(node, shouldAssumeContentIsAlwaysEditable));
+        return adoptRef(*new RemoveNodePreservingChildrenCommand(node, shouldAssumeContentIsAlwaysEditable));
     }
 
 private:
index faa2da4..1513ad1 100644 (file)
@@ -40,9 +40,9 @@ class HTMLElement;
 // More accurately, this is ReplaceElementWithSpanPreservingChildrenAndAttributesCommand
 class ReplaceNodeWithSpanCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<ReplaceNodeWithSpanCommand> create(PassRefPtr<HTMLElement> element)
+    static Ref<ReplaceNodeWithSpanCommand> create(PassRefPtr<HTMLElement> element)
     {
-        return adoptRef(new ReplaceNodeWithSpanCommand(element));
+        return adoptRef(*new ReplaceNodeWithSpanCommand(element));
     }
 
     HTMLElement* spanElement() { return m_spanElement.get(); }
index f71b11c..5636d4b 100644 (file)
@@ -48,9 +48,9 @@ public:
 
     typedef unsigned CommandOptions;
 
-    static PassRefPtr<ReplaceSelectionCommand> create(Document& document, PassRefPtr<DocumentFragment> fragment, CommandOptions options, EditAction action = EditActionPaste)
+    static Ref<ReplaceSelectionCommand> create(Document& document, PassRefPtr<DocumentFragment> fragment, CommandOptions options, EditAction action = EditActionPaste)
     {
-        return adoptRef(new ReplaceSelectionCommand(document, fragment, options, action));
+        return adoptRef(*new ReplaceSelectionCommand(document, fragment, options, action));
     }
 
 private:
index 75f7e80..3c69579 100644 (file)
@@ -33,9 +33,9 @@ namespace WebCore {
 
 class SetNodeAttributeCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<SetNodeAttributeCommand> create(PassRefPtr<Element> element, const QualifiedName& attribute, const AtomicString& value)
+    static Ref<SetNodeAttributeCommand> create(PassRefPtr<Element> element, const QualifiedName& attribute, const AtomicString& value)
     {
-        return adoptRef(new SetNodeAttributeCommand(element, attribute, value));
+        return adoptRef(*new SetNodeAttributeCommand(element, attribute, value));
     }
 
 private:
index f9d7f4b..58f3052 100644 (file)
@@ -33,9 +33,9 @@ namespace WebCore {
 
 class SetSelectionCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<SetSelectionCommand> create(const VisibleSelection& selection, FrameSelection::SetSelectionOptions options)
+    static Ref<SetSelectionCommand> create(const VisibleSelection& selection, FrameSelection::SetSelectionOptions options)
     {
-        return adoptRef(new SetSelectionCommand(selection, options));
+        return adoptRef(*new SetSelectionCommand(selection, options));
     }
 
 private:
index d09de25..91f802e 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class SimplifyMarkupCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<SimplifyMarkupCommand> create(Document& document, Node* firstNode, Node* nodeAfterLast)
+    static Ref<SimplifyMarkupCommand> create(Document& document, Node* firstNode, Node* nodeAfterLast)
     {
-        return adoptRef(new SimplifyMarkupCommand(document, firstNode, nodeAfterLast));
+        return adoptRef(*new SimplifyMarkupCommand(document, firstNode, nodeAfterLast));
     }
 
 private:
index 7ce2968..de73cbb 100644 (file)
@@ -57,16 +57,16 @@ SpellCheckRequest::~SpellCheckRequest()
 }
 
 // static
-PassRefPtr<SpellCheckRequest> SpellCheckRequest::create(TextCheckingTypeMask textCheckingOptions, TextCheckingProcessType processType, PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragraphRange)
+RefPtr<SpellCheckRequest> SpellCheckRequest::create(TextCheckingTypeMask textCheckingOptions, TextCheckingProcessType processType, PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragraphRange)
 {
     ASSERT(checkingRange);
     ASSERT(paragraphRange);
 
     String text = checkingRange->text();
     if (!text.length())
-        return PassRefPtr<SpellCheckRequest>();
+        return nullptr;
 
-    return adoptRef(new SpellCheckRequest(checkingRange, paragraphRange, text, textCheckingOptions, processType));
+    return adoptRef(*new SpellCheckRequest(checkingRange, paragraphRange, text, textCheckingOptions, processType));
 }
 
 const TextCheckingRequestData& SpellCheckRequest::data() const
index 6353f70..7b9b9cc 100644 (file)
@@ -45,7 +45,7 @@ class SpellChecker;
 
 class SpellCheckRequest : public TextCheckingRequest {
 public:
-    static PassRefPtr<SpellCheckRequest> create(TextCheckingTypeMask, TextCheckingProcessType, PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragraphRange);
+    static RefPtr<SpellCheckRequest> create(TextCheckingTypeMask, TextCheckingProcessType, PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragraphRange);
     virtual ~SpellCheckRequest();
 
     PassRefPtr<Range> checkingRange() const { return m_checkingRange; }
index a3639e5..6fe7107 100644 (file)
@@ -43,9 +43,9 @@ namespace WebCore {
 // This information is needed by spell checking service to update user specific data.
 class SpellingCorrectionRecordUndoCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<SpellingCorrectionRecordUndoCommand> create(Document& document, const String& corrected, const String& correction)
+    static Ref<SpellingCorrectionRecordUndoCommand> create(Document& document, const String& corrected, const String& correction)
     {
-        return adoptRef(new SpellingCorrectionRecordUndoCommand(document, corrected, correction));
+        return adoptRef(*new SpellingCorrectionRecordUndoCommand(document, corrected, correction));
     }
 private:
     SpellingCorrectionRecordUndoCommand(Document& document, const String& corrected, const String& correction)
index 51871b5..0451f62 100644 (file)
@@ -33,9 +33,9 @@ namespace WebCore {
 
 class SpellingCorrectionCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<SpellingCorrectionCommand> create(PassRefPtr<Range> rangeToBeCorrected, const String& correction)
+    static Ref<SpellingCorrectionCommand> create(PassRefPtr<Range> rangeToBeCorrected, const String& correction)
     {
-        return adoptRef(new SpellingCorrectionCommand(rangeToBeCorrected, correction));
+        return adoptRef(*new SpellingCorrectionCommand(rangeToBeCorrected, correction));
     }
 private:
     SpellingCorrectionCommand(PassRefPtr<Range> rangeToBeCorrected, const String& correction);
index 0eaf06d..76b3022 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class SplitElementCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<SplitElementCommand> create(PassRefPtr<Element> element, PassRefPtr<Node> splitPointChild)
+    static Ref<SplitElementCommand> create(PassRefPtr<Element> element, PassRefPtr<Node> splitPointChild)
     {
-        return adoptRef(new SplitElementCommand(element, splitPointChild));
+        return adoptRef(*new SplitElementCommand(element, splitPointChild));
     }
 
 private:
index 5e062a9..71a0049 100644 (file)
@@ -34,9 +34,9 @@ class Text;
 
 class SplitTextNodeCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<SplitTextNodeCommand> create(PassRefPtr<Text> node, int offset)
+    static Ref<SplitTextNodeCommand> create(PassRefPtr<Text> node, int offset)
     {
-        return adoptRef(new SplitTextNodeCommand(node, offset));
+        return adoptRef(*new SplitTextNodeCommand(node, offset));
     }
 
 private:
index 703a909..b014ecb 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class SplitTextNodeContainingElementCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<SplitTextNodeContainingElementCommand> create(PassRefPtr<Text> node, int offset)
+    static Ref<SplitTextNodeContainingElementCommand> create(PassRefPtr<Text> node, int offset)
     {
-        return adoptRef(new SplitTextNodeContainingElementCommand(node, offset));
+        return adoptRef(*new SplitTextNodeContainingElementCommand(node, offset));
     }
 
 private:
index a962aff..eab8242 100644 (file)
@@ -85,14 +85,14 @@ public:
 #endif
 
 private:
-    static PassRefPtr<TypingCommand> create(Document& document, ETypingCommand command, const String& text = "", Options options = 0, TextGranularity granularity = CharacterGranularity)
+    static Ref<TypingCommand> create(Document& document, ETypingCommand command, const String& text = "", Options options = 0, TextGranularity granularity = CharacterGranularity)
     {
-        return adoptRef(new TypingCommand(document, command, text, options, granularity, TextCompositionNone));
+        return adoptRef(*new TypingCommand(document, command, text, options, granularity, TextCompositionNone));
     }
 
-    static PassRefPtr<TypingCommand> create(Document& document, ETypingCommand command, const String& text, Options options, TextCompositionType compositionType)
+    static Ref<TypingCommand> create(Document& document, ETypingCommand command, const String& text, Options options, TextCompositionType compositionType)
     {
-        return adoptRef(new TypingCommand(document, command, text, options, CharacterGranularity, compositionType));
+        return adoptRef(*new TypingCommand(document, command, text, options, CharacterGranularity, compositionType));
     }
 
     TypingCommand(Document&, ETypingCommand, const String& text, Options, TextGranularity, TextCompositionType);
index 1dbb9ea..6c24a5c 100644 (file)
@@ -32,9 +32,9 @@ namespace WebCore {
 
 class UnlinkCommand : public CompositeEditCommand {
 public:
-    static PassRefPtr<UnlinkCommand> create(Document& document)
+    static Ref<UnlinkCommand> create(Document& document)
     {
-        return adoptRef(new UnlinkCommand(document));
+        return adoptRef(*new UnlinkCommand(document));
     }
 
 private:
index 1a95d60..481f96d 100644 (file)
@@ -34,9 +34,9 @@ class HTMLElement;
 
 class WrapContentsInDummySpanCommand : public SimpleEditCommand {
 public:
-    static PassRefPtr<WrapContentsInDummySpanCommand> create(PassRefPtr<Element> element)
+    static Ref<WrapContentsInDummySpanCommand> create(PassRefPtr<Element> element)
     {
-        return adoptRef(new WrapContentsInDummySpanCommand(element));
+        return adoptRef(*new WrapContentsInDummySpanCommand(element));
     }
 
 private:
index eddf052..561198c 100644 (file)
@@ -36,9 +36,9 @@ namespace WebCore {
 
 class DictationCommandIOS : public CompositeEditCommand {
 public:
-    static PassRefPtr<DictationCommandIOS> create(Document& document, PassOwnPtr<Vector<Vector<String> > > dictationPhrase, RetainPtr<id> metadata)
+    static Ref<DictationCommandIOS> create(Document& document, PassOwnPtr<Vector<Vector<String> > > dictationPhrase, RetainPtr<id> metadata)
     {
-        return adoptRef(new DictationCommandIOS(document, dictationPhrase, metadata));
+        return adoptRef(*new DictationCommandIOS(document, dictationPhrase, metadata));
     }
     
     virtual ~DictationCommandIOS();
index dffcad6..49583ef 100644 (file)
@@ -34,7 +34,6 @@
 #include "BlobPart.h"
 #include "ScriptWrappable.h"
 #include "URLRegistry.h"
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
 
@@ -44,25 +43,25 @@ class ScriptExecutionContext;
 
 class Blob : public ScriptWrappable, public URLRegistrable, public RefCounted<Blob> {
 public:
-    static PassRefPtr<Blob> create()
+    static Ref<Blob> create()
     {
-        return adoptRef(new Blob);
+        return adoptRef(*new Blob);
     }
 
-    static PassRefPtr<Blob> create(Vector<char> data, const String& contentType)
+    static Ref<Blob> create(Vector<char> data, const String& contentType)
     {
-        return adoptRef(new Blob(WTF::move(data), contentType));
+        return adoptRef(*new Blob(WTF::move(data), contentType));
     }
 
-    static PassRefPtr<Blob> create(Vector<BlobPart> blobParts, const String& contentType)
+    static Ref<Blob> create(Vector<BlobPart> blobParts, const String& contentType)
     {
-        return adoptRef(new Blob(WTF::move(blobParts), contentType));
+        return adoptRef(*new Blob(WTF::move(blobParts), contentType));
     }
 
-    static PassRefPtr<Blob> deserialize(const URL& srcURL, const String& type, long long size)
+    static Ref<Blob> deserialize(const URL& srcURL, const String& type, long long size)
     {
         ASSERT(Blob::isNormalizedContentType(type));
-        return adoptRef(new Blob(deserializationContructor, srcURL, type, size));
+        return adoptRef(*new Blob(deserializationContructor, srcURL, type, size));
     }
 
     virtual ~Blob();
@@ -84,9 +83,9 @@ public:
     // URLRegistrable
     virtual URLRegistry& registry() const override;
 
-    PassRefPtr<Blob> slice(long long start = 0, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const
+    Ref<Blob> slice(long long start = 0, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const
     {
-        return adoptRef(new Blob(m_internalURL, start, end, contentType));
+        return adoptRef(*new Blob(m_internalURL, start, end, contentType));
     }
 
 protected:
index bd16a47..35c4da8 100644 (file)
@@ -27,7 +27,7 @@
 #define File_h
 
 #include "Blob.h"
-#include <wtf/PassRefPtr.h>
+#include <wtf/Ref.h>
 #include <wtf/TypeCasts.h>
 #include <wtf/text/WTFString.h>
 
@@ -37,22 +37,22 @@ class URL;
 
 class File final : public Blob {
 public:
-    static PassRefPtr<File> create(const String& path)
+    static Ref<File> create(const String& path)
     {
-        return adoptRef(new File(path));
+        return adoptRef(*new File(path));
     }
 
-    static PassRefPtr<File> deserialize(const String& path, const URL& srcURL, const String& type, const String& name)
+    static Ref<File> deserialize(const String& path, const URL& srcURL, const String& type, const String& name)
     {
-        return adoptRef(new File(deserializationContructor, path, srcURL, type, name));
+        return adoptRef(*new File(deserializationContructor, path, srcURL, type, name));
     }
 
     // Create a file with a name exposed to the author (via File.name and associated DOM properties) that differs from the one provided in the path.
-    static PassRefPtr<File> createWithName(const String& path, const String& nameOverride)
+    static Ref<File> createWithName(const String& path, const String& nameOverride)
     {
         if (nameOverride.isEmpty())
-            return adoptRef(new File(path));
-        return adoptRef(new File(path, nameOverride));
+            return adoptRef(*new File(path));
+        return adoptRef(*new File(path, nameOverride));
     }
 
     virtual bool isFile() const override { return true; }
index bbe6deb..af48db3 100644 (file)
@@ -37,14 +37,14 @@ namespace WebCore {
 
 class FileList : public ScriptWrappable, public RefCounted<FileList> {
 public:
-    static PassRefPtr<FileList> create()
+    static Ref<FileList> create()
     {
-        return adoptRef(new FileList);
+        return adoptRef(*new FileList);
     }
 
-    static PassRefPtr<FileList> create(Vector<RefPtr<File>>&& files)
+    static Ref<FileList> create(Vector<RefPtr<File>>&& files)
     {
-        return adoptRef(new FileList(WTF::move(files)));
+        return adoptRef(*new FileList(WTF::move(files)));
     }
 
     unsigned length() const { return m_files.size(); }
index 06f305b..7318188 100644 (file)
@@ -45,11 +45,11 @@ namespace WebCore {
 
 static const auto progressNotificationInterval = std::chrono::milliseconds(50);
 
-PassRefPtr<FileReader> FileReader::create(ScriptExecutionContext& context)
+Ref<FileReader> FileReader::create(ScriptExecutionContext& context)
 {
-    RefPtr<FileReader> fileReader(adoptRef(new FileReader(context)));
+    Ref<FileReader> fileReader = adoptRef(*new FileReader(context));
     fileReader->suspendIfNeeded();
-    return fileReader.release();
+    return fileReader;
 }
 
 FileReader::FileReader(ScriptExecutionContext& context)
index c30e4c0..f002f79 100644 (file)
@@ -54,7 +54,7 @@ typedef int ExceptionCode;
 
 class FileReader final : public RefCounted<FileReader>, public ActiveDOMObject, public EventTargetWithInlineData, public FileReaderLoaderClient {
 public:
-    static PassRefPtr<FileReader> create(ScriptExecutionContext&);
+    static Ref<FileReader> create(ScriptExecutionContext&);
 
     virtual ~FileReader();
 
index cd25360..302821a 100644 (file)
@@ -49,9 +49,9 @@ typedef int ExceptionCode;
 
 class FileReaderSync : public RefCounted<FileReaderSync> {
 public:
-    static PassRefPtr<FileReaderSync> create()
+    static Ref<FileReaderSync> create()
     {
-        return adoptRef(new FileReaderSync());
+        return adoptRef(*new FileReaderSync);
     }
 
     virtual ~FileReaderSync() { }
index ae3c97d..a33c8a6 100644 (file)
@@ -41,7 +41,7 @@ typedef HashSet<RefPtr<HistoryItem>> HistoryItemHashSet;
 
 class BackForwardList : public BackForwardClient {
 public: 
-    static PassRefPtr<BackForwardList> create(Page* page) { return adoptRef(new BackForwardList(page)); }
+    static Ref<BackForwardList> create(Page* page) { return adoptRef(*new BackForwardList(page)); }
     virtual ~BackForwardList();
 
     Page* page() { return m_page; }
index ddb98c7..3800191 100644 (file)
@@ -63,18 +63,18 @@ class HistoryItem : public RefCounted<HistoryItem> {
     friend class PageCache;
 
 public: 
-    static PassRefPtr<HistoryItem> create() { return adoptRef(new HistoryItem); }
-    static PassRefPtr<HistoryItem> create(const String& urlString, const String& title)
+    static Ref<HistoryItem> create() { return adoptRef(*new HistoryItem); }
+    static Ref<HistoryItem> create(const String& urlString, const String& title)
     {
-        return adoptRef(new HistoryItem(urlString, title));
+        return adoptRef(*new HistoryItem(urlString, title));
     }
-    static PassRefPtr<HistoryItem> create(const String& urlString, const String& title, const String& alternateTitle)
+    static Ref<HistoryItem> create(const String& urlString, const String& title, const String& alternateTitle)
     {
-        return adoptRef(new HistoryItem(urlString, title, alternateTitle));
+        return adoptRef(*new HistoryItem(urlString, title, alternateTitle));
     }
-    static PassRefPtr<HistoryItem> create(const URL& url, const String& target, const String& parent, const String& title)
+    static Ref<HistoryItem> create(const URL& url, const String& target, const String& parent, const String& title)
     {
-        return adoptRef(new HistoryItem(url, target, parent, title));
+        return adoptRef(*new HistoryItem(url, target, parent, title));
     }
     
     WEBCORE_EXPORT ~HistoryItem();
index 36fc835..d459f57 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<DOMURL> DOMURL::create(const String& url, const String& base, ExceptionCode& ec) 
+Ref<DOMURL> DOMURL::create(const String& url, const String& base, ExceptionCode& ec)
 {
-    return adoptRef(new DOMURL(url, base, ec)); 
+    return adoptRef(*new DOMURL(url, base, ec));
 }
 
-PassRefPtr<DOMURL> DOMURL::create(const String& url, const DOMURL* base, ExceptionCode& ec) 
+Ref<DOMURL> DOMURL::create(const String& url, const DOMURL* base, ExceptionCode& ec)
 {
     ASSERT(base);
-    return adoptRef(new DOMURL(url, *base, ec)); 
+    return adoptRef(*new DOMURL(url, *base, ec));
 }
 
-PassRefPtr<DOMURL> DOMURL::create(const String& url, ExceptionCode& ec) 
+Ref<DOMURL> DOMURL::create(const String& url, ExceptionCode& ec)
 {
-    return adoptRef(new DOMURL(url, ec)); 
+    return adoptRef(*new DOMURL(url, ec));
 }
 
 inline DOMURL::DOMURL(const String& url, const String& base, ExceptionCode& ec)
index 4ff6172..bc30849 100644 (file)
@@ -31,7 +31,6 @@
 #include "URL.h"
 #include "URLUtils.h"
 #include <wtf/HashSet.h>
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
 
@@ -44,9 +43,9 @@ class URLRegistrable;
 class DOMURL : public RefCounted<DOMURL>, public URLUtils<DOMURL> {
 
 public:
-    static PassRefPtr<DOMURL> create(const String& url, const String& base, ExceptionCode&);
-    static PassRefPtr<DOMURL> create(const String& url, const DOMURL* base, ExceptionCode&);
-    static PassRefPtr<DOMURL> create(const String& url, ExceptionCode&);
+    static Ref<DOMURL> create(const String& url, const String& base, ExceptionCode&);
+    static Ref<DOMURL> create(const String& url, const DOMURL* base, ExceptionCode&);
+    static Ref<DOMURL> create(const String& url, ExceptionCode&);
 
     URL href() const { return m_url; }
     void setHref(const String& url);
index 3e539af..7c15855 100644 (file)
@@ -347,7 +347,7 @@ void HTMLPlugInImageElement::updateSnapshot(PassRefPtr<Image> image)
 
 static DOMWrapperWorld& plugInImageElementIsolatedWorld()
 {
-    static DOMWrapperWorld& isolatedWorld = *DOMWrapperWorld::create(JSDOMWindow::commonVM()).leakRef();
+    static DOMWrapperWorld& isolatedWorld = DOMWrapperWorld::create(JSDOMWindow::commonVM()).leakRef();
     return isolatedWorld;
 }
 
index 6bfb16e..ac05aef 100644 (file)
@@ -38,13 +38,13 @@ namespace WebCore {
 
     class CanvasGradient : public RefCounted<CanvasGradient> {
     public:
-        static PassRefPtr<CanvasGradient> create(const FloatPoint& p0, const FloatPoint& p1)
+        static Ref<CanvasGradient> create(const FloatPoint& p0, const FloatPoint& p1)
         {
-            return adoptRef(new CanvasGradient(p0, p1));
+            return adoptRef(*new CanvasGradient(p0, p1));
         }
-        static PassRefPtr<CanvasGradient> create(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1)
+        static Ref<CanvasGradient> create(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1)
         {
-            return adoptRef(new CanvasGradient(p0, r0, p1, r1));
+            return adoptRef(*new CanvasGradient(p0, r0, p1, r1));
         }
         
         Gradient& gradient() { return m_gradient; }
index 6cbcc81..77cdeb2 100644 (file)
@@ -33,9 +33,9 @@
 
 namespace WebCore {
 
-PassRefPtr<CanvasPattern> CanvasPattern::create(PassRefPtr<Image> image, bool repeatX, bool repeatY, bool originClean)
+Ref<CanvasPattern> CanvasPattern::create(PassRefPtr<Image> image, bool repeatX, bool repeatY, bool originClean)
 {
-    return adoptRef(new CanvasPattern(image, repeatX, repeatY, originClean));
+    return adoptRef(*new CanvasPattern(image, repeatX, repeatY, originClean));
 }
 
 CanvasPattern::CanvasPattern(PassRefPtr<Image> image, bool repeatX, bool repeatY, bool originClean)
index 853ce26..c2a4c28 100644 (file)
@@ -40,7 +40,7 @@ typedef int ExceptionCode;
 
 class CanvasPattern : public RefCounted<CanvasPattern> {
 public:
-    static PassRefPtr<CanvasPattern> create(PassRefPtr<Image>, bool repeatX, bool repeatY, bool originClean);
+    static Ref<CanvasPattern> create(PassRefPtr<Image>, bool repeatX, bool repeatY, bool originClean);
     ~CanvasPattern();
 
     static void parseRepetitionType(const String&, bool& repeatX, bool& repeatY, ExceptionCode&);
index 6af8e36..eb4bd10 100644 (file)
@@ -31,7 +31,6 @@
 #include "CanvasPathMethods.h"
 #include "SVGMatrix.h"
 #include "SVGPathUtilities.h"
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
@@ -39,11 +38,11 @@ namespace WebCore {
 class DOMPath final : public RefCounted<DOMPath>, public CanvasPathMethods {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    static PassRefPtr<DOMPath> create() { return adoptRef(new DOMPath); }
-    static PassRefPtr<DOMPath> create(const Path& path) { return adoptRef(new DOMPath(path)); }
-    static PassRefPtr<DOMPath> create(const DOMPath* path) { return create(path->path()); }
+    static Ref<DOMPath> create() { return adoptRef(*new DOMPath); }
+    static Ref<DOMPath> create(const Path& path) { return adoptRef(*new DOMPath(path)); }
+    static Ref<DOMPath> create(const DOMPath* path) { return create(path->path()); }
 
-    static PassRefPtr<DOMPath> create(const String& pathData)
+    static Ref<DOMPath> create(const String& pathData)
     {
         Path path;
         buildPathFromString(pathData, path);
index 37fa43c..b496a90 100644 (file)
@@ -39,9 +39,9 @@
 
 namespace WebCore {
 
-PassRefPtr<DetailsMarkerControl> DetailsMarkerControl::create(Document& document)
+Ref<DetailsMarkerControl> DetailsMarkerControl::create(Document& document)
 {
-    return adoptRef(new DetailsMarkerControl(document));
+    return adoptRef(*new DetailsMarkerControl(document));
 }
 
 DetailsMarkerControl::DetailsMarkerControl(Document& document)
index 81cf1cd..47ab0d3 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 
 class DetailsMarkerControl final : public HTMLDivElement {
 public:
-    static PassRefPtr<DetailsMarkerControl> create(Document&);
+    static Ref<DetailsMarkerControl> create(Document&);
 
 private:
     DetailsMarkerControl(Document&);
index 95ce0f0..0ebdc3e 100644 (file)
@@ -47,9 +47,9 @@ public:
 
 class AudioTrack final : public TrackBase, public AudioTrackPrivateClient {
 public:
-    static PassRefPtr<AudioTrack> create(AudioTrackClient* client, PassRefPtr<AudioTrackPrivate> trackPrivate)
+    static Ref<AudioTrack> create(AudioTrackClient* client, PassRefPtr<AudioTrackPrivate> trackPrivate)
     {
-        return adoptRef(new AudioTrack(client, trackPrivate));
+        return adoptRef(*new AudioTrack(client, trackPrivate));
     }
     virtual ~AudioTrack();
 
index 956b04a..73fc04a 100644 (file)
@@ -36,9 +36,9 @@ class AudioTrack;
 
 class AudioTrackList final : public TrackListBase {
 public:
-    static PassRefPtr<AudioTrackList> create(HTMLMediaElement* owner, ScriptExecutionContext* context)
+    static Ref<AudioTrackList> create(HTMLMediaElement* owner, ScriptExecutionContext* context)
     {
-        return adoptRef(new AudioTrackList(owner, context));
+        return adoptRef(*new AudioTrackList(owner, context));
     }
     virtual ~AudioTrackList();
 
index b490f63..ef52e73 100644 (file)
@@ -45,30 +45,30 @@ class ScriptExecutionContext;
 
 class DataCue final : public TextTrackCue {
 public:
-    static PassRefPtr<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, ArrayBuffer* data, ExceptionCode& ec)
+    static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, ArrayBuffer* data, ExceptionCode& ec)
     {
-        return adoptRef(new DataCue(context, start, end, data, emptyString(), ec));
+        return adoptRef(*new DataCue(context, start, end, data, emptyString(), ec));
     }
 
-    static PassRefPtr<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, const void* data, unsigned length)
+    static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, const void* data, unsigned length)
     {
-        return adoptRef(new DataCue(context, start, end, data, length));
+        return adoptRef(*new DataCue(context, start, end, data, length));
     }
 
-    static PassRefPtr<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, ArrayBuffer* data, const String& type, ExceptionCode& ec)
+    static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, ArrayBuffer* data, const String& type, ExceptionCode& ec)
     {
-        return adoptRef(new DataCue(context, start, end, data, type, ec));
+        return adoptRef(*new DataCue(context, start, end, data, type, ec));
     }
 
 #if ENABLE(DATACUE_VALUE)
-    static PassRefPtr<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, PassRefPtr<SerializedPlatformRepresentation> platformValue, const String& type)
+    static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, PassRefPtr<SerializedPlatformRepresentation> platformValue, const String& type)
     {
-        return adoptRef(new DataCue(context, start, end, platformValue, type));
+        return adoptRef(*new DataCue(context, start, end, platformValue, type));
     }
 
-    static PassRefPtr<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, JSC::JSValue value, const String& type)
+    static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, JSC::JSValue value, const String& type)
     {
-        return adoptRef(new DataCue(context, start, end, value, type));
+        return adoptRef(*new DataCue(context, start, end, value, type));
     }
 #endif
 
index 254790c..b13d9c1 100644 (file)
@@ -60,9 +60,9 @@ using namespace Inspector;
 
 namespace WebCore {
 
-PassRefPtr<CommandLineAPIHost> CommandLineAPIHost::create()
+Ref<CommandLineAPIHost> CommandLineAPIHost::create()
 {
-    return adoptRef(new CommandLineAPIHost);
+    return adoptRef(*new CommandLineAPIHost);
 }
 
 CommandLineAPIHost::CommandLineAPIHost()
index c494e36..b03f196 100644 (file)
@@ -60,7 +60,7 @@ struct EventListenerInfo;
 
 class CommandLineAPIHost : public RefCounted<CommandLineAPIHost> {
 public:
-    static PassRefPtr<CommandLineAPIHost> create();
+    static Ref<CommandLineAPIHost> create();
     ~CommandLineAPIHost();
 
     void init(Inspector::InspectorAgent* inspectorAgent
index 376005d..188e9ba 100644 (file)
@@ -78,9 +78,9 @@ namespace WebCore {
     class DocumentLoader : public RefCounted<DocumentLoader>, private CachedRawResourceClient {
         WTF_MAKE_FAST_ALLOCATED;
     public:
-        static PassRefPtr<DocumentLoader> create(const ResourceRequest& request, const SubstituteData& data)
+        static Ref<DocumentLoader> create(const ResourceRequest& request, const SubstituteData& data)
         {
-            return adoptRef(new DocumentLoader(request, data));
+            return adoptRef(*new DocumentLoader(request, data));
         }
         WEBCORE_EXPORT virtual ~DocumentLoader();
 
index 699484e..3510b80 100644 (file)
@@ -42,9 +42,9 @@ inline FormState::FormState(PassRefPtr<HTMLFormElement> form, StringPairVector&
     m_textFieldValues.swap(textFieldValuesToAdopt);
 }
 
-PassRefPtr<FormState> FormState::create(PassRefPtr<HTMLFormElement> form, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Document> sourceDocument, FormSubmissionTrigger formSubmissionTrigger)
+Ref<FormState> FormState::create(PassRefPtr<HTMLFormElement> form, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Document> sourceDocument, FormSubmissionTrigger formSubmissionTrigger)
 {
-    return adoptRef(new FormState(form, textFieldValuesToAdopt, sourceDocument, formSubmissionTrigger));
+    return adoptRef(*new FormState(form, textFieldValuesToAdopt, sourceDocument, formSubmissionTrigger));
 }
 
 }
index 3d18a26..d179314 100644 (file)
@@ -46,7 +46,7 @@ namespace WebCore {
 
     class FormState : public RefCounted<FormState> {
     public:
-        static PassRefPtr<FormState> create(PassRefPtr<HTMLFormElement>, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Document>, FormSubmissionTrigger);
+        static Ref<FormState> create(PassRefPtr<HTMLFormElement>, StringPairVector& textFieldValuesToAdopt, PassRefPtr<Document>, FormSubmissionTrigger);
 
         HTMLFormElement* form() const { return m_form.get(); }
         const StringPairVector& textFieldValues() const { return m_textFieldValues; }
index 9b87386..f38b1d8 100644 (file)
@@ -154,7 +154,7 @@ static TextEncoding encodingFromAcceptCharset(const String& acceptCharset, Docum
     return document.inputEncoding();
 }
 
-PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const Attributes& attributes, PassRefPtr<Event> event, LockHistory lockHistory, FormSubmissionTrigger trigger)
+Ref<FormSubmission> FormSubmission::create(HTMLFormElement* form, const Attributes& attributes, PassRefPtr<Event> event, LockHistory lockHistory, FormSubmissionTrigger trigger)
 {
     ASSERT(form);
 
@@ -236,7 +236,7 @@ PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A
     formData->setContainsPasswordData(containsPasswordData);
     String targetOrBaseTarget = copiedAttributes.target().isEmpty() ? document.baseTarget() : copiedAttributes.target();
     RefPtr<FormState> formState = FormState::create(form, formValues, &document, trigger);
-    return adoptRef(new FormSubmission(copiedAttributes.method(), actionURL, targetOrBaseTarget, encodingType, formState.release(), formData.release(), boundary, lockHistory, event));
+    return adoptRef(*new FormSubmission(copiedAttributes.method(), actionURL, targetOrBaseTarget, encodingType, formState.release(), formData.release(), boundary, lockHistory, event));
 }
 
 URL FormSubmission::requestURL() const
index 8315f02..18210c6 100644 (file)
@@ -89,7 +89,7 @@ public:
         String m_acceptCharset;
     };
 
-    static PassRefPtr<FormSubmission> create(HTMLFormElement*, const Attributes&, PassRefPtr<Event> event, LockHistory, FormSubmissionTrigger);
+    static Ref<FormSubmission> create(HTMLFormElement*, const Attributes&, PassRefPtr<Event> event, LockHistory, FormSubmissionTrigger);
 
     void populateFrameLoadRequest(FrameLoadRequest&);
     
index 2a92548..171113c 100644 (file)
@@ -43,9 +43,9 @@ public:
         EncodingFromParentFrame
     };
 
-    static PassRefPtr<TextResourceDecoder> create(const String& mimeType, const TextEncoding& defaultEncoding = TextEncoding(), bool usesEncodingDetector = false)
+    static Ref<TextResourceDecoder> create(const String& mimeType, const TextEncoding& defaultEncoding = TextEncoding(), bool usesEncodingDetector = false)
     {
-        return adoptRef(new TextResourceDecoder(mimeType, defaultEncoding, usesEncodingDetector));
+        return adoptRef(*new TextResourceDecoder(mimeType, defaultEncoding, usesEncodingDetector));
     }
     WEBCORE_EXPORT ~TextResourceDecoder();
 
index 715c5aa..0e9636a 100644 (file)
 
 #include "ThreadableLoaderClient.h"
 #include <wtf/Noncopyable.h>
-#include <wtf/PassRefPtr.h>
+#include <wtf/Ref.h>
 #include <wtf/Threading.h>
 
 namespace WebCore {
 
 class ThreadableLoaderClientWrapper : public ThreadSafeRefCounted<ThreadableLoaderClientWrapper> {
 public:
-    static PassRefPtr<ThreadableLoaderClientWrapper> create(ThreadableLoaderClient* client)
+    static Ref<ThreadableLoaderClientWrapper> create(ThreadableLoaderClient* client)
     {
-        return adoptRef(new ThreadableLoaderClientWrapper(client));
+        return adoptRef(*new ThreadableLoaderClientWrapper(client));
     }
 
     void clearClient()
index a25d978..2a95e74 100644 (file)
@@ -54,9 +54,9 @@ namespace WebCore {
         WTF_MAKE_FAST_ALLOCATED;
     public:
         static void loadResourceSynchronously(WorkerGlobalScope*, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&);
-        static PassRefPtr<WorkerThreadableLoader> create(WorkerGlobalScope* workerGlobalScope, ThreadableLoaderClient* client, const String& taskMode, const ResourceRequest& request, const ThreadableLoaderOptions& options)
+        static Ref<WorkerThreadableLoader> create(WorkerGlobalScope* workerGlobalScope, ThreadableLoaderClient* client, const String& taskMode, const ResourceRequest& request, const ThreadableLoaderOptions& options)
         {
-            return adoptRef(new WorkerThreadableLoader(workerGlobalScope, client, taskMode, request, options));
+            return adoptRef(*new WorkerThreadableLoader(workerGlobalScope, client, taskMode, request, options));
         }
 
         ~WorkerThreadableLoader();
index fdc9aca..9197d9e 100644 (file)
@@ -46,7 +46,7 @@ typedef Vector<std::pair<URL, URL>> FallbackURLVector;
 
 class ApplicationCache : public RefCounted<ApplicationCache> {
 public:
-    static PassRefPtr<ApplicationCache> create() { return adoptRef(new ApplicationCache); }
+    static Ref<ApplicationCache> create() { return adoptRef(*new ApplicationCache); }
     
     WEBCORE_EXPORT static void deleteCacheForOrigin(SecurityOrigin*);
     WEBCORE_EXPORT static void deleteAllCaches();
index d8d3f1a..c063a0a 100644 (file)
@@ -40,10 +40,10 @@ public:
         Fallback = 1 << 4
     };
         
-    static PassRefPtr<ApplicationCacheResource> create(const URL& url, const ResourceResponse& response, unsigned type, PassRefPtr<SharedBuffer> buffer = SharedBuffer::create(), const String& path = String())
+    static Ref<ApplicationCacheResource> create(const URL& url, const ResourceResponse& response, unsigned type, PassRefPtr<SharedBuffer> buffer = SharedBuffer::create(), const String& path = String())
     {
         ASSERT(!url.hasFragmentIdentifier());
-        return adoptRef(new ApplicationCacheResource(url, response, type, buffer, path));
+        return adoptRef(*new ApplicationCacheResource(url, response, type, buffer, path));
     }
 
     unsigned type() const { return m_type; }
index cb27545..cddf74d 100644 (file)
@@ -32,7 +32,6 @@
 #include "ScriptWrappable.h"
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
 #include <wtf/text/AtomicStringHash.h>
@@ -44,7 +43,7 @@ class URL;
 
 class DOMApplicationCache final : public ScriptWrappable, public RefCounted<DOMApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty {
 public:
-    static PassRefPtr<DOMApplicationCache> create(Frame* frame) { return adoptRef(new DOMApplicationCache(frame)); }
+    static Ref<DOMApplicationCache> create(Frame* frame) { return adoptRef(*new DOMApplicationCache(frame)); }
     virtual ~DOMApplicationCache() { ASSERT(!m_frame); }
 
     virtual void disconnectFrameForPageCache() override;
index 4b05fdc..e0205a3 100644 (file)
@@ -42,19 +42,19 @@ inline ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const URL
 {
 }
 
-PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const URL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
+RefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const URL& url, const String& mimeType, const String& textEncoding, const String& frameName, const ResourceResponse& response)
 {
     if (!data)
-        return 0;
+        return nullptr;
     if (response.isNull()) {
         unsigned dataSize = data->size();
-        return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName,
+        return adoptRef(*new ArchiveResource(data, url, mimeType, textEncoding, frameName,
             ResourceResponse(url, mimeType, dataSize, textEncoding)));
     }
-    return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frameName, response));
+    return adoptRef(*new ArchiveResource(data, url, mimeType, textEncoding, frameName, response));
 }
 
-PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const URL& url, const ResourceResponse& response)
+RefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> data, const URL& url, const ResourceResponse& response)
 {
     return create(data, url, response.mimeType(), response.textEncodingName(), String(), response);
 }
index 7f1c32e..25bd5c1 100644 (file)
@@ -35,8 +35,8 @@ namespace WebCore {
 
 class ArchiveResource : public SubstituteResource {
 public:
-    static PassRefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const URL&, const ResourceResponse&);
-    WEBCORE_EXPORT static PassRefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const URL&,
+    static RefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const URL&, const ResourceResponse&);
+    WEBCORE_EXPORT static RefPtr<ArchiveResource> create(PassRefPtr<SharedBuffer>, const URL&,
         const String& mimeType, const String& textEncoding, const String& frameName,
         const ResourceResponse& = ResourceResponse());
 
index 4c9ea1b..df87704 100644 (file)
@@ -79,9 +79,9 @@ class EnumCallback : public CallbackBase {
 public:
     typedef void (*CallbackFunction)(EnumType, void*);
 
-    static PassRefPtr<EnumCallback> create(void* context, CallbackFunction callback)
+    static Ref<EnumCallback> create(void* context, CallbackFunction callback)
     {
-        return adoptRef(new EnumCallback(context, callback));
+        return adoptRef(*new EnumCallback(context, callback));
     }
 
     virtual ~EnumCallback()
@@ -118,9 +118,9 @@ class ObjectCallback : public CallbackBase {
 public:
     typedef void (*CallbackFunction)(ObjectType, void*);
 
-    static PassRefPtr<ObjectCallback> create(void* context, CallbackFunction callback)
+    static Ref<ObjectCallback> create(void* context, CallbackFunction callback)
     {
-        return adoptRef(new ObjectCallback(context, callback));
+        return adoptRef(*new ObjectCallback(context, callback));
     }
 
     virtual ~ObjectCallback()
index d408593..e5eb12e 100644 (file)
@@ -74,9 +74,9 @@ private:
 class IconRecord : public RefCounted<IconRecord> {
     friend class PageURLRecord;
 public:
-    static PassRefPtr<IconRecord> create(const String& url)
+    static Ref<IconRecord> create(const String& url)
     {
-        return adoptRef(new IconRecord(url));
+        return adoptRef(*new IconRecord(url));
     }
     ~IconRecord();
     
index d8df4a8..59d5356 100644 (file)
@@ -50,9 +50,9 @@ MathMLInlineContainerElement::MathMLInlineContainerElement(const QualifiedName&
 {
 }
 
-PassRefPtr<MathMLInlineContainerElement> MathMLInlineContainerElement::create(const QualifiedName& tagName, Document& document)
+Ref<MathMLInlineContainerElement> MathMLInlineContainerElement::create(const QualifiedName& tagName, Document& document)
 {
-    return adoptRef(new MathMLInlineContainerElement(tagName, document));
+    return adoptRef(*new MathMLInlineContainerElement(tagName, document));
 }
 
 void MathMLInlineContainerElement::childrenChanged(const ChildChange& change)
index 709fe48..2936936 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
     
 class MathMLInlineContainerElement : public MathMLElement {
 public:
-    static PassRefPtr<MathMLInlineContainerElement> create(const QualifiedName& tagName, Document&);
+    static Ref<MathMLInlineContainerElement> create(const QualifiedName& tagName, Document&);
 
     virtual bool isPresentationMathML() const override { return true; }
 
index 35042fd..bda10c2 100644 (file)
@@ -38,9 +38,9 @@ inline MathMLMathElement::MathMLMathElement(const QualifiedName& tagName, Docume
 {
 }
 
-PassRefPtr<MathMLMathElement> MathMLMathElement::create(const QualifiedName& tagName, Document& document)
+Ref<MathMLMathElement> MathMLMathElement::create(const QualifiedName& tagName, Document& document)
 {
-    return adoptRef(new MathMLMathElement(tagName, document));
+    return adoptRef(*new MathMLMathElement(tagName, document));
 }
 
 RenderPtr<RenderElement> MathMLMathElement::createElementRenderer(Ref<RenderStyle>&& style)
index 9af2555..4a41031 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
 
 class MathMLMathElement : public MathMLInlineContainerElement {
 public:
-    static PassRefPtr<MathMLMathElement> create(const QualifiedName& tagName, Document&);
+    static Ref<MathMLMathElement> create(const QualifiedName& tagName, Document&);
 
 private:
     MathMLMathElement(const QualifiedName& tagName, Document&);
index c755d71..06dafb6 100755 (executable)
@@ -45,9 +45,9 @@ MathMLMencloseElement::MathMLMencloseElement(const QualifiedName& tagName, Docum
 {
 }
 
-PassRefPtr<MathMLMencloseElement> MathMLMencloseElement::create(const QualifiedName& tagName, Document& document)
+Ref<MathMLMencloseElement> MathMLMencloseElement::create(const QualifiedName& tagName, Document& document)
 {
-    return adoptRef(new MathMLMencloseElement(tagName, document));
+    return adoptRef(*new MathMLMencloseElement(tagName, document));
 }
 
 RenderPtr<RenderElement> MathMLMencloseElement::createElementRenderer(Ref<RenderStyle>&& style)
index 22a33cd..c27a439 100755 (executable)
@@ -33,7 +33,7 @@ namespace WebCore {
 
 class MathMLMencloseElement final: public MathMLInlineContainerElement {
 public:
-    static PassRefPtr<MathMLMencloseElement> create(const QualifiedName& tagName, Document&);
+    static Ref<MathMLMencloseElement> create(const QualifiedName& tagName, Document&);
     const Vector<String>& notationValues() const { return m_notationValues; }
     bool isRadical() const { return m_isRadicalValue; }
     String longDivLeftPadding() const;
index 6d52961..087dfe6 100644 (file)
@@ -46,9 +46,9 @@ MathMLSelectElement::MathMLSelectElement(const QualifiedName& tagName, Document&
 {
 }
 
-PassRefPtr<MathMLSelectElement> MathMLSelectElement::create(const QualifiedName& tagName, Document& document)
+Ref<MathMLSelectElement> MathMLSelectElement::create(const QualifiedName& tagName, Document& document)
 {
-    return adoptRef(new MathMLSelectElement(tagName, document));
+    return adoptRef(*new MathMLSelectElement(tagName, document));
 }
 
 RenderPtr<RenderElement> MathMLSelectElement::createElementRenderer(Ref<RenderStyle>&& style)
index 35400fe..22a6ccb 100644 (file)
@@ -33,7 +33,7 @@ namespace WebCore {
 
 class MathMLSelectElement final : public MathMLInlineContainerElement {
 public:
-    static PassRefPtr<MathMLSelectElement> create(const QualifiedName& tagName, Document&);
+    static Ref<MathMLSelectElement> create(const QualifiedName& tagName, Document&);
     static bool isMathMLEncoding(const AtomicString& value);
     static bool isSVGEncoding(const AtomicString& value);
     static bool isHTMLEncoding(const AtomicString& value);
index 456c814..9606dd8 100644 (file)
@@ -45,9 +45,9 @@ inline MathMLTextElement::MathMLTextElement(const QualifiedName& tagName, Docume
     setHasCustomStyleResolveCallbacks();
 }
 
-PassRefPtr<MathMLTextElement> MathMLTextElement::create(const QualifiedName& tagName, Document& document)
+Ref<MathMLTextElement> MathMLTextElement::create(const QualifiedName& tagName, Document& document)
 {
-    return adoptRef(new MathMLTextElement(tagName, document));
+    return adoptRef(*new MathMLTextElement(tagName, document));
 }
 
 void MathMLTextElement::didAttachRenderers()
index c6842e9..69b0574 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
     
 class MathMLTextElement final : public MathMLElement {
 public:
-    static PassRefPtr<MathMLTextElement> create(const QualifiedName& tagName, Document&);
+    static Ref<MathMLTextElement> create(const QualifiedName& tagName, Document&);
     virtual void didAttachRenderers() override;
 
     virtual bool isPresentationMathML() const override { return true; }
index edfa56f..03d71bf 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "DOMWindowProperty.h"
 #include "ScriptWrappable.h"
-#include <wtf/PassRefPtr.h>
+#include <wtf/Ref.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
@@ -42,7 +42,7 @@ class BarProp : public ScriptWrappable, public RefCounted<BarProp>, public DOMWi
 public:
     enum Type { Locationbar, Menubar, Personalbar, Scrollbars, Statusbar, Toolbar };
 
-    static PassRefPtr<BarProp> create(Frame* frame, Type type) { return adoptRef(new BarProp(frame, type)); }
+    static Ref<BarProp> create(Frame* frame, Type type) { return adoptRef(*new BarProp(frame, type)); }
 
     Type type() const;
     bool visible() const;
index 94eab56..af0fc04 100644 (file)
@@ -49,7 +49,7 @@ class SubtleCrypto;
 
 class Crypto : public ContextDestructionObserver, public RefCounted<Crypto> {
 public:
-    static PassRefPtr<Crypto> create(Document& document) { return adoptRef(new Crypto(document)); }
+    static Ref<Crypto> create(Document& document) { return adoptRef(*new Crypto(document)); }
     virtual ~Crypto();
 
     Document* document() const;
index 42ae518..df6917d 100644 (file)
@@ -39,9 +39,9 @@ class Frame;
 
 class DOMSecurityPolicy : public RefCounted<DOMSecurityPolicy>, public ContextDestructionObserver {
 public:
-    static PassRefPtr<DOMSecurityPolicy> create(ScriptExecutionContext* context)
+    static Ref<DOMSecurityPolicy> create(ScriptExecutionContext* context)
     {
-        return adoptRef(new DOMSecurityPolicy(context));
+        return adoptRef(*new DOMSecurityPolicy(context));
     }
     ~DOMSecurityPolicy();
 
index de48569..2fa1e87 100644 (file)
@@ -49,7 +49,7 @@ namespace WebCore {
 
     class DOMSelection : public RefCounted<DOMSelection>, public DOMWindowProperty {
     public:
-        static PassRefPtr<DOMSelection> create(const TreeScope* treeScope) { return adoptRef(new DOMSelection(treeScope)); }
+        static Ref<DOMSelection> create(const TreeScope* treeScope) { return adoptRef(*new DOMSelection(treeScope)); }
 
         void clearTreeScope();
 
index 48291cc..ead4573 100644 (file)
@@ -99,7 +99,7 @@ namespace WebCore {
         , public FrameDestructionObserver
         , public Supplementable<DOMWindow> {
     public:
-        static PassRefPtr<DOMWindow> create(Document* document) { return adoptRef(new DOMWindow(document)); }
+        static Ref<DOMWindow> create(Document* document) { return adoptRef(*new DOMWindow(document)); }
         virtual ~DOMWindow();
 
         // In some rare cases, we'll re-used a DOMWindow for a new Document. For example,
index 49290bc..a978ffc 100644 (file)
@@ -27,7 +27,6 @@
 #define DOMWindowExtension_h
 
 #include "DOMWindowProperty.h"
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
@@ -39,9 +38,9 @@ class Frame;
 
 class DOMWindowExtension : public RefCounted<DOMWindowExtension>, public DOMWindowProperty {
 public:
-    static PassRefPtr<DOMWindowExtension> create(Frame* frame, DOMWrapperWorld& world)
+    static Ref<DOMWindowExtension> create(Frame* frame, DOMWrapperWorld& world)
     {
-        return adoptRef(new DOMWindowExtension(frame, world));
+        return adoptRef(*new DOMWindowExtension(frame, world));
     }
 
     virtual void disconnectFrameForPageCache() override;
index 09cab8d..d96657e 100644 (file)
@@ -222,19 +222,19 @@ FrameView::FrameView(Frame& frame)
 #endif
 }
 
-PassRefPtr<FrameView> FrameView::create(Frame& frame)
+Ref<FrameView> FrameView::create(Frame& frame)
 {
-    RefPtr<FrameView> view = adoptRef(new FrameView(frame));
+    Ref<FrameView> view = adoptRef(*new FrameView(frame));
     view->show();
-    return view.release();
+    return view;
 }
 
-PassRefPtr<FrameView> FrameView::create(Frame& frame, const IntSize& initialSize)
+Ref<FrameView> FrameView::create(Frame& frame, const IntSize& initialSize)
 {
-    RefPtr<FrameView> view = adoptRef(new FrameView(frame));
+    Ref<FrameView> view = adoptRef(*new FrameView(frame));
     view->Widget::setFrameRect(IntRect(view->location(), initialSize));
     view->show();
-    return view.release();
+    return view;
 }
 
 FrameView::~FrameView()
index 3661e70..5fa9256 100644 (file)
@@ -70,8 +70,8 @@ public:
     friend class RenderView;
     friend class Internals;
 
-    WEBCORE_EXPORT static PassRefPtr<FrameView> create(Frame&);
-    static PassRefPtr<FrameView> create(Frame&, const IntSize& initialSize);
+    WEBCORE_EXPORT static Ref<FrameView> create(Frame&);
+    static Ref<FrameView> create(Frame&, const IntSize& initialSize);
 
     virtual ~FrameView();
 
index 1c143aa..bed3793 100644 (file)
@@ -46,9 +46,9 @@ class RenderStyle;
 // on a single RenderElement, such as a number of properties transitioning at once.
 class CompositeAnimation : public RefCounted<CompositeAnimation> {
 public:
-    static PassRefPtr<CompositeAnimation> create(AnimationControllerPrivate* animationController)
+    static Ref<CompositeAnimation> create(AnimationControllerPrivate* animationController)
     {
-        return adoptRef(new CompositeAnimation(animationController));
+        return adoptRef(*new CompositeAnimation(animationController));
     };
 
     ~CompositeAnimation();
index c80c324..7125a45 100644 (file)
@@ -48,7 +48,7 @@ class ScrollingStateTree;
 // allowing asynchronous scrolling (in another thread or process).
 class AsyncScrollingCoordinator : public ScrollingCoordinator {
 public:
-    static PassRefPtr<AsyncScrollingCoordinator> create(Page*);
+    static Ref<AsyncScrollingCoordinator> create(Page*);
     WEBCORE_EXPORT virtual ~AsyncScrollingCoordinator();
 
     ScrollingTree* scrollingTree() const { return m_scrollingTree.get(); }
index 43de224..5c1bd21 100644 (file)
@@ -58,7 +58,7 @@ namespace WebCore {
 #if PLATFORM(WIN)
     class SharedCursor : public RefCounted<SharedCursor> {
     public:
-        static PassRefPtr<SharedCursor> create(HCURSOR nativeCursor) { return adoptRef(new SharedCursor(nativeCursor)); }
+        static Ref<SharedCursor> create(HCURSOR nativeCursor) { return adoptRef(*new SharedCursor(nativeCursor)); }
         ~SharedCursor();
         HCURSOR nativeCursor() const { return m_nativeCursor; }
     private:
index f6cea53..eada49b 100644 (file)
@@ -37,9 +37,9 @@ FileChooser::FileChooser(FileChooserClient* client, const FileChooserSettings& s
 {
 }
 
-PassRefPtr<FileChooser> FileChooser::create(FileChooserClient* client, const FileChooserSettings& settings)
+Ref<FileChooser> FileChooser::create(FileChooserClient* client, const FileChooserSettings& settings)
 {
-    return adoptRef(new FileChooser(client, settings));
+    return adoptRef(*new FileChooser(client, settings));
 }
 
 FileChooser::~FileChooser()
index cd68d62..b051352 100644 (file)
@@ -77,7 +77,7 @@ public:
 
 class FileChooser : public RefCounted<FileChooser> {
 public:
-    static PassRefPtr<FileChooser> create(FileChooserClient*, const FileChooserSettings&);
+    static Ref<FileChooser> create(FileChooserClient*, const FileChooserSettings&);
     WEBCORE_EXPORT ~FileChooser();
 
     void invalidate();
index bc23996..b2dc133 100644 (file)
@@ -38,8 +38,8 @@ class Animation : public RefCounted<Animation> {
 public:
     ~Animation();
 
-    static PassRefPtr<Animation> create() { return adoptRef(new Animation); }
-    static PassRefPtr<Animation> create(const Animation& other) { return adoptRef(new Animation(other)); }
+    static Ref<Animation> create() { return adoptRef(*new Animation); }
+    static Ref<Animation> create(const Animation& other) { return adoptRef(*new Animation(other)); }
 
     bool isDelaySet() const { return m_delaySet; }
     bool isDirectionSet() const { return m_directionSet; }
index 9dac09e..cff7cd5 100644 (file)
@@ -46,13 +46,13 @@ using namespace VectorMath;
 
 const unsigned MaxBusChannels = 32;
 
-PassRefPtr<AudioBus> AudioBus::create(unsigned numberOfChannels, size_t length, bool allocate)
+RefPtr<AudioBus> AudioBus::create(unsigned numberOfChannels, size_t length, bool allocate)
 {
     ASSERT(numberOfChannels <= MaxBusChannels);
     if (numberOfChannels > MaxBusChannels)
-        return 0;
+        return nullptr;
 
-    return adoptRef(new AudioBus(numberOfChannels, length, allocate));
+    return adoptRef(*new AudioBus(numberOfChannels, length, allocate));
 }
 
 AudioBus::AudioBus(unsigned numberOfChannels, size_t length, bool allocate)
@@ -167,7