<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[282784] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/282784">282784</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2021-09-20 14:45:40 -0700 (Mon, 20 Sep 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Reduce use of makeRefPtr() and use RefPtr { } directly
https://bugs.webkit.org/show_bug.cgi?id=230503

Reviewed by Geoffrey Garen.

Source/WebCore:

* Modules/async-clipboard/Clipboard.cpp:
(WebCore::Clipboard::readText):
(WebCore::Clipboard::writeText):
(WebCore::Clipboard::read):
(WebCore::Clipboard::getType):
(WebCore::Clipboard::write):
* Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
(WebCore::ClipboardItemBindingsDataSource::getType):
(WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):
(WebCore::ClipboardItemBindingsDataSource::invokeCompletionHandler):
* Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp:
(WebCore::ClipboardItemPasteboardDataSource::getType):
* Modules/highlight/AppHighlightStorage.cpp:
(WebCore::findNodeStartingAtPathComponentIndex):
(WebCore::findNode):
(WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::deleteFunction):
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::showMediaControlsContextMenu):
* Modules/mediasession/MediaSession.cpp:
(WebCore::MediaSession::MediaSession):
* Modules/mediasession/MediaSessionCoordinator.cpp:
(WebCore::MediaSessionCoordinator::join):
(WebCore::MediaSessionCoordinator::seekTo):
(WebCore::MediaSessionCoordinator::play):
(WebCore::MediaSessionCoordinator::pause):
(WebCore::MediaSessionCoordinator::setTrack):
* Modules/mediasession/MediaSessionCoordinatorPrivate.cpp:
(WebCore::MediaSessionCoordinatorPrivate::setLogger):
* Modules/mediastream/MediaStream.cpp:
(WebCore::createTrackPrivateVector):
* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::shippingAddressChanged):
* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::SpeechRecognition):
* Modules/webdatabase/Database.cpp:
(WebCore::Database::scheduleTransactionCallback):
* Modules/webxr/WebXRInputSource.cpp:
(WebCore::WebXRInputSource::update):
(WebCore::WebXRInputSource::pollEvents):
* Modules/webxr/WebXRInputSourceArray.cpp:
(WebCore::WebXRInputSourceArray::update):
* Modules/webxr/WebXRSession.cpp:
(WebCore::WebXRSession::didCompleteShutdown):
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAriaExpandedChange):
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::treeForPageID):
* animation/DocumentTimelinesController.cpp:
(WebCore::DocumentTimelinesController::cacheCurrentTime):
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setTarget):
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::finishNotificationSteps):
* bridge/runtime_object.cpp:
(JSC::Bindings::JSC_DEFINE_HOST_FUNCTION):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeSelfOrChildNodesForInsertion):
* dom/Document.cpp:
(WebCore::Document::updateTitle):
(WebCore::Document::implicitClose):
(WebCore::Document::didRemoveAllPendingStylesheet):
(WebCore::Document::prepareMouseEvent):
(WebCore::command):
* dom/Element.cpp:
(WebCore::Element::scrollTo):
(WebCore::Element::offsetLeftForBindings):
(WebCore::Element::offsetTopForBindings):
(WebCore::Element::focus):
* dom/EventContext.h:
(WebCore::EventContext::EventContext):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
* dom/FullscreenManager.cpp:
(WebCore::FullscreenManager::requestFullscreenForElement):
(WebCore::FullscreenManager::exitFullscreen):
* dom/IdleDeadline.cpp:
(WebCore::IdleDeadline::timeRemaining const):
(WebCore::IdleDeadline::didTimeout const):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::disconnect):
* dom/Position.cpp:
(WebCore::Position::firstNode const):
(WebCore::makeBoundaryPoint):
* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::removeSlotElementByName):
(WebCore::SlotAssignment::didChangeSlot):
* dom/messageports/WorkerMessagePortChannelProvider.cpp:
(WebCore::WorkerMessagePortChannelProvider::takeAllMessagesForPort):
(WebCore::WorkerMessagePortChannelProvider::checkRemotePortForActivity):
* editing/ApplyBlockElementCommand.cpp:
(WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle):
(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::highestEmbeddingAncestor):
(WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
(WebCore::containsNonEditableRegion):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
(WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun):
(WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
(WebCore::ApplyStyleCommand::removeInlineStyle):
(WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
(WebCore::ApplyStyleCommand::joinChildTextNodes):
* editing/ChangeListTypeCommand.cpp:
(WebCore::ChangeListTypeCommand::listConversionType):
* editing/CompositeEditCommand.cpp:
(WebCore::postTextStateChangeNotification):
(WebCore::CompositeEditCommand::insertNodeBefore):
(WebCore::CompositeEditCommand::insertNodeAfter):
(WebCore::CompositeEditCommand::insertNodeAt):
(WebCore::CompositeEditCommand::removeChildrenInRange):
(WebCore::CompositeEditCommand::removeNodeAndPruneAncestors):
(WebCore::CompositeEditCommand::prune):
(WebCore::CompositeEditCommand::positionOutsideTabSpan):
(WebCore::CompositeEditCommand::textNodeForRebalance const):
(WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
(WebCore::CompositeEditCommand::cleanupAfterDeletion):
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/DeleteSelectionCommand.cpp:
(WebCore::isTableRowEmpty):
(WebCore::firstInSpecialElement):
(WebCore::lastInSpecialElement):
(WebCore::DeleteSelectionCommand::initializePositionData):
(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
(WebCore::firstEditablePositionInNode):
(WebCore::DeleteSelectionCommand::removeNode):
(WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::mergeParagraphs):
(WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
(WebCore::DeleteSelectionCommand::removeRedundantBlocks):
(WebCore::DeleteSelectionCommand::doApply):
* editing/EditCommand.cpp:
(WebCore::EditCommand::postTextStateChangeNotification):
* editing/Editing.cpp:
(WebCore::highestNodeToRemoveInPruning):
* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand):
(WebCore::Editor::shouldInsertFragment):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::respondToChangedContents):
(WebCore::Editor::hasBidiSelection const):
(WebCore::Editor::selectionUnorderedListState const):
(WebCore::Editor::selectionOrderedListState const):
(WebCore::Editor::findEventTargetFrom const):
(WebCore::Editor::applyStyle):
(WebCore::Editor::applyParagraphStyle):
(WebCore::notifyTextFromControls):
(WebCore::Editor::willApplyEditing):
(WebCore::Editor::insertTextWithoutSendingTextEvent):
(WebCore::Editor::copyImage):
(WebCore::Editor::renderLayerDidScroll):
(WebCore::Editor::setBaseWritingDirection):
(WebCore::Editor::baseWritingDirectionForSelectionStart const):
(WebCore::Editor::confirmOrCancelCompositionAndNotifyClient):
(WebCore::Editor::setComposition):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::isSpellCheckingEnabledFor const):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::removeTextPlaceholder):
(WebCore::Editor::applyEditingStyleToBodyElement const):
(WebCore::findFirstMarkable):
(WebCore::Editor::resolveTextCheckingTypeMask):
(WebCore::editableTextListsAtPositionInDescendingOrder):
(WebCore::Editor::fontAttributesAtSelectionStart):
(WebCore::Editor::styleForSelectionStart):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::fixOrphanedListChild):
(WebCore::InsertListCommand::unlistifyParagraph):
* editing/InsertNestedListCommand.cpp:
(WebCore::InsertNestedListCommand::doApply):
* editing/RemoveNodePreservingChildrenCommand.cpp:
(WebCore::RemoveNodePreservingChildrenCommand::doApply):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::positionAvoidingPrecedingNodes):
(WebCore::ReplacementFragment::ReplacementFragment):
(WebCore::ReplacementFragment::removeUnrenderedNodes):
(WebCore::ReplacementFragment::removeInterchangeNodes):
(WebCore::ReplaceSelectionCommand::shouldMerge):
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
(WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
(WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent const):
(WebCore::handleStyleSpansBeforeInsertion):
(WebCore::ReplaceSelectionCommand::handleStyleSpans):
(WebCore::enclosingInline):
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace const):
(WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
(WebCore::singleChildList):
(WebCore::deepestSingleChildList):
(WebCore::ReplaceSelectionCommand::insertAsListItems):
* editing/TextIterator.cpp:
(WebCore::TextIterator::handleReplacedElement):
* editing/TextManipulationController.cpp:
(WebCore::TextManipulationController::startObservingParagraphs):
(WebCore::tokenInfo):
(WebCore::isEnclosingItemBoundaryElement):
(WebCore::TextManipulationController::observeParagraphs):
(WebCore::TextManipulationController::scheduleObservationUpdate):
(WebCore::TextManipulationController::replace):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::document const):
* editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::createElementForImageOverlay):
* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::replaceRichContentWithAttachments):
(WebCore::WebContentReader::readDataBuffer):
* editing/markup.cpp:
(WebCore::serializePreservingVisualAppearanceInternal):
(WebCore::sanitizedMarkupForFragmentInDocument):
* page/VisualViewport.cpp:
(WebCore::VisualViewport::update):
* platform/audio/cocoa/AudioSampleDataSource.mm:
(WebCore::AudioSampleDataSource::setupConverter):
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::enqueueSample):

Source/WTF:

* wtf/CrossThreadTask.h:
(WTF::createCrossThreadTask):

Tools:

* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::singleTapAtPointWithModifiers):
(WTR::UIScriptControllerIOS::sendEventStream):
(WTR::UIScriptControllerIOS::dragFromPointToPoint):
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptControllerMac::activateDataListSuggestion):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfCrossThreadTaskh">trunk/Source/WTF/wtf/CrossThreadTask.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesasyncclipboardClipboardcpp">trunk/Source/WebCore/Modules/async-clipboard/Clipboard.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesasyncclipboardClipboardItemBindingsDataSourcecpp">trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesasyncclipboardClipboardItemPasteboardDataSourcecpp">trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleshighlightAppHighlightStoragecpp">trunk/Source/WebCore/Modules/highlight/AppHighlightStorage.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsMediaControlsHostcpp">trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasessionMediaSessioncpp">trunk/Source/WebCore/Modules/mediasession/MediaSession.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasessionMediaSessionCoordinatorcpp">trunk/Source/WebCore/Modules/mediasession/MediaSessionCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasessionMediaSessionCoordinatorPrivatecpp">trunk/Source/WebCore/Modules/mediasession/MediaSessionCoordinatorPrivate.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamcpp">trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulespaymentrequestPaymentRequestcpp">trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesspeechSpeechRecognitioncpp">trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabasecpp">trunk/Source/WebCore/Modules/webdatabase/Database.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebxrWebXRInputSourcecpp">trunk/Source/WebCore/Modules/webxr/WebXRInputSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebxrWebXRInputSourceArraycpp">trunk/Source/WebCore/Modules/webxr/WebXRInputSourceArray.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebxrWebXRSessioncpp">trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAXObjectCachecpp">trunk/Source/WebCore/accessibility/AXObjectCache.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityisolatedtreeAXIsolatedTreecpp">trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp</a></li>
<li><a href="#trunkSourceWebCoreanimationDocumentTimelinesControllercpp">trunk/Source/WebCore/animation/DocumentTimelinesController.cpp</a></li>
<li><a href="#trunkSourceWebCoreanimationKeyframeEffectcpp">trunk/Source/WebCore/animation/KeyframeEffect.cpp</a></li>
<li><a href="#trunkSourceWebCoreanimationWebAnimationcpp">trunk/Source/WebCore/animation/WebAnimation.cpp</a></li>
<li><a href="#trunkSourceWebCorebridgeruntime_objectcpp">trunk/Source/WebCore/bridge/runtime_object.cpp</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodecpp">trunk/Source/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomEventContexth">trunk/Source/WebCore/dom/EventContext.h</a></li>
<li><a href="#trunkSourceWebCoredomEventDispatchercpp">trunk/Source/WebCore/dom/EventDispatcher.cpp</a></li>
<li><a href="#trunkSourceWebCoredomFullscreenManagercpp">trunk/Source/WebCore/dom/FullscreenManager.cpp</a></li>
<li><a href="#trunkSourceWebCoredomIdleDeadlinecpp">trunk/Source/WebCore/dom/IdleDeadline.cpp</a></li>
<li><a href="#trunkSourceWebCoredomMutationObservercpp">trunk/Source/WebCore/dom/MutationObserver.cpp</a></li>
<li><a href="#trunkSourceWebCoredomPositioncpp">trunk/Source/WebCore/dom/Position.cpp</a></li>
<li><a href="#trunkSourceWebCoredomSlotAssignmentcpp">trunk/Source/WebCore/dom/SlotAssignment.cpp</a></li>
<li><a href="#trunkSourceWebCoredommessageportsWorkerMessagePortChannelProvidercpp">trunk/Source/WebCore/dom/messageports/WorkerMessagePortChannelProvider.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingApplyBlockElementCommandcpp">trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingApplyStyleCommandcpp">trunk/Source/WebCore/editing/ApplyStyleCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingChangeListTypeCommandcpp">trunk/Source/WebCore/editing/ChangeListTypeCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingCompositeEditCommandcpp">trunk/Source/WebCore/editing/CompositeEditCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingDeleteSelectionCommandcpp">trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditCommandcpp">trunk/Source/WebCore/editing/EditCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditingcpp">trunk/Source/WebCore/editing/Editing.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingFrameSelectioncpp">trunk/Source/WebCore/editing/FrameSelection.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingInsertListCommandcpp">trunk/Source/WebCore/editing/InsertListCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingInsertNestedListCommandcpp">trunk/Source/WebCore/editing/InsertNestedListCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingRemoveNodePreservingChildrenCommandcpp">trunk/Source/WebCore/editing/RemoveNodePreservingChildrenCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingReplaceSelectionCommandcpp">trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingTextIteratorcpp">trunk/Source/WebCore/editing/TextIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingTextManipulationControllercpp">trunk/Source/WebCore/editing/TextManipulationController.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingVisibleSelectioncpp">trunk/Source/WebCore/editing/VisibleSelection.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaDataDetectionmm">trunk/Source/WebCore/editing/cocoa/DataDetection.mm</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaWebContentReaderCocoamm">trunk/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreeditingmarkupcpp">trunk/Source/WebCore/editing/markup.cpp</a></li>
<li><a href="#trunkSourceWebCorepageVisualViewportcpp">trunk/Source/WebCore/page/VisualViewport.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformaudiococoaAudioSampleDataSourcemm">trunk/Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaWebCoreDecompressionSessionmm">trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsWebKitTestRunneriosUIScriptControllerIOSmm">trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnermacUIScriptControllerMacmm">trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WTF/ChangeLog  2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2021-09-20  Chris Dumez  <cdumez@apple.com>
+
+        Reduce use of makeRefPtr() and use RefPtr { } directly
+        https://bugs.webkit.org/show_bug.cgi?id=230503
+
+        Reviewed by Geoffrey Garen.
+
+        * wtf/CrossThreadTask.h:
+        (WTF::createCrossThreadTask):
+
</ins><span class="cx"> 2021-09-20  Wenson Hsieh  <wenson_hsieh@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Refactor some code that controls Live Text selection behavior
</span></span></pre></div>
<a id="trunkSourceWTFwtfCrossThreadTaskh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/CrossThreadTask.h (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/CrossThreadTask.h   2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WTF/wtf/CrossThreadTask.h      2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> template<typename T, typename std::enable_if<std::is_base_of<ThreadSafeRefCountedBase, T>::value, int>::type = 0, typename... Parameters, typename... Arguments>
</span><span class="cx"> CrossThreadTask createCrossThreadTask(T& callee, void (T::*method)(Parameters...), const Arguments&... arguments)
</span><span class="cx"> {
</span><del>-    return CrossThreadTask([callee = makeRefPtr(&callee), method, arguments = std::make_tuple(crossThreadCopy(arguments)...)]() mutable {
</del><ins>+    return CrossThreadTask([callee = RefPtr { &callee }, method, arguments = std::make_tuple(crossThreadCopy(arguments)...)]() mutable {
</ins><span class="cx">         callMemberFunctionForCrossThreadTask(callee.get(), method, WTFMove(arguments));
</span><span class="cx">     });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/ChangeLog      2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -1,3 +1,241 @@
</span><ins>+2021-09-20  Chris Dumez  <cdumez@apple.com>
+
+        Reduce use of makeRefPtr() and use RefPtr { } directly
+        https://bugs.webkit.org/show_bug.cgi?id=230503
+
+        Reviewed by Geoffrey Garen.
+
+        * Modules/async-clipboard/Clipboard.cpp:
+        (WebCore::Clipboard::readText):
+        (WebCore::Clipboard::writeText):
+        (WebCore::Clipboard::read):
+        (WebCore::Clipboard::getType):
+        (WebCore::Clipboard::write):
+        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
+        (WebCore::ClipboardItemBindingsDataSource::getType):
+        (WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):
+        (WebCore::ClipboardItemBindingsDataSource::invokeCompletionHandler):
+        * Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp:
+        (WebCore::ClipboardItemPasteboardDataSource::getType):
+        * Modules/highlight/AppHighlightStorage.cpp:
+        (WebCore::findNodeStartingAtPathComponentIndex):
+        (WebCore::findNode):
+        (WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::deleteFunction):
+        * Modules/mediacontrols/MediaControlsHost.cpp:
+        (WebCore::MediaControlsHost::showMediaControlsContextMenu):
+        * Modules/mediasession/MediaSession.cpp:
+        (WebCore::MediaSession::MediaSession):
+        * Modules/mediasession/MediaSessionCoordinator.cpp:
+        (WebCore::MediaSessionCoordinator::join):
+        (WebCore::MediaSessionCoordinator::seekTo):
+        (WebCore::MediaSessionCoordinator::play):
+        (WebCore::MediaSessionCoordinator::pause):
+        (WebCore::MediaSessionCoordinator::setTrack):
+        * Modules/mediasession/MediaSessionCoordinatorPrivate.cpp:
+        (WebCore::MediaSessionCoordinatorPrivate::setLogger):
+        * Modules/mediastream/MediaStream.cpp:
+        (WebCore::createTrackPrivateVector):
+        * Modules/paymentrequest/PaymentRequest.cpp:
+        (WebCore::PaymentRequest::shippingAddressChanged):
+        * Modules/speech/SpeechRecognition.cpp:
+        (WebCore::SpeechRecognition::SpeechRecognition):
+        * Modules/webdatabase/Database.cpp:
+        (WebCore::Database::scheduleTransactionCallback):
+        * Modules/webxr/WebXRInputSource.cpp:
+        (WebCore::WebXRInputSource::update):
+        (WebCore::WebXRInputSource::pollEvents):
+        * Modules/webxr/WebXRInputSourceArray.cpp:
+        (WebCore::WebXRInputSourceArray::update):
+        * Modules/webxr/WebXRSession.cpp:
+        (WebCore::WebXRSession::didCompleteShutdown):
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::handleAriaExpandedChange):
+        * accessibility/isolatedtree/AXIsolatedTree.cpp:
+        (WebCore::AXIsolatedTree::treeForPageID):
+        * animation/DocumentTimelinesController.cpp:
+        (WebCore::DocumentTimelinesController::cacheCurrentTime):
+        * animation/KeyframeEffect.cpp:
+        (WebCore::KeyframeEffect::setTarget):
+        * animation/WebAnimation.cpp:
+        (WebCore::WebAnimation::finishNotificationSteps):
+        * bridge/runtime_object.cpp:
+        (JSC::Bindings::JSC_DEFINE_HOST_FUNCTION):
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::removeSelfOrChildNodesForInsertion):
+        * dom/Document.cpp:
+        (WebCore::Document::updateTitle):
+        (WebCore::Document::implicitClose):
+        (WebCore::Document::didRemoveAllPendingStylesheet):
+        (WebCore::Document::prepareMouseEvent):
+        (WebCore::command):
+        * dom/Element.cpp:
+        (WebCore::Element::scrollTo):
+        (WebCore::Element::offsetLeftForBindings):
+        (WebCore::Element::offsetTopForBindings):
+        (WebCore::Element::focus):
+        * dom/EventContext.h:
+        (WebCore::EventContext::EventContext):
+        * dom/EventDispatcher.cpp:
+        (WebCore::EventDispatcher::dispatchEvent):
+        * dom/FullscreenManager.cpp:
+        (WebCore::FullscreenManager::requestFullscreenForElement):
+        (WebCore::FullscreenManager::exitFullscreen):
+        * dom/IdleDeadline.cpp:
+        (WebCore::IdleDeadline::timeRemaining const):
+        (WebCore::IdleDeadline::didTimeout const):
+        * dom/MutationObserver.cpp:
+        (WebCore::MutationObserver::disconnect):
+        * dom/Position.cpp:
+        (WebCore::Position::firstNode const):
+        (WebCore::makeBoundaryPoint):
+        * dom/SlotAssignment.cpp:
+        (WebCore::SlotAssignment::removeSlotElementByName):
+        (WebCore::SlotAssignment::didChangeSlot):
+        * dom/messageports/WorkerMessagePortChannelProvider.cpp:
+        (WebCore::WorkerMessagePortChannelProvider::takeAllMessagesForPort):
+        (WebCore::WorkerMessagePortChannelProvider::checkRemotePortForActivity):
+        * editing/ApplyBlockElementCommand.cpp:
+        (WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded):
+        * editing/ApplyStyleCommand.cpp:
+        (WebCore::ApplyStyleCommand::applyBlockStyle):
+        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
+        (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
+        (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
+        (WebCore::highestEmbeddingAncestor):
+        (WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
+        (WebCore::containsNonEditableRegion):
+        (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
+        (WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun):
+        (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
+        (WebCore::ApplyStyleCommand::removeInlineStyle):
+        (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
+        (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
+        (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
+        (WebCore::ApplyStyleCommand::joinChildTextNodes):
+        * editing/ChangeListTypeCommand.cpp:
+        (WebCore::ChangeListTypeCommand::listConversionType):
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::postTextStateChangeNotification):
+        (WebCore::CompositeEditCommand::insertNodeBefore):
+        (WebCore::CompositeEditCommand::insertNodeAfter):
+        (WebCore::CompositeEditCommand::insertNodeAt):
+        (WebCore::CompositeEditCommand::removeChildrenInRange):
+        (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors):
+        (WebCore::CompositeEditCommand::prune):
+        (WebCore::CompositeEditCommand::positionOutsideTabSpan):
+        (WebCore::CompositeEditCommand::textNodeForRebalance const):
+        (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
+        (WebCore::CompositeEditCommand::cleanupAfterDeletion):
+        (WebCore::CompositeEditCommand::moveParagraphs):
+        * editing/DeleteSelectionCommand.cpp:
+        (WebCore::isTableRowEmpty):
+        (WebCore::firstInSpecialElement):
+        (WebCore::lastInSpecialElement):
+        (WebCore::DeleteSelectionCommand::initializePositionData):
+        (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
+        (WebCore::firstEditablePositionInNode):
+        (WebCore::DeleteSelectionCommand::removeNode):
+        (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
+        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
+        (WebCore::DeleteSelectionCommand::mergeParagraphs):
+        (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
+        (WebCore::DeleteSelectionCommand::removeRedundantBlocks):
+        (WebCore::DeleteSelectionCommand::doApply):
+        * editing/EditCommand.cpp:
+        (WebCore::EditCommand::postTextStateChangeNotification):
+        * editing/Editing.cpp:
+        (WebCore::highestNodeToRemoveInPruning):
+        * editing/Editor.cpp:
+        (WebCore::Editor::selectionForCommand):
+        (WebCore::Editor::shouldInsertFragment):
+        (WebCore::Editor::replaceSelectionWithFragment):
+        (WebCore::Editor::respondToChangedContents):
+        (WebCore::Editor::hasBidiSelection const):
+        (WebCore::Editor::selectionUnorderedListState const):
+        (WebCore::Editor::selectionOrderedListState const):
+        (WebCore::Editor::findEventTargetFrom const):
+        (WebCore::Editor::applyStyle):
+        (WebCore::Editor::applyParagraphStyle):
+        (WebCore::notifyTextFromControls):
+        (WebCore::Editor::willApplyEditing):
+        (WebCore::Editor::insertTextWithoutSendingTextEvent):
+        (WebCore::Editor::copyImage):
+        (WebCore::Editor::renderLayerDidScroll):
+        (WebCore::Editor::setBaseWritingDirection):
+        (WebCore::Editor::baseWritingDirectionForSelectionStart const):
+        (WebCore::Editor::confirmOrCancelCompositionAndNotifyClient):
+        (WebCore::Editor::setComposition):
+        (WebCore::Editor::advanceToNextMisspelling):
+        (WebCore::Editor::markMisspellingsAfterTypingToWord):
+        (WebCore::Editor::isSpellCheckingEnabledFor const):
+        (WebCore::Editor::markAndReplaceFor):
+        (WebCore::Editor::removeTextPlaceholder):
+        (WebCore::Editor::applyEditingStyleToBodyElement const):
+        (WebCore::findFirstMarkable):
+        (WebCore::Editor::resolveTextCheckingTypeMask):
+        (WebCore::editableTextListsAtPositionInDescendingOrder):
+        (WebCore::Editor::fontAttributesAtSelectionStart):
+        (WebCore::Editor::styleForSelectionStart):
+        * editing/FrameSelection.cpp:
+        (WebCore::FrameSelection::setSelection):
+        (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
+        * editing/InsertListCommand.cpp:
+        (WebCore::InsertListCommand::fixOrphanedListChild):
+        (WebCore::InsertListCommand::unlistifyParagraph):
+        * editing/InsertNestedListCommand.cpp:
+        (WebCore::InsertNestedListCommand::doApply):
+        * editing/RemoveNodePreservingChildrenCommand.cpp:
+        (WebCore::RemoveNodePreservingChildrenCommand::doApply):
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::positionAvoidingPrecedingNodes):
+        (WebCore::ReplacementFragment::ReplacementFragment):
+        (WebCore::ReplacementFragment::removeUnrenderedNodes):
+        (WebCore::ReplacementFragment::removeInterchangeNodes):
+        (WebCore::ReplaceSelectionCommand::shouldMerge):
+        (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
+        (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
+        (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
+        (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
+        (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent const):
+        (WebCore::handleStyleSpansBeforeInsertion):
+        (WebCore::ReplaceSelectionCommand::handleStyleSpans):
+        (WebCore::enclosingInline):
+        (WebCore::ReplaceSelectionCommand::doApply):
+        (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace const):
+        (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
+        (WebCore::singleChildList):
+        (WebCore::deepestSingleChildList):
+        (WebCore::ReplaceSelectionCommand::insertAsListItems):
+        * editing/TextIterator.cpp:
+        (WebCore::TextIterator::handleReplacedElement):
+        * editing/TextManipulationController.cpp:
+        (WebCore::TextManipulationController::startObservingParagraphs):
+        (WebCore::tokenInfo):
+        (WebCore::isEnclosingItemBoundaryElement):
+        (WebCore::TextManipulationController::observeParagraphs):
+        (WebCore::TextManipulationController::scheduleObservationUpdate):
+        (WebCore::TextManipulationController::replace):
+        * editing/VisibleSelection.cpp:
+        (WebCore::VisibleSelection::document const):
+        * editing/cocoa/DataDetection.mm:
+        (WebCore::DataDetection::createElementForImageOverlay):
+        * editing/cocoa/WebContentReaderCocoa.mm:
+        (WebCore::replaceRichContentWithAttachments):
+        (WebCore::WebContentReader::readDataBuffer):
+        * editing/markup.cpp:
+        (WebCore::serializePreservingVisualAppearanceInternal):
+        (WebCore::sanitizedMarkupForFragmentInDocument):
+        * page/VisualViewport.cpp:
+        (WebCore::VisualViewport::update):
+        * platform/audio/cocoa/AudioSampleDataSource.mm:
+        (WebCore::AudioSampleDataSource::setupConverter):
+        (WebCore::AudioSampleDataSource::pushSamplesInternal):
+        (WebCore::AudioSampleDataSource::pullSamplesInternal):
+        * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
+        (WebCore::WebCoreDecompressionSession::enqueueSample):
+
</ins><span class="cx"> 2021-09-20  Alan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [IFC][Integration] canUseForText should take surrogate pairs into account when checking for directional characters
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesasyncclipboardClipboardcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/async-clipboard/Clipboard.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/async-clipboard/Clipboard.cpp       2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/async-clipboard/Clipboard.cpp  2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Clipboard::readText(Ref<DeferredPromise>&& promise)
</span><span class="cx"> {
</span><del>-    auto frame = makeRefPtr(this->frame());
</del><ins>+    RefPtr frame = this->frame();
</ins><span class="cx">     if (!frame) {
</span><span class="cx">         promise->reject(NotAllowedError);
</span><span class="cx">         return;
</span><span class="lines">@@ -137,8 +137,8 @@
</span><span class="cx"> 
</span><span class="cx"> void Clipboard::writeText(const String& data, Ref<DeferredPromise>&& promise)
</span><span class="cx"> {
</span><del>-    auto frame = makeRefPtr(this->frame());
-    auto document = makeRefPtr(frame ? frame->document() : nullptr);
</del><ins>+    RefPtr frame = this->frame();
+    RefPtr document = frame ? frame->document() : nullptr;
</ins><span class="cx">     if (!document || !shouldProceedWithClipboardWrite(*frame)) {
</span><span class="cx">         promise->reject(NotAllowedError);
</span><span class="cx">         return;
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">         promise->reject(NotAllowedError);
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    auto frame = makeRefPtr(this->frame());
</del><ins>+    RefPtr frame = this->frame();
</ins><span class="cx">     if (!frame) {
</span><span class="cx">         rejectPromiseAndClearActiveSession();
</span><span class="cx">         return;
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto frame = makeRefPtr(this->frame());
</del><ins>+    RefPtr frame = this->frame();
</ins><span class="cx">     if (!frame) {
</span><span class="cx">         m_activeSession = std::nullopt;
</span><span class="cx">         promise->reject(NotAllowedError);
</span><span class="lines">@@ -271,7 +271,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Clipboard::write(const Vector<RefPtr<ClipboardItem>>& items, Ref<DeferredPromise>&& promise)
</span><span class="cx"> {
</span><del>-    auto frame = makeRefPtr(this->frame());
</del><ins>+    RefPtr frame = this->frame();
</ins><span class="cx">     if (!frame || !shouldProceedWithClipboardWrite(*frame)) {
</span><span class="cx">         promise->reject(NotAllowedError);
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesasyncclipboardClipboardItemBindingsDataSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp 2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp    2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto itemPromise = m_itemPromises[matchIndex].value;
</span><del>-    itemPromise->whenSettled([itemPromise, promise = makeRefPtr(promise.get()), type] () mutable {
</del><ins>+    itemPromise->whenSettled([itemPromise, promise = WTFMove(promise), type] () mutable {
</ins><span class="cx">         if (itemPromise->status() != DOMPromise::Status::Fulfilled) {
</span><span class="cx">             promise->reject(AbortError);
</span><span class="cx">             return;
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         auto promise = typeAndItem.value;
</span><del>-        promise->whenSettled([this, protectedItem = makeRefPtr(m_item), destination = m_writingDestination, promise, type, weakItemTypeLoader = makeWeakPtr(itemTypeLoader.ptr())] () mutable {
</del><ins>+        promise->whenSettled([this, protectedItem = Ref { m_item }, destination = m_writingDestination, promise, type, weakItemTypeLoader = makeWeakPtr(itemTypeLoader.ptr())] () mutable {
</ins><span class="cx">             if (!weakItemTypeLoader)
</span><span class="cx">                 return;
</span><span class="cx"> 
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            auto clipboard = makeRefPtr(destination.get());
</del><ins>+            RefPtr clipboard = destination.get();
</ins><span class="cx">             if (!clipboard) {
</span><span class="cx">                 itemTypeLoader->didFailToResolve();
</span><span class="cx">                 return;
</span><span class="lines">@@ -175,7 +175,7 @@
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            if (auto blob = makeRefPtr(JSBlob::toWrapped(result.getObject()->vm(), result.getObject())))
</del><ins>+            if (RefPtr blob = JSBlob::toWrapped(result.getObject()->vm(), result.getObject()))
</ins><span class="cx">                 itemTypeLoader->didResolveToBlob(*clipboard->scriptExecutionContext(), blob.releaseNonNull());
</span><span class="cx">             else
</span><span class="cx">                 itemTypeLoader->didFailToResolve();
</span><span class="lines">@@ -197,7 +197,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto completionHandler = std::exchange(m_completionHandler, { });
</span><span class="cx">     auto itemTypeLoaders = std::exchange(m_itemTypeLoaders, { });
</span><del>-    auto clipboard = makeRefPtr(m_writingDestination.get());
</del><ins>+    RefPtr clipboard = m_writingDestination.get();
</ins><span class="cx">     m_writingDestination = nullptr;
</span><span class="cx"> 
</span><span class="cx">     auto document = documentFromClipboard(clipboard.get());
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesasyncclipboardClipboardItemPasteboardDataSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp       2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp  2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ClipboardItemPasteboardDataSource::getType(const String& type, Ref<DeferredPromise>&& promise)
</span><span class="cx"> {
</span><del>-    if (auto clipboard = makeRefPtr(m_item.clipboard()))
</del><ins>+    if (RefPtr clipboard = m_item.clipboard())
</ins><span class="cx">         clipboard->getType(m_item, type, WTFMove(promise));
</span><span class="cx">     else
</span><span class="cx">         promise->reject(NotAllowedError);
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleshighlightAppHighlightStoragecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/highlight/AppHighlightStorage.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/highlight/AppHighlightStorage.cpp   2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/highlight/AppHighlightStorage.cpp      2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     if (initialIndexToFollow >= path.size())
</span><span class="cx">         return { nullptr, initialIndexToFollow };
</span><span class="cx"> 
</span><del>-    auto currentNode = makeRefPtr(initialNode);
</del><ins>+    RefPtr currentNode = &initialNode;
</ins><span class="cx">     size_t currentPathIndex = initialIndexToFollow;
</span><span class="cx">     for (; currentPathIndex < path.size(); ++currentPathIndex) {
</span><span class="cx">         auto& component = path[currentPathIndex];
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">         if (component.identifier.isEmpty())
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        auto elementWithIdentifier = makeRefPtr(document.getElementById(component.identifier));
</del><ins>+        RefPtr elementWithIdentifier = document.getElementById(component.identifier);
</ins><span class="cx">         if (!elementWithIdentifier || elementWithIdentifier->nodeName() != component.nodeName)
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="lines">@@ -257,7 +257,7 @@
</span><span class="cx">     if (!m_document)
</span><span class="cx">         return false;
</span><span class="cx">     
</span><del>-    auto strongDocument = makeRefPtr(m_document.get());
</del><ins>+    RefPtr strongDocument = m_document.get();
</ins><span class="cx">     
</span><span class="cx">     auto range = findRange(highlight, *strongDocument);
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp   2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -390,7 +390,7 @@
</span><span class="cx"> ExceptionOr<Ref<IDBRequest>> IDBObjectStore::deleteFunction(JSGlobalObject& execState, IDBKeyRange* keyRange)
</span><span class="cx"> {
</span><span class="cx">     return doDelete(execState, [keyRange]() {
</span><del>-        return makeRefPtr(keyRange);
</del><ins>+        return RefPtr { keyRange };
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacontrolsMediaControlsHostcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp 2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp    2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -600,7 +600,7 @@
</span><span class="cx">                             continue;
</span><span class="cx"> 
</span><span class="cx">                         auto& vttCue = downcast<VTTCue>(*cue);
</span><del>-                        chapterMenuItems.append(createMenuItem(makeRefPtr(vttCue), vttCue.text()));
</del><ins>+                        chapterMenuItems.append(createMenuItem(RefPtr { &vttCue }, vttCue.text()));
</ins><span class="cx">                     }
</span><span class="cx">                 }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasessionMediaSessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasession/MediaSession.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasession/MediaSession.cpp       2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/mediasession/MediaSession.cpp  2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">     , m_coordinator(MediaSessionCoordinator::create(navigator.scriptExecutionContext()))
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><del>-    m_logger = makeRefPtr(Document::sharedLogger());
</del><ins>+    m_logger = &Document::sharedLogger();
</ins><span class="cx">     m_logIdentifier = nextLogIdentifier();
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SESSION_COORDINATOR)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasessionMediaSessionCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasession/MediaSessionCoordinator.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasession/MediaSessionCoordinator.cpp    2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/mediasession/MediaSessionCoordinator.cpp       2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">     }
</span><span class="cx">     ASSERT(m_privateCoordinator, "We must be in Waiting state if no private coordinator is set");
</span><span class="cx"> 
</span><del>-    m_privateCoordinator->join([protectedThis = makeRefPtr(*this), identifier, promise = WTFMove(promise)] (std::optional<Exception>&& exception) mutable {
</del><ins>+    m_privateCoordinator->join([protectedThis = Ref { *this }, identifier, promise = WTFMove(promise)] (std::optional<Exception>&& exception) mutable {
</ins><span class="cx">         if (!protectedThis->m_session) {
</span><span class="cx">             promise.reject(Exception { InvalidStateError });
</span><span class="cx">             return;
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_privateCoordinator->seekTo(time, [protectedThis = makeRefPtr(*this), identifier, promise = WTFMove(promise)] (std::optional<Exception>&& exception) mutable {
</del><ins>+    m_privateCoordinator->seekTo(time, [protectedThis = Ref { *this }, identifier, promise = WTFMove(promise)] (std::optional<Exception>&& exception) mutable {
</ins><span class="cx">         if (!protectedThis->m_session) {
</span><span class="cx">             promise.reject(Exception { InvalidStateError });
</span><span class="cx">             return;
</span><span class="lines">@@ -189,7 +189,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_privateCoordinator->play([protectedThis = makeRefPtr(*this), identifier, promise = WTFMove(promise)] (std::optional<Exception>&& exception) mutable {
</del><ins>+    m_privateCoordinator->play([protectedThis = Ref { *this }, identifier, promise = WTFMove(promise)] (std::optional<Exception>&& exception) mutable {
</ins><span class="cx">         if (!protectedThis->m_session) {
</span><span class="cx">             promise.reject(Exception { InvalidStateError });
</span><span class="cx">             return;
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_privateCoordinator->pause([protectedThis = makeRefPtr(*this), identifier, promise = WTFMove(promise)] (std::optional<Exception>&& exception) mutable {
</del><ins>+    m_privateCoordinator->pause([protectedThis = Ref { *this }, identifier, promise = WTFMove(promise)] (std::optional<Exception>&& exception) mutable {
</ins><span class="cx">         if (!protectedThis->m_session) {
</span><span class="cx">             promise.reject(Exception { InvalidStateError });
</span><span class="cx">             return;
</span><span class="lines">@@ -255,7 +255,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_privateCoordinator->setTrack(track, [protectedThis = makeRefPtr(*this), identifier, promise = WTFMove(promise)] (std::optional<Exception>&& exception) mutable {
</del><ins>+    m_privateCoordinator->setTrack(track, [protectedThis = Ref { *this }, identifier, promise = WTFMove(promise)] (std::optional<Exception>&& exception) mutable {
</ins><span class="cx">         if (!protectedThis->m_session) {
</span><span class="cx">             promise.reject(Exception { InvalidStateError });
</span><span class="cx">             return;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasessionMediaSessionCoordinatorPrivatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasession/MediaSessionCoordinatorPrivate.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasession/MediaSessionCoordinatorPrivate.cpp     2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/mediasession/MediaSessionCoordinatorPrivate.cpp        2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> void MediaSessionCoordinatorPrivate::setLogger(const Logger& logger, const void* logIdentifier)
</span><span class="cx"> {
</span><del>-    m_logger = makeRefPtr(logger);
</del><ins>+    m_logger = &logger;
</ins><span class="cx">     m_logIdentifier = logIdentifier;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp 2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp    2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> static inline MediaStreamTrackPrivateVector createTrackPrivateVector(const MediaStreamTrackVector& tracks)
</span><span class="cx"> {
</span><span class="cx">     return map(tracks, [](auto& track) {
</span><del>-        return makeRefPtr(&track->privateTrack());
</del><ins>+        return RefPtr { &track->privateTrack() };
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulespaymentrequestPaymentRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp   2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp      2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -534,7 +534,7 @@
</span><span class="cx"> 
</span><span class="cx"> void PaymentRequest::shippingAddressChanged(Ref<PaymentAddress>&& shippingAddress)
</span><span class="cx"> {
</span><del>-    whenDetailsSettled([this, protectedThis = Ref { *this }, shippingAddress = makeRefPtr(shippingAddress.get())]() mutable {
</del><ins>+    whenDetailsSettled([this, protectedThis = Ref { *this }, shippingAddress = WTFMove(shippingAddress)]() mutable {
</ins><span class="cx">         m_shippingAddress = WTFMove(shippingAddress);
</span><span class="cx">         dispatchAndCheckUpdateEvent(PaymentRequestUpdateEvent::create(eventNames().shippingaddresschangeEvent));
</span><span class="cx">     });
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesspeechSpeechRecognitioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp        2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/speech/SpeechRecognition.cpp   2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     : ActiveDOMObject(document)
</span><span class="cx"> {
</span><span class="cx">     if (auto* page = document.page()) {
</span><del>-        m_connection = makeRefPtr(page->speechRecognitionConnection());
</del><ins>+        m_connection = &page->speechRecognitionConnection();
</ins><span class="cx">         m_connection->registerClient(*this);
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/Database.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/Database.cpp    2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/webdatabase/Database.cpp       2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -698,7 +698,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Database::scheduleTransactionCallback(SQLTransaction* transaction)
</span><span class="cx"> {
</span><del>-    callOnMainThread([this, protectedThis = Ref { *this }, transaction = makeRefPtr(transaction)]() mutable {
</del><ins>+    callOnMainThread([this, protectedThis = Ref { *this }, transaction = RefPtr { transaction }]() mutable {
</ins><span class="cx">         m_document->eventLoop().queueTask(TaskSource::Networking, [transaction = WTFMove(transaction)] {
</span><span class="cx">             transaction->performPendingCallback();
</span><span class="cx">         });
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebxrWebXRInputSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webxr/WebXRInputSource.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webxr/WebXRInputSource.cpp  2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/webxr/WebXRInputSource.cpp     2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebXRInputSource::update(double timestamp, const PlatformXR::Device::FrameData::InputSource& source)
</span><span class="cx"> {
</span><del>-    auto session = makeRefPtr(m_session.get());
</del><ins>+    RefPtr session = m_session.get();
</ins><span class="cx">     if (!session)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebXRInputSource::pollEvents(Vector<Ref<XRInputSourceEvent>>& events)
</span><span class="cx"> {
</span><del>-    auto session = makeRefPtr(m_session.get());
</del><ins>+    RefPtr session = m_session.get();
</ins><span class="cx">     if (!session)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">     auto createEvent = [this, session](const AtomString& name) -> Ref<XRInputSourceEvent> {
</span><span class="cx">         XRInputSourceEvent::Init init;
</span><span class="cx">         init.frame = WebXRFrame::create(*session, WebXRFrame::IsAnimationFrame::No);
</span><del>-        init.inputSource = makeRefPtr(*this);
</del><ins>+        init.inputSource = RefPtr { this };
</ins><span class="cx"> 
</span><span class="cx">         return XRInputSourceEvent::create(name, init);
</span><span class="cx">     };
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebxrWebXRInputSourceArraycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webxr/WebXRInputSourceArray.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webxr/WebXRInputSourceArray.cpp     2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/webxr/WebXRInputSourceArray.cpp        2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx">         // 5. Set frame‚Äôs active boolean to false.
</span><span class="cx"> 
</span><span class="cx">         for (auto& event : inputEvents) {
</span><del>-            ActiveDOMObject::queueTaskKeepingObjectAlive(m_session, TaskSource::WebXR, [session = makeRefPtr(m_session), event = WTFMove(event)]() {
</del><ins>+            ActiveDOMObject::queueTaskKeepingObjectAlive(m_session, TaskSource::WebXR, [session = Ref { m_session }, event = WTFMove(event)]() {
</ins><span class="cx">                 event->setFrameActive(true);
</span><span class="cx">                 session->dispatchEvent(event.copyRef());
</span><span class="cx">                 event->setFrameActive(false);
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebxrWebXRSessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp      2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp 2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -381,7 +381,7 @@
</span><span class="cx"> 
</span><span class="cx">     // From https://immersive-web.github.io/webxr/#shut-down-the-session
</span><span class="cx">     // 7. Queue a task that fires an XRSessionEvent named end on session.
</span><del>-    auto event = XRSessionEvent::create(eventNames().endEvent, { makeRefPtr(*this) });
</del><ins>+    auto event = XRSessionEvent::create(eventNames().endEvent, { RefPtr { this } });
</ins><span class="cx">     queueTaskToDispatchEvent(*this, TaskSource::WebXR, WTFMove(event));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAXObjectCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp     2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -1671,7 +1671,7 @@
</span><span class="cx">     // An aria-expanded change can cause two notifications to be posted:
</span><span class="cx">     // RowCountChanged for the tree or table ancestor of this object, and
</span><span class="cx">     // RowExpanded/Collapsed for this object.
</span><del>-    if (auto object = makeRefPtr(get(node))) {
</del><ins>+    if (RefPtr object = get(node)) {
</ins><span class="cx">         // Find the ancestor that supports RowCountChanged if exists.
</span><span class="cx">         auto* ancestor = Accessibility::findAncestor<AccessibilityObject>(*object, false, [] (auto& candidate) {
</span><span class="cx">             return candidate.supportsRowCountChange();
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityisolatedtreeAXIsolatedTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp       2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp  2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">     Locker locker { s_cacheLock };
</span><span class="cx"> 
</span><span class="cx">     if (auto tree = treePageCache().get(pageID))
</span><del>-        return makeRefPtr(tree);
</del><ins>+        return RefPtr { tree };
</ins><span class="cx"> 
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreanimationDocumentTimelinesControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/animation/DocumentTimelinesController.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/animation/DocumentTimelinesController.cpp   2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/animation/DocumentTimelinesController.cpp      2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -236,7 +236,7 @@
</span><span class="cx">     }
</span><span class="cx">     // We extent the associated Document's lifecycle until the VM became idle since the DocumentTimelinesController
</span><span class="cx">     // is owned by the Document.
</span><del>-    m_document.vm().whenIdle([this, protectedDocument = makeRefPtr(m_document)]() {
</del><ins>+    m_document.vm().whenIdle([this, protectedDocument = Ref { m_document }]() {
</ins><span class="cx">         m_waitingOnVMIdle = false;
</span><span class="cx">         maybeClearCachedCurrentTime();
</span><span class="cx">     });
</span></span></pre></div>
<a id="trunkSourceWebCoreanimationKeyframeEffectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/animation/KeyframeEffect.cpp        2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp   2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -1181,7 +1181,7 @@
</span><span class="cx">     auto& previousTargetStyleable = targetStyleable();
</span><span class="cx">     RefPtr<Element> protector;
</span><span class="cx">     if (previousTargetStyleable)
</span><del>-        protector = makeRefPtr(previousTargetStyleable->element);
</del><ins>+        protector = &previousTargetStyleable->element;
</ins><span class="cx">     m_target = WTFMove(newTarget);
</span><span class="cx">     didChangeTargetStyleable(previousTargetStyleable);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreanimationWebAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/animation/WebAnimation.cpp  2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp     2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -909,7 +909,7 @@
</span><span class="cx">     enqueueAnimationPlaybackEvent(eventNames().finishEvent, currentTime(), m_timeline ? m_timeline->currentTime() : std::nullopt);
</span><span class="cx"> 
</span><span class="cx">     if (is<KeyframeEffect>(m_effect)) {
</span><del>-        if (auto target = makeRefPtr(downcast<KeyframeEffect>(*m_effect).target())) {
</del><ins>+        if (RefPtr target = downcast<KeyframeEffect>(*m_effect).target()) {
</ins><span class="cx">             if (auto* page = target->document().page())
</span><span class="cx">                 page->chrome().client().animationDidFinishForElement(*target);
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCorebridgeruntime_objectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bridge/runtime_object.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bridge/runtime_object.cpp   2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/bridge/runtime_object.cpp      2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx">     auto* thisObject = jsDynamicCast<RuntimeObject*>(vm, callFrame->thisValue());
</span><span class="cx">     if (!thisObject)
</span><span class="cx">         return throwVMTypeError(lexicalGlobalObject, scope, "RuntimeObject[Symbol.toPrimitive] method called on incompatible |this| value."_s);
</span><del>-    auto instance = makeRefPtr(thisObject->getInternalInstance());
</del><ins>+    RefPtr instance = thisObject->getInternalInstance();
</ins><span class="cx">     if (!instance)
</span><span class="cx">         return JSValue::encode(throwRuntimeObjectInvalidAccessError(lexicalGlobalObject, scope));
</span><span class="cx">     auto hint = toPreferredPrimitiveType(lexicalGlobalObject, callFrame->argument(0));
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.cpp       2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp  2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!is<DocumentFragment>(child)) {
</span><span class="cx">         nodesForInsertion.append(child);
</span><del>-        auto oldParent = makeRefPtr(child.parentNode());
</del><ins>+        RefPtr oldParent = child.parentNode();
</ins><span class="cx">         if (!oldParent)
</span><span class="cx">             return { };
</span><span class="cx">         return oldParent->removeChild(child);
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp    2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/Document.cpp       2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -1734,7 +1734,7 @@
</span><span class="cx">     if (!m_updateTitleTaskScheduled) {
</span><span class="cx">         eventLoop().queueTask(TaskSource::DOMManipulation, [protectedThis = Ref { *this }, this]() mutable {
</span><span class="cx">             m_updateTitleTaskScheduled = false;
</span><del>-            if (auto documentLoader = makeRefPtr(loader()))
</del><ins>+            if (RefPtr documentLoader = loader())
</ins><span class="cx">                 documentLoader->setTitle(m_title);
</span><span class="cx">         });
</span><span class="cx">         m_updateTitleTaskScheduled = true;
</span><span class="lines">@@ -3217,7 +3217,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_processingLoadEvent = false;
</span><span class="cx"> 
</span><del>-    if (auto fontFaceSet = makeRefPtr(fontSelector().fontFaceSetIfExists()))
</del><ins>+    if (RefPtr fontFaceSet = fontSelector().fontFaceSetIfExists())
</ins><span class="cx">         fontFaceSet->documentDidFinishLoading();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA) || PLATFORM(WIN) || PLATFORM(GTK)
</span><span class="lines">@@ -3739,7 +3739,7 @@
</span><span class="cx">     if (m_gotoAnchorNeededAfterStylesheetsLoad) {
</span><span class="cx">         // https://html.spec.whatwg.org/multipage/browsing-the-web.html#try-to-scroll-to-the-fragment
</span><span class="cx">         eventLoop().queueTask(TaskSource::Networking, [protectedThis = Ref { *this }, this] {
</span><del>-            auto frameView = makeRefPtr(view());
</del><ins>+            RefPtr frameView = view();
</ins><span class="cx">             if (!frameView)
</span><span class="cx">                 return;
</span><span class="cx">             if (!haveStylesheetsLoaded()) {
</span><span class="lines">@@ -4082,7 +4082,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto captureElementChanged = CaptureChange::No;
</span><span class="cx">     if (!request.readOnly()) {
</span><del>-        auto targetElement = makeRefPtr(result.targetElement());
</del><ins>+        RefPtr targetElement = result.targetElement();
</ins><span class="cx">         if (auto* page = this->page()) {
</span><span class="cx">             // Before we dispatch a new mouse event, we must run the Process Pending Capture Element steps as defined
</span><span class="cx">             // in https://w3c.github.io/pointerevents/#process-pending-pointer-capture.
</span><span class="lines">@@ -5797,7 +5797,7 @@
</span><span class="cx"> 
</span><span class="cx">     document->updateStyleIfNeeded();
</span><span class="cx"> 
</span><del>-    auto frame = makeRefPtr(document->frame());
</del><ins>+    RefPtr frame = document->frame();
</ins><span class="cx"> 
</span><span class="cx">     if (!frame || frame->document() != document)
</span><span class="cx">         return Editor::Command();
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp     2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/Element.cpp        2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -1012,7 +1012,7 @@
</span><span class="cx">         // If the element is the scrolling element and is not potentially scrollable,
</span><span class="cx">         // invoke scroll() on window with options as the only argument, and terminate these steps.
</span><span class="cx">         // FIXME: Scrolling an independently scrollable body is broken: webkit.org/b/161612.
</span><del>-        auto window = makeRefPtr(document().domWindow());
</del><ins>+        RefPtr window = document().domWindow();
</ins><span class="cx">         if (!window)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="lines">@@ -1138,7 +1138,7 @@
</span><span class="cx"> {
</span><span class="cx">     auto offset = offsetLeft();
</span><span class="cx"> 
</span><del>-    auto parent = makeRefPtr(offsetParent());
</del><ins>+    RefPtr parent = offsetParent();
</ins><span class="cx">     if (!parent || !parent->isInShadowTree())
</span><span class="cx">         return offset;
</span><span class="cx"> 
</span><span class="lines">@@ -1167,7 +1167,7 @@
</span><span class="cx"> {
</span><span class="cx">     auto offset = offsetTop();
</span><span class="cx"> 
</span><del>-    auto parent = makeRefPtr(offsetParent());
</del><ins>+    RefPtr parent = offsetParent();
</ins><span class="cx">     if (!parent || !parent->isInShadowTree())
</span><span class="cx">         return offset;
</span><span class="cx"> 
</span><span class="lines">@@ -3081,7 +3081,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (auto root = shadowRootWithDelegatesFocus(*this)) {
</span><del>-        auto currentlyFocusedElement = makeRefPtr(document->focusedElement());
</del><ins>+        RefPtr currentlyFocusedElement = document->focusedElement();
</ins><span class="cx">         if (root->containsIncludingShadowDOM(currentlyFocusedElement.get())) {
</span><span class="cx">             if (document->page())
</span><span class="cx">                 document->page()->chrome().client().elementDidRefocus(*currentlyFocusedElement);
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventContext.h (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventContext.h  2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/EventContext.h     2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline EventContext::EventContext(Type type, Node* node, EventTarget* currentTarget, EventTarget* origin, int closedShadowDepth)
</span><del>-    : EventContext(type, node, makeRefPtr(currentTarget), origin, closedShadowDepth)
</del><ins>+    : EventContext(type, node, RefPtr { currentTarget }, origin, closedShadowDepth)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!is<Node>(currentTarget));
</span><span class="cx"> }
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx"> 
</span><span class="cx"> // This variant avoids calling EventTarget::ref() which is a virtual function call.
</span><span class="cx"> inline EventContext::EventContext(Type type, Node& node, Node* currentTarget, EventTarget* origin, int closedShadowDepth)
</span><del>-    : EventContext(type, &node, makeRefPtr(currentTarget), origin, closedShadowDepth, currentTarget && currentTarget->isInShadowTree())
</del><ins>+    : EventContext(type, &node, RefPtr { currentTarget }, origin, closedShadowDepth, currentTarget && currentTarget->isInShadowTree())
</ins><span class="cx"> {
</span><span class="cx">     m_contextNodeIsFormElement = is<HTMLFormElement>(node);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventDispatcher.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventDispatcher.cpp     2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/EventDispatcher.cpp        2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -147,8 +147,8 @@
</span><span class="cx">     
</span><span class="cx">     LOG_WITH_STREAM(Events, stream << "EventDispatcher::dispatchEvent " << event << " on node " << node);
</span><span class="cx"> 
</span><del>-    auto protectedNode = makeRef(node);
-    auto protectedView = makeRefPtr(node.document().view());
</del><ins>+    Ref protectedNode { node };
+    RefPtr protectedView { node.document().view() };
</ins><span class="cx"> 
</span><span class="cx">     EventPath eventPath { node, event };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomFullscreenManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/FullscreenManager.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/FullscreenManager.cpp   2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/FullscreenManager.cpp      2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_pendingFullscreenElement = element;
</span><span class="cx"> 
</span><del>-    m_document.eventLoop().queueTask(TaskSource::MediaElement, [this, weakThis = makeWeakPtr(*this), element = makeRefPtr(element), checkType, hasKeyboardAccess, failedPreflights, identifier = LOGIDENTIFIER] () mutable {
</del><ins>+    m_document.eventLoop().queueTask(TaskSource::MediaElement, [this, weakThis = makeWeakPtr(*this), element = RefPtr { element }, checkType, hasKeyboardAccess, failedPreflights, identifier = LOGIDENTIFIER] () mutable {
</ins><span class="cx">         if (!weakThis)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="lines">@@ -334,7 +334,7 @@
</span><span class="cx"> 
</span><span class="cx">     // 6. Return, and run the remaining steps asynchronously.
</span><span class="cx">     // 7. Optionally, perform some animation.
</span><del>-    m_document.eventLoop().queueTask(TaskSource::MediaElement, [this, weakThis = makeWeakPtr(*this), newTop = makeRefPtr(newTop), fullscreenElement = m_fullscreenElement, identifier = LOGIDENTIFIER] {
</del><ins>+    m_document.eventLoop().queueTask(TaskSource::MediaElement, [this, weakThis = makeWeakPtr(*this), newTop = RefPtr { newTop }, fullscreenElement = m_fullscreenElement, identifier = LOGIDENTIFIER] {
</ins><span class="cx">         if (!weakThis)
</span><span class="cx">             return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomIdleDeadlinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/IdleDeadline.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/IdleDeadline.cpp        2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/IdleDeadline.cpp   2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> DOMHighResTimeStamp IdleDeadline::timeRemaining(Document& document) const
</span><span class="cx"> {
</span><del>-    auto window = makeRefPtr(document.domWindow());
</del><ins>+    RefPtr window { document.domWindow() };
</ins><span class="cx">     if (!window)
</span><span class="cx">         return 0;
</span><span class="cx">     return window->performance().relativeTimeFromTimeOriginInReducedResolution(m_deadline);
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool IdleDeadline::didTimeout(Document& document) const
</span><span class="cx"> {
</span><del>-    auto window = makeRefPtr(document.domWindow());
</del><ins>+    RefPtr window { document.domWindow() };
</ins><span class="cx">     if (!window)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomMutationObservercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MutationObserver.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MutationObserver.cpp    2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/MutationObserver.cpp       2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -122,7 +122,7 @@
</span><span class="cx">     m_records.clear();
</span><span class="cx">     WeakHashSet registrations { m_registrations };
</span><span class="cx">     for (auto& registration : registrations) {
</span><del>-        auto nodeRef = makeRefPtr(registration.node());
</del><ins>+        Ref nodeRef { registration.node() };
</ins><span class="cx">         nodeRef->unregisterMutationObserver(registration);
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomPositioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Position.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Position.cpp    2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/Position.cpp       2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -261,7 +261,7 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr<Node> Position::firstNode() const
</span><span class="cx"> {
</span><del>-    auto container = makeRefPtr(containerNode());
</del><ins>+    RefPtr container { containerNode() };
</ins><span class="cx">     if (!container)
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (is<CharacterData>(*container))
</span><span class="lines">@@ -1610,7 +1610,7 @@
</span><span class="cx"> 
</span><span class="cx"> std::optional<BoundaryPoint> makeBoundaryPoint(const Position& position)
</span><span class="cx"> {
</span><del>-    auto container = makeRefPtr(position.containerNode());
</del><ins>+    RefPtr container { position.containerNode() };
</ins><span class="cx">     if (!container)
</span><span class="cx">         return std::nullopt;
</span><span class="cx">     return BoundaryPoint { container.releaseNonNull(), static_cast<unsigned>(position.computeOffsetInContainerNode()) };
</span></span></pre></div>
<a id="trunkSourceWebCoredomSlotAssignmentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/SlotAssignment.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/SlotAssignment.cpp      2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/SlotAssignment.cpp 2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">     ASSERT(m_slotElementCount > 0);
</span><span class="cx">     m_slotElementCount--;
</span><span class="cx"> 
</span><del>-    if (auto host = makeRefPtr(shadowRoot.host())) {
</del><ins>+    if (RefPtr host = shadowRoot.host()) {
</ins><span class="cx">         // FIXME: We should be able to do a targeted reconstruction.
</span><span class="cx">         host->invalidateStyleAndRenderersForSubtree();
</span><span class="cx">         if (!m_slotElementCount)
</span><span class="lines">@@ -282,7 +282,7 @@
</span><span class="cx">     slot->assignedNodes.clear();
</span><span class="cx">     m_slotAssignmentsIsValid = false;
</span><span class="cx"> 
</span><del>-    auto slotElement = makeRefPtr(findFirstSlotElement(*slot));
</del><ins>+    RefPtr slotElement { findFirstSlotElement(*slot) };
</ins><span class="cx">     if (!slotElement)
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredommessageportsWorkerMessagePortChannelProvidercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/messageports/WorkerMessagePortChannelProvider.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/messageports/WorkerMessagePortChannelProvider.cpp       2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/dom/messageports/WorkerMessagePortChannelProvider.cpp  2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx">     uint64_t callbackIdentifier = ++m_lastCallbackIdentifier;
</span><span class="cx">     m_takeAllMessagesCallbacks.add(callbackIdentifier, WTFMove(callback));
</span><span class="cx"> 
</span><del>-    callOnMainThread([this, workerThread = makeRefPtr(m_scope.workerOrWorkletThread()), callbackIdentifier, identifier]() mutable {
</del><ins>+    callOnMainThread([this, workerThread = RefPtr { m_scope.workerOrWorkletThread() }, callbackIdentifier, identifier]() mutable {
</ins><span class="cx">         MessagePortChannelProvider::singleton().takeAllMessagesForPort(identifier, [this, workerThread = WTFMove(workerThread), callbackIdentifier](Vector<MessageWithMessagePorts>&& messages, Function<void()>&& completionHandler) {
</span><span class="cx">             workerThread->runLoop().postTaskForMode([this, callbackIdentifier, messages = WTFMove(messages), completionHandler = WTFMove(completionHandler)](auto&) mutable {
</span><span class="cx">                 m_takeAllMessagesCallbacks.take(callbackIdentifier)(WTFMove(messages), [completionHandler = WTFMove(completionHandler)]() mutable {
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">     uint64_t callbackIdentifier = ++m_lastCallbackIdentifier;
</span><span class="cx">     m_activityCallbacks.add(callbackIdentifier, WTFMove(callback));
</span><span class="cx"> 
</span><del>-    callOnMainThread([this, workerThread = makeRefPtr(m_scope.workerOrWorkletThread()), callbackIdentifier, remoteTarget]() mutable {
</del><ins>+    callOnMainThread([this, workerThread = RefPtr { m_scope.workerOrWorkletThread() }, callbackIdentifier, remoteTarget]() mutable {
</ins><span class="cx">         MessagePortChannelProvider::singleton().checkRemotePortForActivity(remoteTarget, [this, workerThread = WTFMove(workerThread), callbackIdentifier](auto hasActivity) {
</span><span class="cx">             workerThread->runLoop().postTaskForMode([this, callbackIdentifier, hasActivity](auto&) mutable {
</span><span class="cx">                 m_activityCallbacks.take(callbackIdentifier)(hasActivity);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingApplyBlockElementCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp        2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp   2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -289,7 +289,7 @@
</span><span class="cx">     // If endOfNextParagraph was pointing at this same text node, endOfNextParagraph will be shifted by one paragraph.
</span><span class="cx">     // Avoid this by splitting "\n"
</span><span class="cx">     splitTextNode(*text, 1);
</span><del>-    auto previousSiblingOfText = makeRefPtr(text->previousSibling());
</del><ins>+    auto previousSiblingOfText = RefPtr { text->previousSibling() };
</ins><span class="cx"> 
</span><span class="cx">     if (text == start.containerNode() && previousSiblingOfText && is<Text>(previousSiblingOfText)) {
</span><span class="cx">         ASSERT(start.offsetInContainerNode() < position.offsetInContainerNode());
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingApplyStyleCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ApplyStyleCommand.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ApplyStyleCommand.cpp       2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/ApplyStyleCommand.cpp  2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -242,7 +242,7 @@
</span><span class="cx">     // Save and restore the selection endpoints using their indices in the editable root, since
</span><span class="cx">     // addBlockStyleIfNeeded may moveParagraphs, which can remove these endpoints.
</span><span class="cx">     // Calculate start and end indices from the start of the tree that they're in.
</span><del>-    auto scopeRoot = makeRefPtr(highestEditableRoot(visibleStart.deepEquivalent()));
</del><ins>+    RefPtr scopeRoot { highestEditableRoot(visibleStart.deepEquivalent()) };
</ins><span class="cx">     if (!scopeRoot)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx">         beyondEnd = NodeTraversal::next(*end.deprecatedNode());
</span><span class="cx">     
</span><span class="cx">     start = start.upstream(); // Move upstream to ensure we do not add redundant spans.
</span><del>-    auto startNode = makeRefPtr(start.deprecatedNode());
</del><ins>+    RefPtr startNode { start.deprecatedNode() };
</ins><span class="cx"> 
</span><span class="cx">     // Make sure we're not already at the end or the next NodeTraversal::next() will traverse past it.
</span><span class="cx">     if (startNode == beyondEnd)
</span><span class="lines">@@ -457,7 +457,7 @@
</span><span class="cx"> {
</span><span class="cx">     // We are allowed to leave the highest ancestor with unicode-bidi unsplit if it is unicode-bidi: embed and direction: allowedDirection.
</span><span class="cx">     // In that case, we return the unsplit ancestor. Otherwise, we return 0.
</span><del>-    auto block = makeRefPtr(enclosingBlock(node));
</del><ins>+    RefPtr block { enclosingBlock(node) };
</ins><span class="cx">     if (!block || block == node)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -464,7 +464,7 @@
</span><span class="cx">     RefPtr<Node> highestAncestorWithUnicodeBidi;
</span><span class="cx">     RefPtr<Node> nextHighestAncestorWithUnicodeBidi;
</span><span class="cx">     int highestAncestorUnicodeBidi = 0;
</span><del>-    for (auto ancestor = makeRefPtr(node->parentNode()); ancestor != block; ancestor = ancestor->parentNode()) {
</del><ins>+    for (auto ancestor = RefPtr { node->parentNode() }; ancestor != block; ancestor = ancestor->parentNode()) {
</ins><span class="cx">         int unicodeBidi = toIdentifier(ComputedStyleExtractor(ancestor.get()).propertyValue(CSSPropertyUnicodeBidi));
</span><span class="cx">         if (unicodeBidi && unicodeBidi != CSSValueNormal) {
</span><span class="cx">             highestAncestorUnicodeBidi = unicodeBidi;
</span><span class="lines">@@ -505,7 +505,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock(Node* node, Node* unsplitAncestor)
</span><span class="cx"> {
</span><del>-    auto block = makeRefPtr(enclosingBlock(node));
</del><ins>+    RefPtr block { enclosingBlock(node) };
</ins><span class="cx">     if (!block || block == node)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -540,7 +540,7 @@
</span><span class="cx"> 
</span><span class="cx"> static RefPtr<Node> highestEmbeddingAncestor(Node* startNode, Node* enclosingNode)
</span><span class="cx"> {
</span><del>-    for (auto currentNode = makeRefPtr(startNode); currentNode && currentNode != enclosingNode; currentNode = currentNode->parentNode()) {
</del><ins>+    for (RefPtr currentNode = startNode; currentNode && currentNode != enclosingNode; currentNode = currentNode->parentNode()) {
</ins><span class="cx">         if (currentNode->isHTMLElement() && toIdentifier(ComputedStyleExtractor(currentNode.get()).propertyValue(CSSPropertyUnicodeBidi)) == CSSValueEmbed)
</span><span class="cx">             return currentNode;
</span><span class="cx">     }
</span><span class="lines">@@ -681,7 +681,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ApplyStyleCommand::fixRangeAndApplyInlineStyle(EditingStyle& style, const Position& start, const Position& end)
</span><span class="cx"> {
</span><del>-    auto startNode = makeRefPtr(start.deprecatedNode());
</del><ins>+    RefPtr startNode { start.deprecatedNode() };
</ins><span class="cx"> 
</span><span class="cx">     if (start.deprecatedEditingOffset() >= caretMaxOffset(*startNode)) {
</span><span class="cx">         startNode = NodeTraversal::next(*startNode);
</span><span class="lines">@@ -689,7 +689,7 @@
</span><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto pastEndNode = makeRefPtr(end.deprecatedNode());
</del><ins>+    RefPtr pastEndNode { end.deprecatedNode() };
</ins><span class="cx">     if (end.deprecatedEditingOffset() >= caretMaxOffset(*pastEndNode))
</span><span class="cx">         pastEndNode = NodeTraversal::nextSkippingChildren(*pastEndNode);
</span><span class="cx"> 
</span><span class="lines">@@ -703,7 +703,7 @@
</span><span class="cx">     // e.g. When applying font-size: large on <font color="blue">hello</font>, we need to include the font element in our run
</span><span class="cx">     // to generate <font color="blue" size="4">hello</font> instead of <font color="blue"><font size="4">hello</font></font>
</span><span class="cx">     auto range = *makeSimpleRange(start, end);
</span><del>-    auto editableRoot = makeRefPtr(startNode->rootEditableElement());
</del><ins>+    RefPtr editableRoot { startNode->rootEditableElement() };
</ins><span class="cx">     if (startNode != editableRoot) {
</span><span class="cx">         while (editableRoot && startNode->parentNode() != editableRoot && isNodeVisiblyContainedWithin(*startNode->parentNode(), range))
</span><span class="cx">             startNode = startNode->parentNode();
</span><span class="lines">@@ -717,8 +717,8 @@
</span><span class="cx">     if (!node.hasEditableStyle())
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    auto sibling = makeRefPtr(NodeTraversal::nextSkippingChildren(node));
-    for (auto descendant = makeRefPtr(node.firstChild()); descendant && descendant != sibling; descendant = NodeTraversal::next(*descendant)) {
</del><ins>+    RefPtr sibling { NodeTraversal::nextSkippingChildren(node) };
+    for (RefPtr descendant = node.firstChild(); descendant && descendant != sibling; descendant = NodeTraversal::next(*descendant)) {
</ins><span class="cx">         if (!descendant->hasEditableStyle())
</span><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="lines">@@ -772,7 +772,7 @@
</span><span class="cx">             // Add to this element's inline style and skip over its contents.
</span><span class="cx">             HTMLElement& element = downcast<HTMLElement>(*node);
</span><span class="cx">             RefPtr<MutableStyleProperties> inlineStyle = copyStyleOrCreateEmpty(element.inlineStyle());
</span><del>-            if (auto otherStyle = makeRefPtr(style.style()))
</del><ins>+            if (RefPtr otherStyle = style.style())
</ins><span class="cx">                 inlineStyle->mergeAndOverrideOnConflict(*otherStyle);
</span><span class="cx">             setNodeAttribute(element, styleAttr, inlineStyle->asText());
</span><span class="cx">             next = NodeTraversal::nextSkippingChildren(*node);
</span><span class="lines">@@ -793,7 +793,7 @@
</span><span class="cx"> 
</span><span class="cx">         auto runStart = node;
</span><span class="cx">         auto runEnd = node;
</span><del>-        auto sibling = makeRefPtr(node->nextSibling());
</del><ins>+        RefPtr sibling { node->nextSibling() };
</ins><span class="cx">         while (sibling && sibling != pastEndNode && !sibling->contains(pastEndNode) && (!isBlock(sibling.get()) || sibling->hasTagName(brTag)) && !containsNonEditableRegion(*sibling)) {
</span><span class="cx">             runEnd = sibling;
</span><span class="cx">             sibling = runEnd->nextSibling();
</span><span class="lines">@@ -800,7 +800,7 @@
</span><span class="cx">         }
</span><span class="cx">         next = NodeTraversal::nextSkippingChildren(*runEnd);
</span><span class="cx"> 
</span><del>-        auto pastEndNode = makeRefPtr(NodeTraversal::nextSkippingChildren(*runEnd));
</del><ins>+        RefPtr pastEndNode { NodeTraversal::nextSkippingChildren(*runEnd) };
</ins><span class="cx">         if (!shouldApplyInlineStyleToRun(style, runStart.get(), pastEndNode.get()))
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="lines">@@ -836,7 +836,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(runStart);
</span><span class="cx"> 
</span><del>-    for (auto node = makeRefPtr(runStart); node && node != pastEndNode; node = NodeTraversal::next(*node)) {
</del><ins>+    for (RefPtr node = runStart; node && node != pastEndNode; node = NodeTraversal::next(*node)) {
</ins><span class="cx">         if (node->hasChildNodes())
</span><span class="cx">             continue;
</span><span class="cx">         // We don't consider m_isInlineElementToRemoveFunction here because we never apply style when m_isInlineElementToRemoveFunction is specified
</span><span class="lines">@@ -968,9 +968,9 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     RefPtr<HTMLElement> result;
</span><del>-    auto unsplittableElement = makeRefPtr(unsplittableElementForPosition(firstPositionInOrBeforeNode(node)));
</del><ins>+    RefPtr unsplittableElement = unsplittableElementForPosition(firstPositionInOrBeforeNode(node));
</ins><span class="cx"> 
</span><del>-    for (auto ancestor = makeRefPtr(node); ancestor; ancestor = ancestor->parentNode()) {
</del><ins>+    for (RefPtr ancestor = node; ancestor; ancestor = ancestor->parentNode()) {
</ins><span class="cx">         if (is<HTMLElement>(*ancestor) && shouldRemoveInlineStyleFromElement(style, downcast<HTMLElement>(*ancestor)))
</span><span class="cx">             result = static_pointer_cast<HTMLElement>(ancestor);
</span><span class="cx">         // Should stop at the editable root (cannot cross editing boundary) and
</span><span class="lines">@@ -1081,13 +1081,13 @@
</span><span class="cx">     // If the pushDownStart is at the end of a text node, then this node is not fully selected.
</span><span class="cx">     // Move it to the next deep quivalent position to avoid removing the style from this node.
</span><span class="cx">     // e.g. if pushDownStart was at Position("hello", 5) in <b>hello<div>world</div></b>, we want Position("world", 0) instead.
</span><del>-    auto pushDownStartContainer = makeRefPtr(pushDownStart.containerNode());
</del><ins>+    RefPtr pushDownStartContainer { pushDownStart.containerNode() };
</ins><span class="cx">     if (is<Text>(pushDownStartContainer) && static_cast<unsigned>(pushDownStart.computeOffsetInContainerNode()) == downcast<Text>(*pushDownStartContainer).length())
</span><span class="cx">         pushDownStart = nextVisuallyDistinctCandidate(pushDownStart);
</span><span class="cx">     // If pushDownEnd is at the start of a text node, then this node is not fully selected.
</span><span class="cx">     // Move it to the previous deep equivalent position to avoid removing the style from this node.
</span><span class="cx">     Position pushDownEnd = end.upstream();
</span><del>-    auto pushDownEndContainer = makeRefPtr(pushDownEnd.containerNode());
</del><ins>+    RefPtr pushDownEndContainer { pushDownEnd.containerNode() };
</ins><span class="cx">     if (is<Text>(pushDownEndContainer) && !pushDownEnd.computeOffsetInContainerNode())
</span><span class="cx">         pushDownEnd = previousVisuallyDistinctCandidate(pushDownEnd);
</span><span class="cx"> 
</span><span class="lines">@@ -1248,7 +1248,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplyStyleCommand::mergeStartWithPreviousIfIdentical(const Position& start, const Position& end)
</span><span class="cx"> {
</span><del>-    auto startNode = makeRefPtr(start.containerNode());
</del><ins>+    RefPtr startNode { start.containerNode() };
</ins><span class="cx">     if (start.computeOffsetInContainerNode())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -1261,7 +1261,7 @@
</span><span class="cx">         startNode = startNode->parentNode();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto previousSibling = makeRefPtr(startNode->previousSibling());
</del><ins>+    RefPtr previousSibling { startNode->previousSibling() };
</ins><span class="cx">     if (!previousSibling || !areIdenticalElements(*startNode, *previousSibling))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -1281,7 +1281,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool ApplyStyleCommand::mergeEndWithNextIfIdentical(const Position& start, const Position& end)
</span><span class="cx"> {
</span><del>-    auto endNode = makeRefPtr(end.containerNode());
</del><ins>+    RefPtr endNode { end.containerNode() };
</ins><span class="cx"> 
</span><span class="cx">     if (isAtomicNode(endNode.get())) {
</span><span class="cx">         int endOffset = end.computeOffsetInContainerNode();
</span><span class="lines">@@ -1294,7 +1294,7 @@
</span><span class="cx">     if (endNode->hasTagName(brTag))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto nextSibling = makeRefPtr(endNode->nextSibling());
</del><ins>+    RefPtr nextSibling { endNode->nextSibling() };
</ins><span class="cx">     if (!nextSibling || !areIdenticalElements(*endNode, *nextSibling))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -1341,7 +1341,7 @@
</span><span class="cx">         mergeIdenticalElements(element, downcast<Element>(*nextSibling));
</span><span class="cx"> 
</span><span class="cx">     if (is<Element>(previousSibling) && previousSibling->hasEditableStyle()) {
</span><del>-        auto mergedElement = makeRefPtr(previousSibling->nextSibling());
</del><ins>+        RefPtr mergedElement { previousSibling->nextSibling() };
</ins><span class="cx">         ASSERT(mergedElement);
</span><span class="cx">         if (mergedElement->hasEditableStyle() && areIdenticalElements(*previousSibling, *mergedElement))
</span><span class="cx">             mergeIdenticalElements(downcast<Element>(*previousSibling), downcast<Element>(*mergedElement));
</span><span class="lines">@@ -1502,7 +1502,7 @@
</span><span class="cx">         textNodes.append(*textNode);
</span><span class="cx"> 
</span><span class="cx">     for (auto& childText : textNodes) {
</span><del>-        auto next = makeRefPtr(childText->nextSibling());
</del><ins>+        RefPtr next { childText->nextSibling() };
</ins><span class="cx">         if (!is<Text>(next))
</span><span class="cx">             continue;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingChangeListTypeCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ChangeListTypeCommand.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ChangeListTypeCommand.cpp   2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/ChangeListTypeCommand.cpp      2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> 
</span><span class="cx"> std::optional<ChangeListTypeCommand::Type> ChangeListTypeCommand::listConversionType(Document& document)
</span><span class="cx"> {
</span><del>-    if (auto frame = makeRefPtr(document.frame())) {
</del><ins>+    if (RefPtr frame = document.frame()) {
</ins><span class="cx">         if (auto typeAndElement = listConversionTypeForSelection(frame->selection().selection()))
</span><span class="cx">             return typeAndElement->first;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingCompositeEditCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp    2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp       2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx"> static void postTextStateChangeNotification(AXObjectCache* cache, const VisiblePosition& position, const String& deletedText, const String& insertedText)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(cache);
</span><del>-    auto node = makeRefPtr(highestEditableRoot(position.deepEquivalent(), HasEditableAXRole));
</del><ins>+    RefPtr node { highestEditableRoot(position.deepEquivalent(), HasEditableAXRole) };
</ins><span class="cx">     if (!node)
</span><span class="cx">         return;
</span><span class="cx">     if (insertedText.length() && deletedText.length())
</span><span class="lines">@@ -553,7 +553,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CompositeEditCommand::insertNodeBefore(Ref<Node>&& insertChild, Node& refChild, ShouldAssumeContentIsAlwaysEditable shouldAssumeContentIsAlwaysEditable)
</span><span class="cx"> {
</span><del>-    auto parent = makeRefPtr(refChild.parentNode());
</del><ins>+    RefPtr parent { refChild.parentNode() };
</ins><span class="cx">     if (!parent || (!parent->hasEditableStyle() && parent->renderer()))
</span><span class="cx">         return;
</span><span class="cx">     applyCommandToComposite(InsertNodeBeforeCommand::create(WTFMove(insertChild), refChild, shouldAssumeContentIsAlwaysEditable, editingAction()));
</span><span class="lines">@@ -561,7 +561,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CompositeEditCommand::insertNodeAfter(Ref<Node>&& insertChild, Node& refChild)
</span><span class="cx"> {
</span><del>-    auto parent = makeRefPtr(refChild.parentNode());
</del><ins>+    RefPtr parent { refChild.parentNode() };
</ins><span class="cx">     if (!parent)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -580,11 +580,11 @@
</span><span class="cx">     // For editing positions like [table, 0], insert before the table,
</span><span class="cx">     // likewise for replaced elements, brs, etc.
</span><span class="cx">     Position p = editingPosition.parentAnchoredEquivalent();
</span><del>-    auto refChild = makeRefPtr(p.deprecatedNode());
</del><ins>+    RefPtr refChild { p.deprecatedNode() };
</ins><span class="cx">     int offset = p.deprecatedEditingOffset();
</span><span class="cx">     
</span><span class="cx">     if (canHaveChildrenForEditing(*refChild)) {
</span><del>-        auto child = makeRefPtr(refChild->firstChild());
</del><ins>+        RefPtr child { refChild->firstChild() };
</ins><span class="cx">         for (int i = 0; child && i < offset; i++)
</span><span class="cx">             child = child->nextSibling();
</span><span class="cx">         if (child)
</span><span class="lines">@@ -613,7 +613,7 @@
</span><span class="cx"> void CompositeEditCommand::removeChildrenInRange(Node& node, unsigned from, unsigned to)
</span><span class="cx"> {
</span><span class="cx">     Vector<Ref<Node>> children;
</span><del>-    auto child = makeRefPtr(node.traverseToChildAt(from));
</del><ins>+    RefPtr child { node.traverseToChildAt(from) };
</ins><span class="cx">     for (unsigned i = from; child && i < to; i++, child = child->nextSibling())
</span><span class="cx">         children.append(*child);
</span><span class="cx"> 
</span><span class="lines">@@ -635,7 +635,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CompositeEditCommand::removeNodeAndPruneAncestors(Node& node)
</span><span class="cx"> {
</span><del>-    auto parent = makeRefPtr(node.parentNode());
</del><ins>+    RefPtr parent { node.parentNode() };
</ins><span class="cx">     removeNode(node);
</span><span class="cx">     prune(parent.get());
</span><span class="cx"> }
</span><span class="lines">@@ -678,7 +678,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CompositeEditCommand::prune(Node* node)
</span><span class="cx"> {
</span><del>-    if (auto highestNodeToRemove = makeRefPtr(highestNodeToRemoveInPruning(node)))
</del><ins>+    if (RefPtr highestNodeToRemove = highestNodeToRemoveInPruning(node))
</ins><span class="cx">         removeNode(*highestNodeToRemove);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -823,7 +823,7 @@
</span><span class="cx">         return positionInParentAfterNode(position.anchorNode());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto tabSpan = makeRefPtr(tabSpanNode(position.containerNode()));
</del><ins>+    RefPtr tabSpan { tabSpanNode(position.containerNode()) };
</ins><span class="cx"> 
</span><span class="cx">     if (position.offsetInContainerNode() <= caretMinOffset(*position.containerNode()))
</span><span class="cx">         return positionInParentBeforeNode(tabSpan.get());
</span><span class="lines">@@ -889,7 +889,7 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr<Text> CompositeEditCommand::textNodeForRebalance(const Position& position) const
</span><span class="cx"> {
</span><del>-    auto node = makeRefPtr(position.containerNode());
</del><ins>+    RefPtr node { position.containerNode() };
</ins><span class="cx">     if (position.anchorType() != Position::PositionIsOffsetInAnchor || !is<Text>(node))
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -960,7 +960,7 @@
</span><span class="cx"> 
</span><span class="cx"> void CompositeEditCommand::prepareWhitespaceAtPositionForSplit(Position& position)
</span><span class="cx"> {
</span><del>-    auto node = makeRefPtr(position.deprecatedNode());
</del><ins>+    RefPtr node { position.deprecatedNode() };
</ins><span class="cx">     if (!is<Text>(node))
</span><span class="cx">         return;
</span><span class="cx">     Text& textNode = downcast<Text>(*node);
</span><span class="lines">@@ -1336,7 +1336,7 @@
</span><span class="cx">     if (!caretAfterDelete.equals(destination) && isStartOfParagraph(caretAfterDelete) && isEndOfParagraph(caretAfterDelete)) {
</span><span class="cx">         // Note: We want the rightmost candidate.
</span><span class="cx">         Position position = caretAfterDelete.deepEquivalent().downstream();
</span><del>-        auto node = makeRefPtr(position.deprecatedNode());
</del><ins>+        RefPtr node { position.deprecatedNode() };
</ins><span class="cx">         ASSERT(node);
</span><span class="cx">         // Normally deletion will leave a br as a placeholder.
</span><span class="cx">         if (is<HTMLBRElement>(*node))
</span><span class="lines">@@ -1574,7 +1574,7 @@
</span><span class="cx">     style->mergeTypingStyle(document());
</span><span class="cx"> 
</span><span class="cx">     RefPtr<Element> newBlock;
</span><del>-    if (auto blockEnclosingList = makeRefPtr(listNode->parentNode())) {
</del><ins>+    if (RefPtr blockEnclosingList = listNode->parentNode()) {
</ins><span class="cx">         if (is<HTMLLIElement>(*blockEnclosingList)) { // listNode is inside another list item
</span><span class="cx">             if (visiblePositionAfterNode(*blockEnclosingList) == visiblePositionAfterNode(*listNode)) {
</span><span class="cx">                 // If listNode appears at the end of the outer list item, then move listNode outside of this list item
</span><span class="lines">@@ -1629,7 +1629,7 @@
</span><span class="cx">         return false;
</span><span class="cx">         
</span><span class="cx">     VisiblePosition caret(endingSelection().visibleStart());
</span><del>-    auto highestBlockquote = makeRefPtr(highestEnclosingNodeOfType(caret.deepEquivalent(), &isMailBlockquote));
</del><ins>+    RefPtr highestBlockquote { highestEnclosingNodeOfType(caret.deepEquivalent(), &isMailBlockquote) };
</ins><span class="cx">     if (!highestBlockquote)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -1665,7 +1665,7 @@
</span><span class="cx">     else if (is<Text>(*caretPos.deprecatedNode())) {
</span><span class="cx">         ASSERT(caretPos.deprecatedEditingOffset() == 0);
</span><span class="cx">         Text& textNode = downcast<Text>(*caretPos.deprecatedNode());
</span><del>-        auto parentNode = makeRefPtr(textNode.parentNode());
</del><ins>+        RefPtr parentNode { textNode.parentNode() };
</ins><span class="cx">         // The preserved newline must be the first thing in the node, since otherwise the previous
</span><span class="cx">         // paragraph would be quoted, and we verified that it wasn't above.
</span><span class="cx">         deleteTextFromNode(textNode, 0, 1);
</span><span class="lines">@@ -1685,7 +1685,7 @@
</span><span class="cx">         return original;
</span><span class="cx">         
</span><span class="cx">     VisiblePosition visiblePos(original);
</span><del>-    auto enclosingAnchor = makeRefPtr(enclosingAnchorElement(original));
</del><ins>+    RefPtr enclosingAnchor { enclosingAnchorElement(original) };
</ins><span class="cx">     Position result = original;
</span><span class="cx"> 
</span><span class="cx">     if (!enclosingAnchor)
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingDeleteSelectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp  2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp     2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">     if (!isTableRow(row))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    for (auto child = makeRefPtr(row->firstChild()); child; child = child->nextSibling()) {
</del><ins>+    for (RefPtr child = row->firstChild(); child; child = child->nextSibling()) {
</ins><span class="cx">         if (isTableCell(child.get()) && !isTableCellEmpty(child.get()))
</span><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="lines">@@ -103,8 +103,8 @@
</span><span class="cx"> 
</span><span class="cx"> static RefPtr<HTMLElement> firstInSpecialElement(const Position& position)
</span><span class="cx"> {
</span><del>-    auto rootEditableElement = makeRefPtr(position.rootEditableElement());
-    for (auto node = makeRefPtr(position.deprecatedNode()); node && node->rootEditableElement() == rootEditableElement; node = node->parentNode()) {
</del><ins>+    RefPtr rootEditableElement { position.rootEditableElement() };
+    for (RefPtr node = position.deprecatedNode(); node && node->rootEditableElement() == rootEditableElement; node = node->parentNode()) {
</ins><span class="cx">         if (!isSpecialHTMLElement(*node))
</span><span class="cx">             continue;
</span><span class="cx">         VisiblePosition visiblePosition = position;
</span><span class="lines">@@ -119,8 +119,8 @@
</span><span class="cx"> 
</span><span class="cx"> static RefPtr<HTMLElement> lastInSpecialElement(const Position& position)
</span><span class="cx"> {
</span><del>-    auto rootEditableElement = makeRefPtr(position.rootEditableElement());
-    for (auto node = makeRefPtr(position.deprecatedNode()); node && node->rootEditableElement() == rootEditableElement; node = node->parentNode()) {
</del><ins>+    RefPtr rootEditableElement { position.rootEditableElement() };
+    for (RefPtr node = position.deprecatedNode(); node && node->rootEditableElement() == rootEditableElement; node = node->parentNode()) {
</ins><span class="cx">         if (!isSpecialHTMLElement(*node))
</span><span class="cx">             continue;
</span><span class="cx">         VisiblePosition visiblePosition = position;
</span><span class="lines">@@ -321,8 +321,8 @@
</span><span class="cx">     // Don't move content out of a table cell.
</span><span class="cx">     // If the cell is non-editable, enclosingNodeOfType won't return it by default, so
</span><span class="cx">     // tell that function that we don't care if it returns non-editable nodes.
</span><del>-    auto startCell = makeRefPtr(enclosingNodeOfType(m_upstreamStart, &isTableCell, CanCrossEditingBoundary));
-    auto endCell = makeRefPtr(enclosingNodeOfType(m_downstreamEnd, &isTableCell, CanCrossEditingBoundary));
</del><ins>+    RefPtr startCell { enclosingNodeOfType(m_upstreamStart, &isTableCell, CanCrossEditingBoundary) };
+    RefPtr endCell { enclosingNodeOfType(m_downstreamEnd, &isTableCell, CanCrossEditingBoundary) };
</ins><span class="cx">     // FIXME: This isn't right.  A borderless table with two rows and a single column would appear as two paragraphs.
</span><span class="cx">     if (endCell && endCell != startCell)
</span><span class="cx">         m_mergeBlocksAfterDelete = false;
</span><span class="lines">@@ -434,10 +434,10 @@
</span><span class="cx"> 
</span><span class="cx"> bool DeleteSelectionCommand::handleSpecialCaseBRDelete()
</span><span class="cx"> {
</span><del>-    auto nodeAfterUpstreamStart = makeRefPtr(m_upstreamStart.computeNodeAfterPosition());
-    auto nodeAfterDownstreamStart = makeRefPtr(m_downstreamStart.computeNodeAfterPosition());
</del><ins>+    RefPtr nodeAfterUpstreamStart { m_upstreamStart.computeNodeAfterPosition() };
+    RefPtr nodeAfterDownstreamStart { m_downstreamStart.computeNodeAfterPosition() };
</ins><span class="cx">     // Upstream end will appear before BR due to canonicalization
</span><del>-    auto nodeAfterUpstreamEnd = makeRefPtr(m_upstreamEnd.computeNodeAfterPosition());
</del><ins>+    RefPtr nodeAfterUpstreamEnd { m_upstreamEnd.computeNodeAfterPosition() };
</ins><span class="cx"> 
</span><span class="cx">     if (!nodeAfterUpstreamStart || !nodeAfterDownstreamStart)
</span><span class="cx">         return false;
</span><span class="lines">@@ -469,7 +469,7 @@
</span><span class="cx"> static Position firstEditablePositionInNode(Node* node)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(node);
</span><del>-    auto next = makeRefPtr(node);
</del><ins>+    RefPtr next { node };
</ins><span class="cx">     while (next && !next->hasEditableStyle())
</span><span class="cx">         next = NodeTraversal::next(*next, node);
</span><span class="cx">     return next ? firstPositionInOrBeforeNode(next.get()) : Position();
</span><span class="lines">@@ -527,9 +527,9 @@
</span><span class="cx">             if (!node.firstChild())
</span><span class="cx">                 return;
</span><span class="cx">             // Search this non-editable region for editable regions to empty.
</span><del>-            auto child = makeRefPtr(node.firstChild());
</del><ins>+            RefPtr child { node.firstChild() };
</ins><span class="cx">             while (child) {
</span><del>-                auto nextChild = makeRefPtr(child->nextSibling());
</del><ins>+                RefPtr nextChild { child->nextSibling() };
</ins><span class="cx">                 removeNode(*child, shouldAssumeContentIsAlwaysEditable);
</span><span class="cx">                 // Bail if nextChild is no longer node's child.
</span><span class="cx">                 if (nextChild && nextChild->parentNode() != &node)
</span><span class="lines">@@ -545,13 +545,13 @@
</span><span class="cx">     if (shouldRemoveContentOnly(node)) {
</span><span class="cx">         // Do not remove an element of table structure; remove its contents.
</span><span class="cx">         // Likewise for the root editable element.
</span><del>-        auto child = makeRefPtr(NodeTraversal::next(node, &node));
</del><ins>+        RefPtr child { NodeTraversal::next(node, &node) };
</ins><span class="cx">         while (child) {
</span><span class="cx">             if (shouldRemoveContentOnly(*child)) {
</span><span class="cx">                 child = NodeTraversal::next(*child, &node);
</span><span class="cx">                 continue;
</span><span class="cx">             }
</span><del>-            auto nextChild = makeRefPtr(NodeTraversal::nextSkippingChildren(*child, &node));
</del><ins>+            RefPtr nextChild { NodeTraversal::nextSkippingChildren(*child, &node) };
</ins><span class="cx">             removeNodeUpdatingStates(*child, shouldAssumeContentIsAlwaysEditable);
</span><span class="cx">             child = WTFMove(nextChild);
</span><span class="cx">         }
</span><span class="lines">@@ -560,9 +560,9 @@
</span><span class="cx">         auto& element = downcast<Element>(node);
</span><span class="cx">         document().updateLayoutIgnorePendingStylesheets();
</span><span class="cx">         // Check if we need to insert a placeholder for descendant table cells.
</span><del>-        auto descendant = makeRefPtr(ElementTraversal::next(element, &element));
</del><ins>+        RefPtr descendant { ElementTraversal::next(element, &element) };
</ins><span class="cx">         while (descendant) {
</span><del>-            auto nextDescendant = makeRefPtr(ElementTraversal::next(*descendant, &element));
</del><ins>+            RefPtr nextDescendant { ElementTraversal::next(*descendant, &element) };
</ins><span class="cx">             insertBlockPlaceholderForTableCellIfNeeded(*descendant);
</span><span class="cx">             descendant = WTFMove(nextDescendant);
</span><span class="cx">         }
</span><span class="lines">@@ -608,7 +608,7 @@
</span><span class="cx">             nodes.advance();
</span><span class="cx">         else {
</span><span class="cx">             nodes.advanceSkippingChildren();
</span><del>-            if (auto rootEditableElement = makeRefPtr(node->rootEditableElement())) {
</del><ins>+            if (RefPtr rootEditableElement = node->rootEditableElement()) {
</ins><span class="cx">                 removeNode(node.get());
</span><span class="cx">                 appendNode(node.get(), *rootEditableElement);
</span><span class="cx">             }
</span><span class="lines">@@ -622,7 +622,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     int startOffset = m_upstreamStart.deprecatedEditingOffset();
</span><del>-    auto startNode = makeRefPtr(m_upstreamStart.deprecatedNode());
</del><ins>+    RefPtr startNode { m_upstreamStart.deprecatedNode() };
</ins><span class="cx"> 
</span><span class="cx">     makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss();
</span><span class="cx"> 
</span><span class="lines">@@ -698,7 +698,7 @@
</span><span class="cx">                 removeNode(*node);
</span><span class="cx">                 node = nextNode.get();
</span><span class="cx">             } else {
</span><del>-                auto lastDescendant = makeRefPtr(node->lastDescendant());
</del><ins>+                RefPtr lastDescendant { node->lastDescendant() };
</ins><span class="cx">                 if (m_downstreamEnd.deprecatedNode() == lastDescendant && m_downstreamEnd.deprecatedEditingOffset() >= caretMaxOffset(*lastDescendant)) {
</span><span class="cx">                     removeNode(*node);
</span><span class="cx">                     node = nullptr;
</span><span class="lines">@@ -728,7 +728,7 @@
</span><span class="cx">                 } else if (!(startNodeWasDescendantOfEndNode && !m_upstreamStart.anchorNode()->isConnected())) {
</span><span class="cx">                     unsigned offset = 0;
</span><span class="cx">                     if (m_upstreamStart.deprecatedNode()->isDescendantOf(m_downstreamEnd.deprecatedNode())) {
</span><del>-                        auto n = makeRefPtr(m_upstreamStart.deprecatedNode());
</del><ins>+                        RefPtr n { m_upstreamStart.deprecatedNode() };
</ins><span class="cx">                         while (n && n->parentNode() != m_downstreamEnd.deprecatedNode())
</span><span class="cx">                             n = n->parentNode();
</span><span class="cx">                         if (n)
</span><span class="lines">@@ -788,7 +788,7 @@
</span><span class="cx">     
</span><span class="cx">     // m_downstreamEnd's block has been emptied out by deletion.  There is no content inside of it to
</span><span class="cx">     // move, so just remove it.
</span><del>-    auto endBlock = makeRefPtr(enclosingBlock(m_downstreamEnd.deprecatedNode()));
</del><ins>+    RefPtr endBlock { enclosingBlock(m_downstreamEnd.deprecatedNode()) };
</ins><span class="cx">     if (!endBlock)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -815,7 +815,7 @@
</span><span class="cx">     // FIXME: Consider RTL.
</span><span class="cx">     if (!m_startsAtEmptyLine && isStartOfParagraph(mergeDestination) && startOfParagraphToMove.absoluteCaretBounds().x() > mergeDestination.absoluteCaretBounds().x()) {
</span><span class="cx">         if (mergeDestination.deepEquivalent().downstream().deprecatedNode()->hasTagName(brTag)) {
</span><del>-            auto nodeToRemove = makeRefPtr(mergeDestination.deepEquivalent().downstream().deprecatedNode());
</del><ins>+            RefPtr nodeToRemove { mergeDestination.deepEquivalent().downstream().deprecatedNode() };
</ins><span class="cx">             removeNodeAndPruneAncestors(*nodeToRemove);
</span><span class="cx">             m_endingPosition = startOfParagraphToMove.deepEquivalent();
</span><span class="cx">             return;
</span><span class="lines">@@ -857,9 +857,9 @@
</span><span class="cx">     // DeleteSelectionCommand::removeNode does not remove rows but only empties them in preparation for this function.
</span><span class="cx">     // Instead, DeleteSelectionCommand::removeNodeUpdatingStates is used below, which calls a raw CompositeEditCommand::removeNode and adjusts selection.
</span><span class="cx">     if (m_endTableRow && m_endTableRow->isConnected() && m_endTableRow != m_startTableRow) {
</span><del>-        auto row = makeRefPtr(m_endTableRow->previousSibling());
</del><ins>+        RefPtr row { m_endTableRow->previousSibling() };
</ins><span class="cx">         while (row && row != m_startTableRow) {
</span><del>-            auto previousRow = makeRefPtr(row->previousSibling());
</del><ins>+            RefPtr previousRow { row->previousSibling() };
</ins><span class="cx">             if (isTableRowEmpty(row.get()))
</span><span class="cx">                 removeNodeUpdatingStates(*row, DoNotAssumeContentIsAlwaysEditable);
</span><span class="cx">             row = WTFMove(previousRow);
</span><span class="lines">@@ -868,9 +868,9 @@
</span><span class="cx">     
</span><span class="cx">     // Remove empty rows after the start row.
</span><span class="cx">     if (m_startTableRow && m_startTableRow->isConnected() && m_startTableRow != m_endTableRow) {
</span><del>-        auto row = makeRefPtr(m_startTableRow->nextSibling());
</del><ins>+        RefPtr row { m_startTableRow->nextSibling() };
</ins><span class="cx">         while (row && row != m_endTableRow) {
</span><del>-            auto nextRow = makeRefPtr(row->nextSibling());
</del><ins>+            RefPtr nextRow { row->nextSibling() };
</ins><span class="cx">             if (isTableRowEmpty(row.get()))
</span><span class="cx">                 removeNodeUpdatingStates(*row, DoNotAssumeContentIsAlwaysEditable);
</span><span class="cx">             row = WTFMove(nextRow);
</span><span class="lines">@@ -953,10 +953,10 @@
</span><span class="cx"> // This method removes div elements with no attributes that have only one child or no children at all.
</span><span class="cx"> void DeleteSelectionCommand::removeRedundantBlocks()
</span><span class="cx"> {
</span><del>-    auto node = makeRefPtr(m_endingPosition.containerNode());
</del><ins>+    RefPtr node { m_endingPosition.containerNode() };
</ins><span class="cx">     if (!node)
</span><span class="cx">         return;
</span><del>-    auto rootNode = makeRefPtr(node->rootEditableElement());
</del><ins>+    RefPtr rootNode { node->rootEditableElement() };
</ins><span class="cx">    
</span><span class="cx">     while (node && node != rootNode) {
</span><span class="cx">         if (isRemovableBlock(node.get())) {
</span><span class="lines">@@ -984,7 +984,7 @@
</span><span class="cx"> 
</span><span class="cx">     // If the deletion is occurring in a text field, and we're not deleting to replace the selection, then let the frame call across the bridge to notify the form delegate. 
</span><span class="cx">     if (!m_replace) {
</span><del>-        if (auto textControl = makeRefPtr(enclosingTextFormControl(m_selectionToDelete.start())); textControl && textControl->focused())
</del><ins>+        if (RefPtr textControl = enclosingTextFormControl(m_selectionToDelete.start()); textControl && textControl->focused())
</ins><span class="cx">             document().editor().textWillBeDeletedInTextField(textControl.get());
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -999,7 +999,7 @@
</span><span class="cx">         // Don't need a placeholder when deleting a selection that starts just before a table
</span><span class="cx">         // and ends inside it (we do need placeholders to hold open empty cells, but that's
</span><span class="cx">         // handled elsewhere).
</span><del>-        if (auto table = makeRefPtr(isLastPositionBeforeTable(m_selectionToDelete.visibleStart()))) {
</del><ins>+        if (RefPtr table = isLastPositionBeforeTable(m_selectionToDelete.visibleStart())) {
</ins><span class="cx">             if (m_selectionToDelete.end().deprecatedNode()->isDescendantOf(*table))
</span><span class="cx">                 m_needPlaceholder = false;
</span><span class="cx">         }
</span><span class="lines">@@ -1048,7 +1048,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool shouldRebalaceWhiteSpace = true;
</span><span class="cx">     if (!document().editor().behavior().shouldRebalanceWhiteSpacesInSecureField()) {
</span><del>-        if (auto endNode = makeRefPtr(m_endingPosition.deprecatedNode()); is<Text>(endNode)) {
</del><ins>+        if (RefPtr endNode = m_endingPosition.deprecatedNode(); is<Text>(endNode)) {
</ins><span class="cx">             auto& textNode = downcast<Text>(*endNode);
</span><span class="cx">             ScriptDisallowedScope scriptDisallowedScope;
</span><span class="cx">             if (textNode.length() && textNode.renderer())
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditCommand.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditCommand.cpp     2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/EditCommand.cpp        2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx">     auto* cache = document().existingAXObjectCache();
</span><span class="cx">     if (!cache)
</span><span class="cx">         return;
</span><del>-    auto node = makeRefPtr(highestEditableRoot(position.deepEquivalent(), HasEditableAXRole));
</del><ins>+    RefPtr node { highestEditableRoot(position.deepEquivalent(), HasEditableAXRole) };
</ins><span class="cx">     cache->postTextStateChangeNotification(node.get(), type, text, position);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editing.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editing.cpp 2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/Editing.cpp    2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -550,7 +550,7 @@
</span><span class="cx"> {
</span><span class="cx">     Node* previousNode = nullptr;
</span><span class="cx">     auto* rootEditableElement = node ? node->rootEditableElement() : nullptr;
</span><del>-    for (auto currentNode = makeRefPtr(node); currentNode; currentNode = currentNode->parentNode()) {
</del><ins>+    for (RefPtr currentNode = node; currentNode; currentNode = currentNode->parentNode()) {
</ins><span class="cx">         if (auto* renderer = currentNode->renderer()) {
</span><span class="cx">             if (!renderer->canHaveChildren() || hasARenderedDescendant(currentNode.get(), previousNode) || rootEditableElement == currentNode.get())
</span><span class="cx">                 return previousNode;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp  2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/Editor.cpp     2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -283,7 +283,7 @@
</span><span class="cx">         return selection;
</span><span class="cx">     // If the target is a text control, and the current selection is outside of its shadow tree,
</span><span class="cx">     // then use the saved selection for that text control.
</span><del>-    if (auto target = makeRefPtr(event->target()); is<HTMLTextFormControlElement>(target) && downcast<Element>(*target).isTextField()) {
</del><ins>+    if (RefPtr target = event->target(); is<HTMLTextFormControlElement>(target) && downcast<Element>(*target).isTextField()) {
</ins><span class="cx">         auto start = selection.start();
</span><span class="cx">         if (start.isNull() || target != enclosingTextFormControl(start)) {
</span><span class="cx">             if (auto range = downcast<HTMLTextFormControlElement>(*target).selection())
</span><span class="lines">@@ -669,7 +669,7 @@
</span><span class="cx">     if (!client())
</span><span class="cx">         return false;
</span><span class="cx">     
</span><del>-    auto child = makeRefPtr(fragment.firstChild());
</del><ins>+    RefPtr child { fragment.firstChild() };
</ins><span class="cx">     if (is<CharacterData>(child) && fragment.lastChild() == child)
</span><span class="cx">         return client()->shouldInsertText(downcast<CharacterData>(*child).data(), replacingDOMRange, givenAction);
</span><span class="cx"> 
</span><span class="lines">@@ -725,7 +725,7 @@
</span><span class="cx">     if (!isContinuousSpellCheckingEnabled())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    auto nodeToCheck = makeRefPtr(selection.rootEditableElement());
</del><ins>+    RefPtr nodeToCheck { selection.rootEditableElement() };
</ins><span class="cx">     if (!nodeToCheck)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -780,7 +780,7 @@
</span><span class="cx"> void Editor::respondToChangedContents(const VisibleSelection& endingSelection)
</span><span class="cx"> {
</span><span class="cx">     if (AXObjectCache::accessibilityEnabled()) {
</span><del>-        auto node = makeRefPtr(endingSelection.start().deprecatedNode());
</del><ins>+        RefPtr node { endingSelection.start().deprecatedNode() };
</ins><span class="cx">         if (AXObjectCache* cache = document().existingAXObjectCache())
</span><span class="cx">             cache->postNotification(node.get(), AXObjectCache::AXValueChanged, PostTarget::ObservableParent);
</span><span class="cx">     }
</span><span class="lines">@@ -799,7 +799,7 @@
</span><span class="cx">     RefPtr<Node> startNode;
</span><span class="cx">     if (m_document.selection().isRange()) {
</span><span class="cx">         startNode = m_document.selection().selection().start().downstream().deprecatedNode();
</span><del>-        auto endNode = makeRefPtr(m_document.selection().selection().end().upstream().deprecatedNode());
</del><ins>+        RefPtr endNode { m_document.selection().selection().end().upstream().deprecatedNode() };
</ins><span class="cx">         if (enclosingBlock(startNode.get()) != enclosingBlock(endNode.get()))
</span><span class="cx">             return false;
</span><span class="cx">     } else
</span><span class="lines">@@ -829,8 +829,8 @@
</span><span class="cx">         if (enclosingElementWithTag(m_document.selection().selection().start(), ulTag))
</span><span class="cx">             return TriState::True;
</span><span class="cx">     } else if (m_document.selection().isRange()) {
</span><del>-        auto startNode = makeRefPtr(enclosingElementWithTag(m_document.selection().selection().start(), ulTag));
-        auto endNode = makeRefPtr(enclosingElementWithTag(m_document.selection().selection().end(), ulTag));
</del><ins>+        RefPtr startNode { enclosingElementWithTag(m_document.selection().selection().start(), ulTag) };
+        RefPtr endNode { enclosingElementWithTag(m_document.selection().selection().end(), ulTag) };
</ins><span class="cx">         if (startNode && endNode && startNode == endNode)
</span><span class="cx">             return TriState::True;
</span><span class="cx">     }
</span><span class="lines">@@ -844,8 +844,8 @@
</span><span class="cx">         if (enclosingElementWithTag(m_document.selection().selection().start(), olTag))
</span><span class="cx">             return TriState::True;
</span><span class="cx">     } else if (m_document.selection().isRange()) {
</span><del>-        auto startNode = makeRefPtr(enclosingElementWithTag(m_document.selection().selection().start(), olTag));
-        auto endNode = makeRefPtr(enclosingElementWithTag(m_document.selection().selection().end(), olTag));
</del><ins>+        RefPtr startNode { enclosingElementWithTag(m_document.selection().selection().start(), olTag) };
+        RefPtr endNode { enclosingElementWithTag(m_document.selection().selection().end(), olTag) };
</ins><span class="cx">         if (startNode && endNode && startNode == endNode)
</span><span class="cx">             return TriState::True;
</span><span class="cx">     }
</span><span class="lines">@@ -934,7 +934,7 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr<Element> Editor::findEventTargetFrom(const VisibleSelection& selection) const
</span><span class="cx"> {
</span><del>-    auto target = makeRefPtr(selection.start().element());
</del><ins>+    RefPtr target { selection.start().element() };
</ins><span class="cx">     if (!target)
</span><span class="cx">         target = document().bodyOrFrameset();
</span><span class="cx">     if (!target)
</span><span class="lines">@@ -964,7 +964,7 @@
</span><span class="cx"> 
</span><span class="cx">     String inputTypeName = inputTypeNameForEditingAction(editingAction);
</span><span class="cx">     String inputEventData = inputEventDataForEditingStyleAndAction(*style, editingAction);
</span><del>-    auto element = makeRefPtr(m_document.selection().selection().rootEditableElement());
</del><ins>+    RefPtr element { m_document.selection().selection().rootEditableElement() };
</ins><span class="cx"> 
</span><span class="cx">     if (element && !dispatchBeforeInputEvent(*element, inputTypeName, inputEventData))
</span><span class="cx">         return;
</span><span class="lines">@@ -999,7 +999,7 @@
</span><span class="cx"> 
</span><span class="cx">     String inputTypeName = inputTypeNameForEditingAction(editingAction);
</span><span class="cx">     String inputEventData = inputEventDataForEditingStyleAndAction(style, editingAction);
</span><del>-    auto element = makeRefPtr(m_document.selection().selection().rootEditableElement());
</del><ins>+    RefPtr element { m_document.selection().selection().rootEditableElement() };
</ins><span class="cx">     if (element && !dispatchBeforeInputEvent(*element, inputTypeName, inputEventData))
</span><span class="cx">         return;
</span><span class="cx">     if (m_document.selection().isNone())
</span><span class="lines">@@ -1079,8 +1079,8 @@
</span><span class="cx"> 
</span><span class="cx"> static void notifyTextFromControls(Element* startRoot, Element* endRoot)
</span><span class="cx"> {
</span><del>-    auto startingTextControl =  makeRefPtr(enclosingTextFormControl(firstPositionInOrBeforeNode(startRoot)));
-    auto endingTextControl = makeRefPtr(enclosingTextFormControl(firstPositionInOrBeforeNode(endRoot)));
</del><ins>+    RefPtr startingTextControl { enclosingTextFormControl(firstPositionInOrBeforeNode(startRoot)) };
+    RefPtr endingTextControl { enclosingTextFormControl(firstPositionInOrBeforeNode(endRoot)) };
</ins><span class="cx">     if (startingTextControl)
</span><span class="cx">         startingTextControl->didEditInnerTextValue();
</span><span class="cx">     if (endingTextControl && startingTextControl != endingTextControl)
</span><span class="lines">@@ -1112,7 +1112,7 @@
</span><span class="cx">     if (!command.shouldDispatchInputEvents())
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    auto composition = makeRefPtr(command.composition());
</del><ins>+    RefPtr composition { command.composition() };
</ins><span class="cx">     if (!composition)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="lines">@@ -1303,7 +1303,7 @@
</span><span class="cx">     // that is contained in the event target.
</span><span class="cx">     selection = selectionForCommand(triggeringEvent);
</span><span class="cx">     if (selection.isContentEditable()) {
</span><del>-        if (auto selectionStart = makeRefPtr(selection.start().deprecatedNode())) {
</del><ins>+        if (RefPtr selectionStart = selection.start().deprecatedNode()) {
</ins><span class="cx">             Ref<Document> document(selectionStart->document());
</span><span class="cx"> 
</span><span class="cx">             // Insert the text
</span><span class="lines">@@ -1604,7 +1604,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Editor::copyImage(const HitTestResult& result)
</span><span class="cx"> {
</span><del>-    auto element = makeRefPtr(result.innerNonSharedElement());
</del><ins>+    RefPtr element { result.innerNonSharedElement() };
</ins><span class="cx">     if (!element)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -1643,7 +1643,7 @@
</span><span class="cx">     if (m_imageElementsToLoadBeforeRevealingSelection.isEmpty())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    auto startContainer = makeRefPtr(m_document.selection().selection().start().containerNode());
</del><ins>+    RefPtr startContainer { m_document.selection().selection().start().containerNode() };
</ins><span class="cx">     if (!startContainer)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -1887,7 +1887,7 @@
</span><span class="cx">         return;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    auto focusedElement = makeRefPtr(document().focusedElement());
</del><ins>+    RefPtr focusedElement { document().focusedElement() };
</ins><span class="cx">     if (focusedElement && focusedElement->isTextField()) {
</span><span class="cx">         if (direction == WritingDirection::Natural)
</span><span class="cx">             return;
</span><span class="lines">@@ -1914,7 +1914,7 @@
</span><span class="cx">     auto result = WritingDirection::LeftToRight;
</span><span class="cx"> 
</span><span class="cx">     Position pos = m_document.selection().selection().visibleStart().deepEquivalent();
</span><del>-    auto node = makeRefPtr(pos.deprecatedNode());
</del><ins>+    RefPtr node { pos.deprecatedNode() };
</ins><span class="cx">     if (!node)
</span><span class="cx">         return result;
</span><span class="cx"> 
</span><span class="lines">@@ -1965,7 +1965,7 @@
</span><span class="cx">     if (!hasComposition())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    auto frame = makeRefPtr(m_document.frame());
</del><ins>+    RefPtr frame { m_document.frame() };
</ins><span class="cx">     if (!frame)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -2087,7 +2087,7 @@
</span><span class="cx">     client()->startDelayingAndCoalescingContentChangeNotifications();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    auto target = makeRefPtr(document().focusedElement());
</del><ins>+    RefPtr target { document().focusedElement() };
</ins><span class="cx">     if (target) {
</span><span class="cx">         // Dispatch an appropriate composition event to the focused node.
</span><span class="cx">         // We check the composition status and choose an appropriate composition event since this
</span><span class="lines">@@ -2137,9 +2137,9 @@
</span><span class="cx">         // Find out what node has the composition now.
</span><span class="cx">         Position base = m_document.selection().selection().base().downstream();
</span><span class="cx">         Position extent = m_document.selection().selection().extent();
</span><del>-        auto baseNode = makeRefPtr(base.deprecatedNode());
</del><ins>+        RefPtr baseNode { base.deprecatedNode() };
</ins><span class="cx">         unsigned baseOffset = base.deprecatedEditingOffset();
</span><del>-        auto extentNode = makeRefPtr(extent.deprecatedNode());
</del><ins>+        RefPtr extentNode { extent.deprecatedNode() };
</ins><span class="cx">         unsigned extentOffset = extent.deprecatedEditingOffset();
</span><span class="cx"> 
</span><span class="cx">         if (is<Text>(baseNode) && baseNode == extentNode && baseOffset + text.length() == extentOffset) {
</span><span class="lines">@@ -2251,7 +2251,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // topNode defines the whole range we want to operate on 
</span><del>-    auto topNode = makeRefPtr(highestEditableRoot(position));
</del><ins>+    RefPtr topNode { highestEditableRoot(position) };
</ins><span class="cx">     if (topNode)
</span><span class="cx">         spellingSearchRange.end = makeBoundaryPointAfterNodeContents(*topNode);
</span><span class="cx"> 
</span><span class="lines">@@ -2563,7 +2563,7 @@
</span><span class="cx">             if (nextPosition.isNull() || nextPosition == spellCheckingEnd)
</span><span class="cx">                 break;
</span><span class="cx"> 
</span><del>-            if (auto containerElement = makeRefPtr(nextPosition.deepEquivalent().upstream().containerOrParentElement())) {
</del><ins>+            if (RefPtr containerElement = nextPosition.deepEquivalent().upstream().containerOrParentElement()) {
</ins><span class="cx">                 if (!containerElement->isSpellCheckingEnabled())
</span><span class="cx">                     break;
</span><span class="cx">             }
</span><span class="lines">@@ -2672,11 +2672,11 @@
</span><span class="cx"> {
</span><span class="cx">     if (!node)
</span><span class="cx">         return false;
</span><del>-    auto element = makeRefPtr(is<Element>(*node) ? downcast<Element>(node) : node->parentElement());
</del><ins>+    RefPtr element = is<Element>(*node) ? downcast<Element>(node) : node->parentElement();
</ins><span class="cx">     if (!element)
</span><span class="cx">         return false;
</span><span class="cx">     if (element->isInUserAgentShadowTree()) {
</span><del>-        if (auto textControl = makeRefPtr(enclosingTextFormControl(firstPositionInOrBeforeNode(element.get()))))
</del><ins>+        if (RefPtr textControl = enclosingTextFormControl(firstPositionInOrBeforeNode(element.get())))
</ins><span class="cx">             return textControl->isSpellCheckingEnabled();
</span><span class="cx">     }
</span><span class="cx">     return element->isSpellCheckingEnabled();
</span><span class="lines">@@ -2911,7 +2911,7 @@
</span><span class="cx">                 correctSpellcheckingPreservingTextCheckingParagraph(paragraph, rangeToReplace, replacement, { resultLocation, resultLength });
</span><span class="cx"> 
</span><span class="cx">                 if (AXObjectCache* cache = document().existingAXObjectCache()) {
</span><del>-                    if (auto root = makeRefPtr(m_document.selection().selection().rootEditableElement()))
</del><ins>+                    if (RefPtr root = m_document.selection().selection().rootEditableElement())
</ins><span class="cx">                         cache->postNotification(root.get(), AXObjectCache::AXAutocorrectionOccured);
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -3338,7 +3338,7 @@
</span><span class="cx">     Ref<Document> document { this->document() };
</span><span class="cx"> 
</span><span class="cx">     // Save off state so that we can set the text insertion position to just before the placeholder element after removal.
</span><del>-    auto savedRootEditableElement = makeRefPtr(placeholder.rootEditableElement());
</del><ins>+    RefPtr savedRootEditableElement { placeholder.rootEditableElement() };
</ins><span class="cx">     auto savedPositionBeforePlaceholder = positionBeforeNode(&placeholder).parentAnchoredEquivalent();
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Save the current selection if it has changed since the placeholder was inserted
</span><span class="lines">@@ -3460,7 +3460,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Editor::applyEditingStyleToBodyElement() const
</span><span class="cx"> {
</span><del>-    auto body = makeRefPtr(document().body());
</del><ins>+    RefPtr body { document().body() };
</ins><span class="cx">     if (!body)
</span><span class="cx">         return;
</span><span class="cx">     body->setInlineStyleProperty(CSSPropertyWordWrap, CSSValueBreakWord);
</span><span class="lines">@@ -3838,7 +3838,7 @@
</span><span class="cx"> 
</span><span class="cx"> static RefPtr<Node> findFirstMarkable(Node* startingNode)
</span><span class="cx"> {
</span><del>-    auto node = makeRefPtr(startingNode);
</del><ins>+    RefPtr node { startingNode };
</ins><span class="cx">     while (node) {
</span><span class="cx">         {
</span><span class="cx">             ScriptDisallowedScope::InMainThread scriptDisallowedScope;
</span><span class="lines">@@ -3879,7 +3879,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if USE(AUTOMATIC_TEXT_REPLACEMENT) && !PLATFORM(IOS_FAMILY)
</span><span class="cx">     bool onlyAllowsTextReplacement = false;
</span><del>-    if (auto host = makeRefPtr(rootEditableElement.shadowHost()))
</del><ins>+    if (RefPtr host = rootEditableElement.shadowHost())
</ins><span class="cx">         onlyAllowsTextReplacement = is<HTMLInputElement>(host) && downcast<HTMLInputElement>(*host).isSpellcheckDisabledExceptTextReplacement();
</span><span class="cx">     if (onlyAllowsTextReplacement)
</span><span class="cx">         textCheckingOptions = textCheckingOptions & TextCheckingType::Replacement;
</span><span class="lines">@@ -3983,7 +3983,7 @@
</span><span class="cx"> 
</span><span class="cx"> static Vector<TextList> editableTextListsAtPositionInDescendingOrder(const Position& position)
</span><span class="cx"> {
</span><del>-    auto startContainer = makeRefPtr(position.containerNode());
</del><ins>+    RefPtr startContainer { position.containerNode() };
</ins><span class="cx">     if (!startContainer)
</span><span class="cx">         return { };
</span><span class="cx"> 
</span><span class="lines">@@ -4093,7 +4093,7 @@
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto typingStyle = makeRefPtr(m_document.selection().typingStyle());
</del><ins>+    RefPtr typingStyle { m_document.selection().typingStyle() };
</ins><span class="cx">     if (typingStyle && typingStyle->style()) {
</span><span class="cx">         auto value = typingStyle->style()->getPropertyCSSValue(CSSPropertyWebkitTextDecorationsInEffect);
</span><span class="cx">         if (value && value->isValueList()) {
</span><span class="lines">@@ -4288,7 +4288,7 @@
</span><span class="cx">     if (!position.isCandidate() || position.isNull())
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    auto typingStyle = makeRefPtr(document().selection().typingStyle());
</del><ins>+    RefPtr typingStyle { document().selection().typingStyle() };
</ins><span class="cx">     if (!typingStyle || !typingStyle->style())
</span><span class="cx">         return &position.deprecatedNode()->renderer()->style();
</span><span class="cx"> 
</span><span class="lines">@@ -4301,7 +4301,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto positionNode = position.deprecatedNode();
</span><span class="cx">     ASSERT(positionNode);
</span><del>-    auto parent = makeRefPtr(positionNode->parentNode());
</del><ins>+    RefPtr parent { positionNode->parentNode() };
</ins><span class="cx">     if (!parent || parent->appendChild(styleElement.get()).hasException())
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingFrameSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/FrameSelection.cpp  2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp     2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -428,7 +428,7 @@
</span><span class="cx"> {
</span><span class="cx">     LOG_WITH_STREAM(Selection, stream << "FrameSelection::setSelection " << selection);
</span><span class="cx"> 
</span><del>-    auto protectedDocument = makeRefPtr(m_document.get());
</del><ins>+    RefPtr protectedDocument { m_document.get() };
</ins><span class="cx">     if (!setSelectionWithoutUpdatingAppearance(selection, options, align, granularity))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -1936,13 +1936,13 @@
</span><span class="cx"> void FrameSelection::selectFrameElementInParentIfFullySelected()
</span><span class="cx"> {
</span><span class="cx">     // Find the parent frame; if there is none, then we have nothing to do.
</span><del>-    auto document = makeRefPtr(m_document.get());
</del><ins>+    RefPtr document { m_document.get() };
</ins><span class="cx">     if (!document)
</span><span class="cx">         return;
</span><del>-    auto frame = makeRefPtr(document->frame());
</del><ins>+    RefPtr frame { document->frame() };
</ins><span class="cx">     if (!frame)
</span><span class="cx">         return;
</span><del>-    auto parent = makeRefPtr(frame->tree().parent());
</del><ins>+    RefPtr parent { frame->tree().parent() };
</ins><span class="cx">     if (!parent)
</span><span class="cx">         return;
</span><span class="cx">     Page* page = m_document->page();
</span><span class="lines">@@ -1958,10 +1958,10 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Get to the <iframe> or <frame> (or even <object>) element in the parent frame.
</span><del>-    auto ownerElement = makeRefPtr(m_document->ownerElement());
</del><ins>+    RefPtr ownerElement { m_document->ownerElement() };
</ins><span class="cx">     if (!ownerElement)
</span><span class="cx">         return;
</span><del>-    auto ownerElementParent = makeRefPtr(ownerElement->parentNode());
</del><ins>+    RefPtr ownerElementParent { ownerElement->parentNode() };
</ins><span class="cx">     if (!ownerElementParent)
</span><span class="cx">         return;
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingInsertListCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/InsertListCommand.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/InsertListCommand.cpp       2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/InsertListCommand.cpp  2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> 
</span><span class="cx"> HTMLElement* InsertListCommand::fixOrphanedListChild(Node& node)
</span><span class="cx"> {
</span><del>-    auto parentNode = makeRefPtr(node.parentNode());
</del><ins>+    RefPtr parentNode { node.parentNode() };
</ins><span class="cx">     if (parentNode && !parentNode->hasRichlyEditableStyle())
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -329,7 +329,7 @@
</span><span class="cx">         // in listNode that comes before listChildNode, as listChildNode could have ancestors
</span><span class="cx">         // between it and listNode. So, we split up to listNode before inserting the placeholder
</span><span class="cx">         // where we're about to move listChildNode to.
</span><del>-        if (auto listChildNodeParentNode = makeRefPtr(listChildNode->parentNode()); listChildNodeParentNode && listChildNodeParentNode != listNode)
</del><ins>+        if (RefPtr listChildNodeParentNode { listChildNode->parentNode() }; listChildNodeParentNode && listChildNodeParentNode != listNode)
</ins><span class="cx">             splitElement(*listNode, *splitTreeToNode(*listChildNode, *listNode).get());
</span><span class="cx">         insertNodeBefore(nodeToInsert.releaseNonNull(), *listNode);
</span><span class="cx">     } else
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingInsertNestedListCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/InsertNestedListCommand.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/InsertNestedListCommand.cpp 2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/InsertNestedListCommand.cpp    2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">     if (endingSelection().isNoneOrOrphaned() || !endingSelection().isContentRichlyEditable())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (auto enclosingItem = makeRefPtr(enclosingElementWithTag(endingSelection().visibleStart().deepEquivalent(), HTMLNames::liTag))) {
</del><ins>+    if (RefPtr enclosingItem = enclosingElementWithTag(endingSelection().visibleStart().deepEquivalent(), HTMLNames::liTag)) {
</ins><span class="cx">         auto newListItem = HTMLLIElement::create(document());
</span><span class="cx">         insertNodeAfter(newListItem.copyRef(), *enclosingItem);
</span><span class="cx">         setEndingSelection({ Position { newListItem.ptr(), Position::PositionIsBeforeChildren }, Affinity::Downstream });
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingRemoveNodePreservingChildrenCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/RemoveNodePreservingChildrenCommand.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/RemoveNodePreservingChildrenCommand.cpp     2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/RemoveNodePreservingChildrenCommand.cpp        2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> void RemoveNodePreservingChildrenCommand::doApply()
</span><span class="cx"> {
</span><span class="cx">     Vector<Ref<Node>> children;
</span><del>-    auto parent = makeRefPtr(m_node->parentNode());
</del><ins>+    RefPtr parent { m_node->parentNode() };
</ins><span class="cx">     if (!parent || (m_shouldAssumeContentIsAlwaysEditable == DoNotAssumeContentIsAlwaysEditable && !isEditableNode(*parent)))
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingReplaceSelectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp 2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp    2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx">     // same.  E.g.,
</span><span class="cx">     //   <div>foo^</div>^
</span><span class="cx">     // The two positions above are the same visual position, but we want to stay in the same block.
</span><del>-    auto enclosingBlockNode = makeRefPtr(enclosingBlock(position.containerNode()));
</del><ins>+    RefPtr enclosingBlockNode { enclosingBlock(position.containerNode()) };
</ins><span class="cx">     for (Position nextPosition = position; nextPosition.containerNode() != enclosingBlockNode; position = nextPosition) {
</span><span class="cx">         if (lineBreakExistsAtPosition(position))
</span><span class="cx">             break;
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx">     if (!editableRoot)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    auto shadowHost = makeRefPtr(editableRoot->shadowHost());
</del><ins>+    RefPtr shadowHost { editableRoot->shadowHost() };
</ins><span class="cx">     if (!editableRoot->attributeEventListener(eventNames().webkitBeforeTextInsertedEvent, mainThreadNormalWorld())
</span><span class="cx">         && !(shadowHost && shadowHost->renderer() && shadowHost->renderer()->isTextControl())
</span><span class="cx">         && editableRoot->hasRichlyEditableStyle()) {
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto page = createPageForSanitizingWebContent();
</span><del>-    auto stagingDocument = makeRefPtr(page->mainFrame().document());
</del><ins>+    RefPtr stagingDocument { page->mainFrame().document() };
</ins><span class="cx">     ASSERT(stagingDocument->body());
</span><span class="cx"> 
</span><span class="cx">     ComputedStyleExtractor computedStyleOfEditableRoot(editableRoot.get());
</span><span class="lines">@@ -323,7 +323,7 @@
</span><span class="cx"> {
</span><span class="cx">     Vector<Ref<Node>> unrendered;
</span><span class="cx"> 
</span><del>-    for (auto node = makeRefPtr(holder->firstChild()); node; node = NodeTraversal::next(*node, holder)) {
</del><ins>+    for (RefPtr node = holder->firstChild(); node; node = NodeTraversal::next(*node, holder)) {
</ins><span class="cx">         if (!isNodeRendered(*node) && !isTableStructureNode(node.get()))
</span><span class="cx">             unrendered.append(*node);
</span><span class="cx">     }
</span><span class="lines">@@ -339,7 +339,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Interchange newlines at the "start" of the incoming fragment must be
</span><span class="cx">     // either the first node in the fragment or the first leaf in the fragment.
</span><del>-    auto node = makeRefPtr(container->firstChild());
</del><ins>+    RefPtr node { container->firstChild() };
</ins><span class="cx">     while (node) {
</span><span class="cx">         if (isInterchangeNewlineNode(node.get())) {
</span><span class="cx">             m_hasInterchangeNewlineAtStart = true;
</span><span class="lines">@@ -534,10 +534,10 @@
</span><span class="cx">     if (source.isNull() || destination.isNull())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto sourceNode = makeRefPtr(source.deepEquivalent().deprecatedNode());
-    auto destinationNode = makeRefPtr(destination.deepEquivalent().deprecatedNode());
-    auto sourceBlock = makeRefPtr(enclosingBlock(sourceNode.get()));
-    auto destinationBlock = makeRefPtr(enclosingBlock(destinationNode.get()));
</del><ins>+    RefPtr sourceNode { source.deepEquivalent().deprecatedNode() };
+    RefPtr destinationNode { destination.deepEquivalent().deprecatedNode() };
+    RefPtr sourceBlock { enclosingBlock(sourceNode.get()) };
+    RefPtr destinationBlock { enclosingBlock(destinationNode.get()) };
</ins><span class="cx">     return !enclosingNodeOfType(source.deepEquivalent(), &isMailPasteAsQuotationNode)
</span><span class="cx">         && sourceBlock
</span><span class="cx">         && (!sourceBlock->hasTagName(blockquoteTag) || isMailBlockquote(sourceBlock.get()))
</span><span class="lines">@@ -641,7 +641,7 @@
</span><span class="cx"> 
</span><span class="cx">         StyledElement* element = downcast<StyledElement>(node.get());
</span><span class="cx"> 
</span><del>-        auto inlineStyle = makeRefPtr(element->inlineStyle());
</del><ins>+        RefPtr inlineStyle { element->inlineStyle() };
</ins><span class="cx">         auto newInlineStyle = EditingStyle::create(inlineStyle.get());
</span><span class="cx">         if (inlineStyle) {
</span><span class="cx">             if (is<HTMLElement>(*element)) {
</span><span class="lines">@@ -660,7 +660,7 @@
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            auto context = makeRefPtr(element->parentNode());
</del><ins>+            RefPtr context { element->parentNode() };
</ins><span class="cx"> 
</span><span class="cx">             // If Mail wraps the fragment with a Paste as Quotation blockquote, or if you're pasting into a quoted region,
</span><span class="cx">             // styles from blockquoteNode are allowed to override those from the source document, see <rdar://problem/4930986> and <rdar://problem/5089327>.
</span><span class="lines">@@ -796,8 +796,8 @@
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         if (isProhibitedParagraphChild(downcast<HTMLElement>(*node).localName())) {
</span><del>-            if (auto paragraphElement = makeRefPtr(enclosingElementWithTag(positionInParentBeforeNode(node.get()), pTag))) {
-                auto parent = makeRefPtr(paragraphElement->parentNode());
</del><ins>+            if (RefPtr paragraphElement = enclosingElementWithTag(positionInParentBeforeNode(node.get()), pTag)) {
+                RefPtr parent { paragraphElement->parentNode() };
</ins><span class="cx">                 if (parent && parent->hasEditableStyle())
</span><span class="cx">                     moveNodeOutOfAncestor(*node, *paragraphElement, insertedNodes);
</span><span class="cx">             }
</span><span class="lines">@@ -804,11 +804,11 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (isHeaderElement(node.get())) {
</span><del>-            if (auto headerElement = makeRefPtr(highestEnclosingNodeOfType(positionInParentBeforeNode(node.get()), isHeaderElement))) {
</del><ins>+            if (RefPtr headerElement = highestEnclosingNodeOfType(positionInParentBeforeNode(node.get()), isHeaderElement)) {
</ins><span class="cx">                 if (headerElement->parentNode() && headerElement->parentNode()->isContentRichlyEditable())
</span><span class="cx">                     moveNodeOutOfAncestor(*node, *headerElement, insertedNodes);
</span><span class="cx">                 else {
</span><del>-                    auto newSpanElement = makeRefPtr(replaceElementWithSpanPreservingChildrenAndAttributes(downcast<HTMLElement>(*node)));
</del><ins>+                    RefPtr newSpanElement { replaceElementWithSpanPreservingChildrenAndAttributes(downcast<HTMLElement>(*node)) };
</ins><span class="cx">                     insertedNodes.didReplaceNode(node.get(), newSpanElement.get());
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="lines">@@ -844,7 +844,7 @@
</span><span class="cx">     document().updateLayoutIgnorePendingStylesheets();
</span><span class="cx"> 
</span><span class="cx">     bool safeToRemoveAncestor = true;
</span><del>-    for (auto child = makeRefPtr(ancestor.firstChild()); child; child = child->nextSibling()) {
</del><ins>+    for (RefPtr child = ancestor.firstChild(); child; child = child->nextSibling()) {
</ins><span class="cx">         if (is<Text>(child) && hasRenderedText(downcast<Text>(*child))) {
</span><span class="cx">             safeToRemoveAncestor = false;
</span><span class="cx">             break;
</span><span class="lines">@@ -866,7 +866,7 @@
</span><span class="cx"> {
</span><span class="cx">     document().updateLayoutIgnorePendingStylesheets();
</span><span class="cx"> 
</span><del>-    auto lastLeafInserted = makeRefPtr(insertedNodes.lastLeafInserted());
</del><ins>+    RefPtr lastLeafInserted { insertedNodes.lastLeafInserted() };
</ins><span class="cx">     if (is<Text>(lastLeafInserted) && !hasRenderedText(downcast<Text>(*lastLeafInserted))
</span><span class="cx">         && !enclosingElementWithTag(firstPositionInOrBeforeNode(lastLeafInserted.get()), selectTag)
</span><span class="cx">         && !enclosingElementWithTag(firstPositionInOrBeforeNode(lastLeafInserted.get()), scriptTag)) {
</span><span class="lines">@@ -878,7 +878,7 @@
</span><span class="cx"> 
</span><span class="cx">     // We don't have to make sure that firstNodeInserted isn't inside a select or script element
</span><span class="cx">     // because it is a top level node in the fragment and the user can't insert into those elements.
</span><del>-    auto firstNodeInserted = makeRefPtr(insertedNodes.firstNodeInserted());
</del><ins>+    RefPtr firstNodeInserted { insertedNodes.firstNodeInserted() };
</ins><span class="cx">     if (is<Text>(firstNodeInserted) && !hasRenderedText(downcast<Text>(*firstNodeInserted))) {
</span><span class="cx">         insertedNodes.willRemoveNode(firstNodeInserted.get());
</span><span class="cx">         removeNode(*firstNodeInserted);
</span><span class="lines">@@ -888,7 +888,7 @@
</span><span class="cx"> VisiblePosition ReplaceSelectionCommand::positionAtEndOfInsertedContent() const
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Why is this hack here?  What's special about <select> tags?
</span><del>-    auto enclosingSelect = makeRefPtr(enclosingElementWithTag(m_endOfInsertedContent, selectTag));
</del><ins>+    RefPtr enclosingSelect { enclosingElementWithTag(m_endOfInsertedContent, selectTag) };
</ins><span class="cx">     return enclosingSelect ? lastPositionInOrAfterNode(enclosingSelect.get()) : m_endOfInsertedContent;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -901,7 +901,7 @@
</span><span class="cx"> // avoid doing a layout.
</span><span class="cx"> static bool handleStyleSpansBeforeInsertion(ReplacementFragment& fragment, const Position& insertionPos)
</span><span class="cx"> {
</span><del>-    auto topNode = makeRefPtr(fragment.firstChild());
</del><ins>+    RefPtr topNode { fragment.firstChild() };
</ins><span class="cx"> 
</span><span class="cx">     // Handling the case where we are doing Paste as Quotation or pasting into quoted content is more complicated (see handleStyleSpans)
</span><span class="cx">     // and doesn't receive the optimization.
</span><span class="lines">@@ -940,7 +940,7 @@
</span><span class="cx">     // The style span that contains the source document's default style should be at
</span><span class="cx">     // the top of the fragment, but Mail sometimes adds a wrapper (for Paste As Quotation),
</span><span class="cx">     // so search for the top level style span instead of assuming it's at the top.
</span><del>-    for (auto node = makeRefPtr(insertedNodes.firstNodeInserted()); node; node = NodeTraversal::next(*node)) {
</del><ins>+    for (RefPtr node = insertedNodes.firstNodeInserted(); node; node = NodeTraversal::next(*node)) {
</ins><span class="cx">         if (isLegacyAppleStyleSpan(node.get())) {
</span><span class="cx">             wrappingStyleSpan = static_pointer_cast<HTMLElement>(WTFMove(node));
</span><span class="cx">             break;
</span><span class="lines">@@ -953,7 +953,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     auto style = EditingStyle::create(wrappingStyleSpan->inlineStyle());
</span><del>-    auto context = makeRefPtr(wrappingStyleSpan->parentNode());
</del><ins>+    RefPtr context { wrappingStyleSpan->parentNode() };
</ins><span class="cx"> 
</span><span class="cx">     // If Mail wraps the fragment with a Paste as Quotation blockquote, or if you're pasting into a quoted region,
</span><span class="cx">     // styles from blockquoteNode are allowed to override those from the source document, see <rdar://problem/4930986> and <rdar://problem/5089327>.
</span><span class="lines">@@ -1033,12 +1033,12 @@
</span><span class="cx"> 
</span><span class="cx"> static RefPtr<Node> enclosingInline(Node* node)
</span><span class="cx"> {
</span><del>-    auto currentNode = makeRefPtr(node);
-    while (auto parent = makeRefPtr(currentNode->parentNode())) {
</del><ins>+    RefPtr currentNode { node };
+    while (RefPtr parent = currentNode->parentNode()) {
</ins><span class="cx">         if (isBlockFlowElement(*parent) || parent->hasTagName(bodyTag))
</span><span class="cx">             return currentNode;
</span><span class="cx">         // Stop if any previous sibling is a block.
</span><del>-        for (auto sibling = makeRefPtr(currentNode->previousSibling()); sibling; sibling = sibling->previousSibling()) {
</del><ins>+        for (RefPtr sibling = currentNode->previousSibling(); sibling; sibling = sibling->previousSibling()) {
</ins><span class="cx">             if (isBlockFlowElement(*sibling))
</span><span class="cx">                 return currentNode;
</span><span class="cx">         }
</span><span class="lines">@@ -1127,12 +1127,12 @@
</span><span class="cx">     bool selectionEndWasEndOfParagraph = isEndOfParagraph(visibleEnd);
</span><span class="cx">     bool selectionStartWasStartOfParagraph = isStartOfParagraph(visibleStart);
</span><span class="cx"> 
</span><del>-    auto startBlock = makeRefPtr(enclosingBlock(visibleStart.deepEquivalent().deprecatedNode()));
</del><ins>+    RefPtr startBlock { enclosingBlock(visibleStart.deepEquivalent().deprecatedNode()) };
</ins><span class="cx"> 
</span><span class="cx">     Position insertionPos = selection.start();
</span><span class="cx">     bool shouldHandleMailBlockquote = enclosingNodeOfType(insertionPos, isMailBlockquote, CanCrossEditingBoundary) && !m_ignoreMailBlockquote;
</span><span class="cx">     bool selectionIsPlainText = !selection.isContentRichlyEditable();
</span><del>-    auto currentRoot = makeRefPtr(selection.rootEditableElement());
</del><ins>+    RefPtr currentRoot { selection.rootEditableElement() };
</ins><span class="cx"> 
</span><span class="cx">     if ((selectionStartWasStartOfParagraph && selectionEndWasEndOfParagraph && !shouldHandleMailBlockquote)
</span><span class="cx">         || startBlock == currentRoot || isListItem(startBlock.get()) || selectionIsPlainText)
</span><span class="lines">@@ -1188,7 +1188,7 @@
</span><span class="cx">     if (shouldHandleMailBlockquote && m_preventNesting && !(enclosingNodeOfType(insertionPos, &isTableStructureNode))) {
</span><span class="cx">         applyCommandToComposite(BreakBlockquoteCommand::create(document())); 
</span><span class="cx">         // This will leave a br between the split.
</span><del>-        if (auto br = makeRefPtr(endingSelection().start().deprecatedNode())) {
</del><ins>+        if (RefPtr br = endingSelection().start().deprecatedNode()) {
</ins><span class="cx">             ASSERT(br->hasTagName(brTag));
</span><span class="cx">             insertionPos = positionInParentBeforeNode(br.get());
</span><span class="cx">             removeNode(*br);
</span><span class="lines">@@ -1253,7 +1253,7 @@
</span><span class="cx">     // our style spans and for positions inside list items
</span><span class="cx">     // since insertAsListItems already does the right thing.
</span><span class="cx">     if (!m_matchStyle && !enclosingList(insertionPos.containerNode())) {
</span><del>-        if (auto containerNode = makeRefPtr(insertionPos.containerNode())) {
</del><ins>+        if (RefPtr containerNode = insertionPos.containerNode()) {
</ins><span class="cx">             if (containerNode->isTextNode() && insertionPos.offsetInContainerNode() && !insertionPos.atLastEditingPositionForNode()) {
</span><span class="cx">                 splitTextNode(*insertionPos.containerText(), insertionPos.offsetInContainerNode());
</span><span class="cx">                 insertionPos = firstPositionInNode(insertionPos.containerNode());
</span><span class="lines">@@ -1262,7 +1262,7 @@
</span><span class="cx"> 
</span><span class="cx">         if (RefPtr<Node> nodeToSplitTo = nodeToSplitToAvoidPastingIntoInlineNodesWithStyle(insertionPos)) {
</span><span class="cx">             if (nodeToSplitTo->parentNode() && insertionPos.containerNode() != nodeToSplitTo->parentNode()) {
</span><del>-                auto splitStart = makeRefPtr(insertionPos.computeNodeAfterPosition());
</del><ins>+                RefPtr splitStart { insertionPos.computeNodeAfterPosition() };
</ins><span class="cx">                 if (!splitStart)
</span><span class="cx">                     splitStart = insertionPos.containerNode();
</span><span class="cx">                 ASSERT(splitStart);
</span><span class="lines">@@ -1292,7 +1292,7 @@
</span><span class="cx">     if (refNode)
</span><span class="cx">         fragment.removeNode(*refNode);
</span><span class="cx"> 
</span><del>-    auto blockStart = makeRefPtr(enclosingBlock(insertionPos.deprecatedNode()));
</del><ins>+    RefPtr blockStart { enclosingBlock(insertionPos.deprecatedNode()) };
</ins><span class="cx">     bool isInsertingIntoList = (isListHTMLElement(refNode.get()) || (isLegacyAppleStyleSpan(refNode.get()) && isListHTMLElement(refNode->firstChild())))
</span><span class="cx">     && blockStart && blockStart->renderer()->isListItem();
</span><span class="cx">     if (isInsertingIntoList)
</span><span class="lines">@@ -1345,11 +1345,11 @@
</span><span class="cx">         insertNodeAt(HTMLBRElement::create(document()), startOfInsertedContent.deepEquivalent());
</span><span class="cx"> 
</span><span class="cx">     if (endBR && (plainTextFragment || shouldRemoveEndBR(endBR.get(), originalVisPosBeforeEndBR))) {
</span><del>-        auto parent = makeRefPtr(endBR->parentNode());
</del><ins>+        RefPtr parent { endBR->parentNode() };
</ins><span class="cx">         insertedNodes.willRemoveNode(endBR.get());
</span><span class="cx">         removeNode(*endBR);
</span><span class="cx">         document().updateLayoutIgnorePendingStylesheets();
</span><del>-        if (auto nodeToRemove = makeRefPtr(highestNodeToRemoveInPruning(parent.get()))) {
</del><ins>+        if (RefPtr nodeToRemove = highestNodeToRemoveInPruning(parent.get())) {
</ins><span class="cx">             insertedNodes.willRemovePossibleAncestorNode(nodeToRemove.get());
</span><span class="cx">             removeNode(*nodeToRemove);
</span><span class="cx">         }
</span><span class="lines">@@ -1423,7 +1423,7 @@
</span><span class="cx">         if (selectionEndWasEndOfParagraph || !isEndOfParagraph(endOfInsertedContent) || next.isNull()) {
</span><span class="cx">             if (!isStartOfParagraph(endOfInsertedContent)) {
</span><span class="cx">                 setEndingSelection(endOfInsertedContent);
</span><del>-                auto enclosingNode = makeRefPtr(enclosingBlock(endOfInsertedContent.deepEquivalent().deprecatedNode()));
</del><ins>+                RefPtr enclosingNode = enclosingBlock(endOfInsertedContent.deepEquivalent().deprecatedNode());
</ins><span class="cx">                 if (isListItem(enclosingNode.get())) {
</span><span class="cx">                     auto newListItem = HTMLLIElement::create(document());
</span><span class="cx">                     insertNodeAfter(newListItem.copyRef(), *enclosingNode);
</span><span class="lines">@@ -1447,7 +1447,7 @@
</span><span class="cx">     } else
</span><span class="cx">         mergeEndIfNeeded();
</span><span class="cx"> 
</span><del>-    if (auto mailBlockquote = makeRefPtr(enclosingNodeOfType(positionAtStartOfInsertedContent().deepEquivalent(), isMailPasteAsQuotationNode)))
</del><ins>+    if (RefPtr mailBlockquote = enclosingNodeOfType(positionAtStartOfInsertedContent().deepEquivalent(), isMailPasteAsQuotationNode))
</ins><span class="cx">         removeNodeAttribute(downcast<Element>(*mailBlockquote), classAttr);
</span><span class="cx"> 
</span><span class="cx">     if (shouldPerformSmartReplace())
</span><span class="lines">@@ -1505,7 +1505,7 @@
</span><span class="cx">     if (!m_smartReplace)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto textControl = makeRefPtr(enclosingTextFormControl(positionAtStartOfInsertedContent().deepEquivalent()));
</del><ins>+    RefPtr textControl = enclosingTextFormControl(positionAtStartOfInsertedContent().deepEquivalent());
</ins><span class="cx">     if (is<HTMLInputElement>(textControl) && downcast<HTMLInputElement>(*textControl).isPasswordField())
</span><span class="cx">         return false; // Disable smart replace for password fields.
</span><span class="cx"> 
</span><span class="lines">@@ -1574,7 +1574,7 @@
</span><span class="cx">     VisiblePosition endOfInsertedContent = positionAtEndOfInsertedContent();
</span><span class="cx"> 
</span><span class="cx">     Position endUpstream = endOfInsertedContent.deepEquivalent().upstream();
</span><del>-    auto endNode = makeRefPtr(endUpstream.computeNodeBeforePosition());
</del><ins>+    RefPtr endNode { endUpstream.computeNodeBeforePosition() };
</ins><span class="cx">     int endOffset = is<Text>(endNode) ? downcast<Text>(*endNode).length() : 0;
</span><span class="cx">     if (endUpstream.anchorType() == Position::PositionIsOffsetInAnchor) {
</span><span class="cx">         endNode = endUpstream.containerNode();
</span><span class="lines">@@ -1598,7 +1598,7 @@
</span><span class="cx">     document().updateLayout();
</span><span class="cx"> 
</span><span class="cx">     Position startDownstream = startOfInsertedContent.deepEquivalent().downstream();
</span><del>-    auto startNode = makeRefPtr(startDownstream.computeNodeAfterPosition());
</del><ins>+    RefPtr startNode { startDownstream.computeNodeAfterPosition() };
</ins><span class="cx">     unsigned startOffset = 0;
</span><span class="cx">     if (startDownstream.anchorType() == Position::PositionIsOffsetInAnchor) {
</span><span class="cx">         startNode = startDownstream.containerNode();
</span><span class="lines">@@ -1721,16 +1721,16 @@
</span><span class="cx">     if (!element.hasOneChild())
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    auto child = makeRefPtr(element.firstChild());
</del><ins>+    RefPtr child { element.firstChild() };
</ins><span class="cx">     return isListHTMLElement(child.get()) ? &downcast<HTMLElement>(*child) : nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static HTMLElement& deepestSingleChildList(HTMLElement& topLevelList)
</span><span class="cx"> {
</span><del>-    auto list = makeRefPtr(topLevelList);
-    while (auto childList = singleChildList(*list))
-        list = childList;
-    return *list;
</del><ins>+    Ref list { topLevelList };
+    while (auto childList = singleChildList(list))
+        list = *childList;
+    return list;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // If the user is inserting a list into an existing list, instead of nesting the list,
</span><span class="lines">@@ -1742,7 +1742,7 @@
</span><span class="cx">     bool isStart = isStartOfParagraph(insertPos);
</span><span class="cx">     bool isEnd = isEndOfParagraph(insertPos);
</span><span class="cx">     bool isMiddle = !isStart && !isEnd;
</span><del>-    auto lastNode = makeRefPtr(insertionBlock);
</del><ins>+    RefPtr lastNode { insertionBlock };
</ins><span class="cx"> 
</span><span class="cx">     // If we're in the middle of a list item, we should split it into two separate
</span><span class="cx">     // list items and insert these nodes between them.
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingTextIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/TextIterator.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/TextIterator.cpp    2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/TextIterator.cpp       2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -732,7 +732,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (m_behaviors.contains(TextIteratorBehavior::EntersImageOverlays) && is<HTMLElement>(m_node) && downcast<HTMLElement>(*m_node).hasImageOverlay()) {
</span><del>-        if (auto shadowRoot = makeRefPtr(m_node->shadowRoot())) {
</del><ins>+        if (RefPtr shadowRoot = m_node->shadowRoot()) {
</ins><span class="cx">             m_node = shadowRoot.get();
</span><span class="cx">             pushFullyClippedState(m_fullyClippedStack, *m_node);
</span><span class="cx">             m_offset = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingTextManipulationControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/TextManipulationController.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/TextManipulationController.cpp      2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/TextManipulationController.cpp 2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx"> 
</span><span class="cx"> void TextManipulationController::startObservingParagraphs(ManipulationItemCallback&& callback, Vector<ExclusionRule>&& exclusionRules)
</span><span class="cx"> {
</span><del>-    auto document = makeRefPtr(m_document.get());
</del><ins>+    RefPtr document { m_document.get() };
</ins><span class="cx">     if (!document)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -295,11 +295,11 @@
</span><span class="cx"> 
</span><span class="cx">     TextManipulationController::ManipulationTokenInfo result;
</span><span class="cx">     result.documentURL = node->document().url();
</span><del>-    if (auto element = is<Element>(node) ? makeRefPtr(downcast<Element>(*node)) : makeRefPtr(node->parentElement())) {
</del><ins>+    if (RefPtr element = is<Element>(node) ? downcast<Element>(node) : node->parentElement()) {
</ins><span class="cx">         result.tagName = element->tagName();
</span><span class="cx">         if (element->hasAttributeWithoutSynchronization(HTMLNames::roleAttr))
</span><span class="cx">             result.roleAttribute = element->attributeWithoutSynchronization(HTMLNames::roleAttr);
</span><del>-        if (auto frame = makeRefPtr(node->document().frame()); frame && frame->view() && element->renderer()) {
</del><ins>+        if (RefPtr frame = node->document().frame(); frame && frame->view() && element->renderer()) {
</ins><span class="cx">             // FIXME: This doesn't account for overflow clip.
</span><span class="cx">             auto elementRect = element->renderer()->absoluteAnchorRect();
</span><span class="cx">             auto visibleContentRect = frame->view()->visibleContentRect();
</span><span class="lines">@@ -327,7 +327,7 @@
</span><span class="cx">         if (displayType == DisplayType::Block || displayType == DisplayType::InlineBlock)
</span><span class="cx">             return true;
</span><span class="cx"> 
</span><del>-        for (auto parent = makeRefPtr(element.parentElement()); parent; parent = parent->parentElement()) {
</del><ins>+        for (RefPtr parent = element.parentElement(); parent; parent = parent->parentElement()) {
</ins><span class="cx">             if (parent->hasTagName(HTMLNames::navTag) || role(*parent) == AccessibilityRole::LandmarkNavigation)
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx">     if (start.isNull() || end.isNull() || start.isOrphan() || end.isOrphan())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    auto document = makeRefPtr(start.document());
</del><ins>+    RefPtr document { start.document() };
</ins><span class="cx">     ASSERT(document);
</span><span class="cx">     // TextIterator's constructor may have updated the layout and executed arbitrary scripts.
</span><span class="cx">     if (document != start.document() || document != end.document())
</span><span class="lines">@@ -606,7 +606,7 @@
</span><span class="cx">             if (!node->isConnected())
</span><span class="cx">                 continue;
</span><span class="cx"> 
</span><del>-            if (auto host = makeRefPtr(node->shadowHost()); is<HTMLInputElement>(host.get()) && downcast<HTMLInputElement>(*host).lastChangeWasUserEdit())
</del><ins>+            if (RefPtr host = node->shadowHost(); is<HTMLInputElement>(host.get()) && downcast<HTMLInputElement>(*host).lastChangeWasUserEdit())
</ins><span class="cx">                 continue;
</span><span class="cx"> 
</span><span class="cx">             if (!commonAncestor)
</span><span class="lines">@@ -761,7 +761,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (item.start.isNull() || item.end.isNull()) {
</span><span class="cx">         RELEASE_ASSERT(item.tokens.size() == 1);
</span><del>-        auto element = makeRefPtr(item.element.get());
</del><ins>+        RefPtr element = { item.element.get() };
</ins><span class="cx">         if (!element)
</span><span class="cx">             return ManipulationFailureType::ContentChanged;
</span><span class="cx">         if (replacementTokens.size() > 1 && !canPerformTextManipulationByReplacingEntireTextContent(*element) && item.attributeName == nullQName())
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingVisibleSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/VisibleSelection.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/VisibleSelection.cpp        2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/VisibleSelection.cpp   2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr<Document> VisibleSelection::document() const
</span><span class="cx"> {
</span><del>-    auto baseDocument = makeRefPtr(m_base.document());
</del><ins>+    RefPtr baseDocument { m_base.document() };
</ins><span class="cx">     if (!baseDocument)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaDataDetectionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm      2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -692,7 +692,7 @@
</span><span class="cx"> Ref<HTMLDivElement> DataDetection::createElementForImageOverlay(Document& document, const TextRecognitionDataDetector& info)
</span><span class="cx"> {
</span><span class="cx">     auto container = HTMLDivElement::create(document);
</span><del>-    if (auto frame = makeRefPtr(document.frame())) {
</del><ins>+    if (RefPtr frame = document.frame()) {
</ins><span class="cx">         auto resultIdentifier = frame->dataDetectionResults().addImageOverlayDataDetectionResult(info.result.get());
</span><span class="cx">         container->setAttributeWithoutSynchronization(x_apple_data_detectors_resultAttr, String::number(resultIdentifier.toUInt64()));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaWebContentReaderCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm      2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm 2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx"> 
</span><span class="cx">     for (auto& info : attachmentInsertionInfo) {
</span><span class="cx">         auto originalElement = WTFMove(info.originalElement);
</span><del>-        auto parent = makeRefPtr(originalElement->parentNode());
</del><ins>+        RefPtr parent { originalElement->parentNode() };
</ins><span class="cx">         if (!parent)
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="lines">@@ -840,7 +840,7 @@
</span><span class="cx">     if (!shouldReplaceRichContentWithAttachments())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto document = makeRefPtr(frame.document());
</del><ins>+    RefPtr document { frame.document() };
</ins><span class="cx">     if (!document)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingmarkupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/markup.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/markup.cpp  2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/editing/markup.cpp     2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -892,7 +892,7 @@
</span><span class="cx">     VisiblePosition visibleStart { start };
</span><span class="cx">     VisiblePosition visibleEnd { end };
</span><span class="cx"> 
</span><del>-    auto body = makeRefPtr(enclosingElementWithTag(firstPositionInNode(commonAncestor), bodyTag));
</del><ins>+    RefPtr body = enclosingElementWithTag(firstPositionInNode(commonAncestor), bodyTag);
</ins><span class="cx">     RefPtr<Element> fullySelectedRoot;
</span><span class="cx">     // FIXME: Do this for all fully selected blocks, not just the body.
</span><span class="cx">     if (body && VisiblePosition(firstPositionInNode(body.get())) == visibleStart && VisiblePosition(lastPositionInNode(body.get())) == visibleEnd)
</span><span class="lines">@@ -1003,7 +1003,7 @@
</span><span class="cx">     MSOListMode msoListMode = msoListQuirks == MSOListQuirks::CheckIfNeeded && shouldPreserveMSOLists(originalMarkup)
</span><span class="cx">         ? MSOListMode::Preserve : MSOListMode::DoNotPreserve;
</span><span class="cx"> 
</span><del>-    auto bodyElement = makeRefPtr(document.body());
</del><ins>+    RefPtr bodyElement { document.body() };
</ins><span class="cx">     ASSERT(bodyElement);
</span><span class="cx">     bodyElement->appendChild(fragment.get());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageVisualViewportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/VisualViewport.cpp (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/VisualViewport.cpp     2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/page/VisualViewport.cpp        2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">     double height = 0;
</span><span class="cx">     double scale = 1;
</span><span class="cx"> 
</span><del>-    auto frame = makeRefPtr(this->frame());
</del><ins>+    RefPtr frame = this->frame();
</ins><span class="cx">     if (frame) {
</span><span class="cx">         if (auto* view = frame->view()) {
</span><span class="cx">             auto visualViewportRect = view->visualViewportRect();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformaudiococoaAudioSampleDataSourcemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.mm (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.mm       2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.mm  2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> 
</span><span class="cx">     OSStatus err = PAL::AudioConverterNew(&m_inputDescription->streamDescription(), &m_outputDescription->streamDescription(), &m_converter);
</span><span class="cx">     if (err) {
</span><del>-        RunLoop::main().dispatch([this, protectedThis = makeRefPtr(*this), err] {
</del><ins>+        RunLoop::main().dispatch([this, protectedThis = Ref { *this }, err] {
</ins><span class="cx">             ERROR_LOG("AudioConverterNew returned error ", err);
</span><span class="cx">         });
</span><span class="cx">     }
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx">     if (m_isInNeedOfMoreData) {
</span><span class="cx">         m_isInNeedOfMoreData = false;
</span><span class="cx">         DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions;
</span><del>-        RunLoop::main().dispatch([logIdentifier = LOGIDENTIFIER, sampleCount, this, protectedThis = makeRefPtr(*this)] {
</del><ins>+        RunLoop::main().dispatch([logIdentifier = LOGIDENTIFIER, sampleCount, this, protectedThis = Ref { *this }] {
</ins><span class="cx">             ALWAYS_LOG(logIdentifier, "needed more data, pushing ", sampleCount, " samples");
</span><span class="cx">         });
</span><span class="cx">     }
</span><span class="lines">@@ -265,7 +265,7 @@
</span><span class="cx">         if (!m_isInNeedOfMoreData) {
</span><span class="cx">             m_isInNeedOfMoreData = true;
</span><span class="cx">             DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions;
</span><del>-            RunLoop::main().dispatch([logIdentifier = LOGIDENTIFIER, timeStamp, startFrame, endFrame, sampleCount, outputSampleOffset = m_outputSampleOffset, this, protectedThis = makeRefPtr(*this)] {
</del><ins>+            RunLoop::main().dispatch([logIdentifier = LOGIDENTIFIER, timeStamp, startFrame, endFrame, sampleCount, outputSampleOffset = m_outputSampleOffset, this, protectedThis = Ref { *this }] {
</ins><span class="cx">                 ERROR_LOG(logIdentifier, "need more data, sample ", timeStamp, " with offset ", outputSampleOffset, ", trying to get ", sampleCount, " samples, but not completely in range [", startFrame, " .. ", endFrame, "]");
</span><span class="cx">             });
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaWebCoreDecompressionSessionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm      2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm 2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -168,7 +168,7 @@
</span><span class="cx"> 
</span><span class="cx">     LOG(Media, "WebCoreDecompressionSession::enqueueSample(%p) - framesBeingDecoded(%d)", this, m_framesBeingDecoded);
</span><span class="cx"> 
</span><del>-    m_decompressionQueue->dispatch([protectedThis = makeRefPtr(*this), strongBuffer = retainPtr(sampleBuffer), displaying] {
</del><ins>+    m_decompressionQueue->dispatch([protectedThis = Ref { *this }, strongBuffer = retainPtr(sampleBuffer), displaying] {
</ins><span class="cx">         protectedThis->decodeSample(strongBuffer.get(), displaying);
</span><span class="cx">     });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Tools/ChangeLog       2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2021-09-20  Chris Dumez  <cdumez@apple.com>
+
+        Reduce use of makeRefPtr() and use RefPtr { } directly
+        https://bugs.webkit.org/show_bug.cgi?id=230503
+
+        Reviewed by Geoffrey Garen.
+
+        * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
+        (WTR::UIScriptControllerIOS::singleTapAtPointWithModifiers):
+        (WTR::UIScriptControllerIOS::sendEventStream):
+        (WTR::UIScriptControllerIOS::dragFromPointToPoint):
+        * WebKitTestRunner/mac/UIScriptControllerMac.mm:
+        (WTR::UIScriptControllerMac::activateDataListSuggestion):
+
</ins><span class="cx"> 2021-09-20  Michael Catanzaro  <mcatanzaro@gnome.org>
</span><span class="cx"> 
</span><span class="cx">         WebKit might load custom URI scheme request content multiple times
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunneriosUIScriptControllerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm        2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm   2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -290,7 +290,7 @@
</span><span class="cx"> void UIScriptControllerIOS::singleTapAtPointWithModifiers(long x, long y, JSValueRef modifierArray, JSValueRef callback)
</span><span class="cx"> {
</span><span class="cx">     unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent);
</span><del>-    singleTapAtPointWithModifiers(WebCore::FloatPoint(x, y), parseModifierArray(m_context->jsContext(), modifierArray), makeBlockPtr([this, protectedThis = makeRefPtr(*this), callbackID] {
</del><ins>+    singleTapAtPointWithModifiers(WebCore::FloatPoint(x, y), parseModifierArray(m_context->jsContext(), modifierArray), makeBlockPtr([this, protectedThis = Ref { *this }, callbackID] {
</ins><span class="cx">         if (!m_context)
</span><span class="cx">             return;
</span><span class="cx">         m_context->asyncTaskComplete(callbackID);
</span><span class="lines">@@ -442,7 +442,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto completion = makeBlockPtr([this, protectedThis = makeRefPtr(*this), callbackID] {
</del><ins>+    auto completion = makeBlockPtr([this, protectedThis = Ref { *this }, callbackID] {
</ins><span class="cx">         if (!m_context)
</span><span class="cx">             return;
</span><span class="cx">         m_context->asyncTaskComplete(callbackID);
</span><span class="lines">@@ -494,7 +494,7 @@
</span><span class="cx">         ],
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    auto completion = makeBlockPtr([this, protectedThis = makeRefPtr(*this), callbackID] {
</del><ins>+    auto completion = makeBlockPtr([this, protectedThis = Ref { *this }, callbackID] {
</ins><span class="cx">         if (!m_context)
</span><span class="cx">             return;
</span><span class="cx">         m_context->asyncTaskComplete(callbackID);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnermacUIScriptControllerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm (282783 => 282784)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm        2021-09-20 21:36:44 UTC (rev 282783)
+++ trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm   2021-09-20 21:45:40 UTC (rev 282784)
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx">     [table selectRowIndexes:[NSIndexSet indexSetWithIndex:index] byExtendingSelection:NO];
</span><span class="cx"> 
</span><span class="cx">     // Send the action after a short delay to simulate normal user interaction.
</span><del>-    WorkQueue::main().dispatchAfter(50_ms, [this, protectedThis = makeRefPtr(*this), callbackID, table] {
</del><ins>+    WorkQueue::main().dispatchAfter(50_ms, [this, protectedThis = Ref { *this }, callbackID, table] {
</ins><span class="cx">         if ([table window])
</span><span class="cx">             [table sendAction:[table action] to:[table target]];
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>