<!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>[183172] trunk/Source</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/183172">183172</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2015-04-22 23:02:14 -0700 (Wed, 22 Apr 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=143943
Reviewed by Anders Carlsson.
Source/WebCore:
* editing/Editor.cpp:
(WebCore::Editor::insertDictationPhrases): Changed this iOS-only
function to take a Vector<Vector<String>>&& and not involve PassOwnPtr.
(WebCore::Editor::setDictationPhrasesAsChildOfElement): Changed this iOS-only
function to take a Vector<Vector<String>> and not involve PassOwnPtr. Also made
it take a reference rather than a pointer to the element and simplify the code
a bit using modern for loops and auto.
* editing/Editor.h: Ditto.
* editing/ios/DictationCommandIOS.cpp:
(WebCore::DictationCommandIOS::DictationCommandIOS): Take
a Vector<Vector<String>>&& instead of a PassOwnPtr.
(WebCore::DictationCommandIOS::~DictationCommandIOS): Deleted. No need to
explicitly define this.
(WebCore::DictationCommandIOS::doApply): Updated to use modern for loop and
work with a Vector<Vector<String>> instead of an OwnPtr.
* editing/ios/DictationCommandIOS.h: Updated to not use PassOwnPtr and OwnPtr.
Also modernized a bit by using override.
* platform/network/ios/QuickLook.h: Return an NSURLRequest * instead of a
PassOwnPtr<ResourceRequest> from this iOS-specific function.
* platform/network/ios/QuickLook.mm:
(WebCore::registerQLPreviewConverterIfNeeded): Ditto.
Source/WebKit/cf:
* WebCoreSupport/WebInspectorClientCF.cpp: Removed unneeded include.
Source/WebKit/mac:
* Plugins/Hosted/ProxyInstance.h: Removed unneeded include.
* Plugins/WebBaseNetscapePluginView.h: Ditto.
* Plugins/WebNetscapePluginEventHandler.h: Use unique_ptr instead of
PassOwnPtr for the create function. Also tweaked formatting and removed
unneeded forward declaration of CGRect.
* Plugins/WebNetscapePluginEventHandler.mm:
(WebNetscapePluginEventHandler::create): Changed to use unique_ptr and
make_unique.
* Plugins/WebNetscapePluginView.h: Use unique_ptr instead of OwnPtr for
the _eventHandler field.
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView destroyPlugin]): Changed code to work with unique_ptr.
* WebCoreSupport/WebUserMediaClient.mm: Removed unneeded include.
* WebView/WebDeviceOrientationProviderMock.mm: Changed to use make_unique.
* WebView/WebDeviceOrientationProviderMockInternal.h: Changed to use unique_ptr.
* WebView/WebFrame.mm:
(vectorForDictationPhrasesArray): Changed to return Vector<Vector<String>> and
not a PassOwnPtr. Also rewrote to be much simpler, although there is still a
pre-existing problem here where this could put empty vectors into the result,
and I'm pretty sure the client never expects any of the Vector<String> to be empty.
(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
Rewrote logic to involve WebCore types a bit less; old code was round tripping
things through WebCore::URL for no obvious reason.
* WebView/WebFrameInternal.h: Changed vectorForDictationPhrasesArray to return
a Vector<Vector<String>> and not a PassOwnPtr.
* WebView/WebFullScreenController.h: Removed unneeded include.
* WebView/WebViewData.h: Changed m_alternativeTextUIController to be a
m_alternativeTextUIController.
* WebView/WebViewData.mm:
(-[WebViewPrivate init]): Use make_unique to initialize m_alternativeTextUIController.
Source/WebKit2:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
Removed unneeded include.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorh">trunk/Source/WebCore/editing/Editor.h</a></li>
<li><a href="#trunkSourceWebCoreeditingiosDictationCommandIOScpp">trunk/Source/WebCore/editing/ios/DictationCommandIOS.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingiosDictationCommandIOSh">trunk/Source/WebCore/editing/ios/DictationCommandIOS.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkiosQuickLookh">trunk/Source/WebCore/platform/network/ios/QuickLook.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkiosQuickLookmm">trunk/Source/WebCore/platform/network/ios/QuickLook.mm</a></li>
<li><a href="#trunkSourceWebKitcfChangeLog">trunk/Source/WebKit/cf/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitcfWebCoreSupportWebInspectorClientCFcpp">trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacPluginsHostedProxyInstanceh">trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.h</a></li>
<li><a href="#trunkSourceWebKitmacPluginsWebBaseNetscapePluginViewh">trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.h</a></li>
<li><a href="#trunkSourceWebKitmacPluginsWebNetscapePluginEventHandlerh">trunk/Source/WebKit/mac/Plugins/WebNetscapePluginEventHandler.h</a></li>
<li><a href="#trunkSourceWebKitmacPluginsWebNetscapePluginEventHandlermm">trunk/Source/WebKit/mac/Plugins/WebNetscapePluginEventHandler.mm</a></li>
<li><a href="#trunkSourceWebKitmacPluginsWebNetscapePluginViewh">trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.h</a></li>
<li><a href="#trunkSourceWebKitmacPluginsWebNetscapePluginViewmm">trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebUserMediaClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebUserMediaClient.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebDeviceOrientationProviderMockmm">trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebDeviceOrientationProviderMockInternalh">trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMockInternal.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFramemm">trunk/Source/WebKit/mac/WebView/WebFrame.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFrameInternalh">trunk/Source/WebKit/mac/WebView/WebFrameInternal.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFullScreenControllerh">trunk/Source/WebKit/mac/WebView/WebFullScreenController.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewDatah">trunk/Source/WebKit/mac/WebView/WebViewData.h</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewDatamm">trunk/Source/WebKit/mac/WebView/WebViewData.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsThreadedCoordinatedLayerTreeHosth">trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebCore/ChangeLog        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2015-04-22 Darin Adler <darin@apple.com>
+
+ Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=143943
+
+ Reviewed by Anders Carlsson.
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::insertDictationPhrases): Changed this iOS-only
+ function to take a Vector<Vector<String>>&& and not involve PassOwnPtr.
+ (WebCore::Editor::setDictationPhrasesAsChildOfElement): Changed this iOS-only
+ function to take a Vector<Vector<String>> and not involve PassOwnPtr. Also made
+ it take a reference rather than a pointer to the element and simplify the code
+ a bit using modern for loops and auto.
+ * editing/Editor.h: Ditto.
+
+ * editing/ios/DictationCommandIOS.cpp:
+ (WebCore::DictationCommandIOS::DictationCommandIOS): Take
+ a Vector<Vector<String>>&& instead of a PassOwnPtr.
+ (WebCore::DictationCommandIOS::~DictationCommandIOS): Deleted. No need to
+ explicitly define this.
+ (WebCore::DictationCommandIOS::doApply): Updated to use modern for loop and
+ work with a Vector<Vector<String>> instead of an OwnPtr.
+ * editing/ios/DictationCommandIOS.h: Updated to not use PassOwnPtr and OwnPtr.
+ Also modernized a bit by using override.
+
+ * platform/network/ios/QuickLook.h: Return an NSURLRequest * instead of a
+ PassOwnPtr<ResourceRequest> from this iOS-specific function.
+ * platform/network/ios/QuickLook.mm:
+ (WebCore::registerQLPreviewConverterIfNeeded): Ditto.
+
</ins><span class="cx"> 2015-04-22 Jinwoo Song <jinwoo7.song@samsung.com>
</span><span class="cx">
</span><span class="cx"> Convert OwnPtr to std::unique_ptr in GraphicsContextCairo.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebCore/editing/Editor.cpp        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -388,18 +388,19 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-void Editor::insertDictationPhrases(PassOwnPtr<Vector<Vector<String> > > dictationPhrases, RetainPtr<id> metadata)
</del><ins>+
+void Editor::insertDictationPhrases(Vector<Vector<String>>&& dictationPhrases, RetainPtr<id> metadata)
</ins><span class="cx"> {
</span><span class="cx"> if (m_frame.selection().isNone())
</span><span class="cx"> return;
</span><del>-
- if (dictationPhrases->isEmpty())
</del><ins>+
+ if (dictationPhrases.isEmpty())
</ins><span class="cx"> return;
</span><del>-
- applyCommand(DictationCommandIOS::create(document(), dictationPhrases, metadata));
</del><ins>+
+ applyCommand(DictationCommandIOS::create(document(), WTF::move(dictationPhrases), WTF::move(metadata)));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void Editor::setDictationPhrasesAsChildOfElement(PassOwnPtr<Vector<Vector<String> > > dictationPhrases, RetainPtr<id> metadata, Element* element)
</del><ins>+void Editor::setDictationPhrasesAsChildOfElement(const Vector<Vector<String>>& dictationPhrases, RetainPtr<id> metadata, Element& element)
</ins><span class="cx"> {
</span><span class="cx"> // Clear the composition.
</span><span class="cx"> clear();
</span><span class="lines">@@ -410,54 +411,50 @@
</span><span class="cx">
</span><span class="cx"> m_frame.selection().clear();
</span><span class="cx">
</span><del>- element->removeChildren();
</del><ins>+ element.removeChildren();
</ins><span class="cx">
</span><del>- if (dictationPhrases->isEmpty()) {
</del><ins>+ if (dictationPhrases.isEmpty()) {
</ins><span class="cx"> client()->respondToChangedContents();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ExceptionCode ec;
</span><span class="cx"> RefPtr<Range> context = document().createRange();
</span><del>- context->selectNodeContents(element, ec);
-
</del><ins>+ context->selectNodeContents(&element, ec);
+
</ins><span class="cx"> StringBuilder dictationPhrasesBuilder;
</span><del>- size_t dictationPhraseCount = dictationPhrases->size();
- for (size_t i = 0; i < dictationPhraseCount; i++) {
- const String& firstInterpretation = dictationPhrases->at(i)[0];
- dictationPhrasesBuilder.append(firstInterpretation);
- }
- String serializedDictationPhrases = dictationPhrasesBuilder.toString();
-
- element->appendChild(createFragmentFromText(*context.get(), serializedDictationPhrases), ec);
-
</del><ins>+ for (auto& interpretations : dictationPhrases)
+ dictationPhrasesBuilder.append(interpretations[0]);
+
+ element.appendChild(createFragmentFromText(*context, dictationPhrasesBuilder.toString()), ec);
+
</ins><span class="cx"> // We need a layout in order to add markers below.
</span><span class="cx"> document().updateLayout();
</span><del>-
- if (!element->firstChild()->isTextNode()) {
</del><ins>+
+ if (!element.firstChild()->isTextNode()) {
</ins><span class="cx"> // Shouldn't happen.
</span><del>- ASSERT(element->firstChild()->isTextNode());
</del><ins>+ ASSERT(element.firstChild()->isTextNode());
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><del>-
- Text* textNode = static_cast<Text*>(element->firstChild());
</del><ins>+
+ Text& textNode = downcast<Text>(*element.firstChild());
</ins><span class="cx"> int previousDictationPhraseStart = 0;
</span><del>- for (size_t i = 0; i < dictationPhraseCount; i++) {
- const Vector<String>& interpretations = dictationPhrases->at(i);
</del><ins>+ for (auto& interpretations : dictationPhrases) {
</ins><span class="cx"> int dictationPhraseLength = interpretations[0].length();
</span><span class="cx"> int dictationPhraseEnd = previousDictationPhraseStart + dictationPhraseLength;
</span><span class="cx"> if (interpretations.size() > 1) {
</span><del>- RefPtr<Range> dictationPhraseRange = Range::create(document(), textNode, previousDictationPhraseStart, textNode, dictationPhraseEnd);
- document().markers().addDictationPhraseWithAlternativesMarker(dictationPhraseRange.get(), interpretations);
</del><ins>+ auto dictationPhraseRange = Range::create(document(), &textNode, previousDictationPhraseStart, &textNode, dictationPhraseEnd);
+ document().markers().addDictationPhraseWithAlternativesMarker(dictationPhraseRange.ptr(), interpretations);
</ins><span class="cx"> }
</span><span class="cx"> previousDictationPhraseStart = dictationPhraseEnd;
</span><span class="cx"> }
</span><del>-
- RefPtr<Range> resultRange = Range::create(document(), textNode, 0, textNode, textNode->length());
- document().markers().addDictationResultMarker(resultRange.get(), metadata);
-
</del><ins>+
+ auto resultRange = Range::create(document(), &textNode, 0, &textNode, textNode.length());
+ document().markers().addDictationResultMarker(resultRange.ptr(), metadata);
+
</ins><span class="cx"> client()->respondToChangedContents();
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void Editor::pasteAsPlainText(const String& pastingText, bool smartReplace)
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebCore/editing/Editor.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -329,8 +329,8 @@
</span><span class="cx"> WEBCORE_EXPORT void confirmMarkedText();
</span><span class="cx"> WEBCORE_EXPORT void setTextAsChildOfElement(const String&, Element*);
</span><span class="cx"> WEBCORE_EXPORT void setTextAlignmentForChangedBaseWritingDirection(WritingDirection);
</span><del>- WEBCORE_EXPORT void insertDictationPhrases(PassOwnPtr<Vector<Vector<String> > > dictationPhrases, RetainPtr<id> metadata);
- WEBCORE_EXPORT void setDictationPhrasesAsChildOfElement(PassOwnPtr<Vector<Vector<String> > > dictationPhrases, RetainPtr<id> metadata, Element* element);
</del><ins>+ WEBCORE_EXPORT void insertDictationPhrases(Vector<Vector<String>>&& dictationPhrases, RetainPtr<id> metadata);
+ WEBCORE_EXPORT void setDictationPhrasesAsChildOfElement(const Vector<Vector<String>>& dictationPhrases, RetainPtr<id> metadata, Element&);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void addToKillRing(Range*, bool prepend);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingiosDictationCommandIOScpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ios/DictationCommandIOS.cpp (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ios/DictationCommandIOS.cpp        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebCore/editing/ios/DictationCommandIOS.cpp        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -37,45 +37,38 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-DictationCommandIOS::DictationCommandIOS(Document& document, PassOwnPtr<Vector<Vector<String> > > dictationPhrases, RetainPtr<id> metadata)
</del><ins>+DictationCommandIOS::DictationCommandIOS(Document& document, Vector<Vector<String>>&& dictationPhrases, RetainPtr<id> metadata)
</ins><span class="cx"> : CompositeEditCommand(document)
</span><del>- , m_dictationPhrases(dictationPhrases)
- , m_metadata(metadata)
</del><ins>+ , m_dictationPhrases(WTF::move(dictationPhrases))
+ , m_metadata(WTF::move(metadata))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-DictationCommandIOS::~DictationCommandIOS()
-{
-}
-
</del><span class="cx"> void DictationCommandIOS::doApply()
</span><span class="cx"> {
</span><span class="cx"> VisiblePosition insertionPosition(startingSelection().visibleStart());
</span><del>-
</del><ins>+
</ins><span class="cx"> unsigned resultLength = 0;
</span><del>- size_t dictationPhraseCount = m_dictationPhrases->size();
- for (size_t i = 0; i < dictationPhraseCount; i++) {
-
- const String& firstInterpretation = m_dictationPhrases->at(i)[0];
</del><ins>+ for (auto& interpretations : m_dictationPhrases) {
+ const String& firstInterpretation = interpretations[0];
</ins><span class="cx"> resultLength += firstInterpretation.length();
</span><span class="cx"> inputText(firstInterpretation, true);
</span><del>-
- const Vector<String>& interpretations = m_dictationPhrases->at(i);
-
</del><ins>+
</ins><span class="cx"> if (interpretations.size() > 1)
</span><span class="cx"> document().markers().addDictationPhraseWithAlternativesMarker(endingSelection().toNormalizedRange().get(), interpretations);
</span><del>-
</del><ins>+
</ins><span class="cx"> setEndingSelection(VisibleSelection(endingSelection().visibleEnd()));
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> VisiblePosition afterResults(endingSelection().visibleEnd());
</span><del>-
</del><ins>+
</ins><span class="cx"> Element* root = afterResults.rootEditableElement();
</span><ins>+
</ins><span class="cx"> // FIXME: Add the result marker using a Position cached before results are inserted, instead of relying on TextIterators.
</span><span class="cx"> RefPtr<Range> rangeToEnd = Range::create(document(), createLegacyEditingPosition((Node *)root, 0), afterResults.deepEquivalent());
</span><span class="cx"> int endIndex = TextIterator::rangeLength(rangeToEnd.get(), true);
</span><span class="cx"> int startIndex = endIndex - resultLength;
</span><del>-
</del><ins>+
</ins><span class="cx"> if (startIndex >= 0) {
</span><span class="cx"> RefPtr<Range> resultRange = TextIterator::rangeFromLocationAndLength(document().documentElement(), startIndex, endIndex, true);
</span><span class="cx"> document().markers().addDictationResultMarker(resultRange.get(), m_metadata);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingiosDictationCommandIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ios/DictationCommandIOS.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ios/DictationCommandIOS.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebCore/editing/ios/DictationCommandIOS.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -27,8 +27,6 @@
</span><span class="cx"> #define DictationCommandIOS_h
</span><span class="cx">
</span><span class="cx"> #import "CompositeEditCommand.h"
</span><del>-#import <wtf/OwnPtr.h>
-#import <wtf/PassOwnPtr.h>
</del><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="cx"> typedef struct objc_object *id;
</span><span class="lines">@@ -37,19 +35,18 @@
</span><span class="cx">
</span><span class="cx"> class DictationCommandIOS : public CompositeEditCommand {
</span><span class="cx"> public:
</span><del>- static Ref<DictationCommandIOS> create(Document& document, PassOwnPtr<Vector<Vector<String> > > dictationPhrase, RetainPtr<id> metadata)
</del><ins>+ static Ref<DictationCommandIOS> create(Document& document, Vector<Vector<String>>&& dictationPhrases, RetainPtr<id> metadata)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new DictationCommandIOS(document, dictationPhrase, metadata));
</del><ins>+ return adoptRef(*new DictationCommandIOS(document, WTF::move(dictationPhrases), WTF::move(metadata)));
</ins><span class="cx"> }
</span><del>-
- virtual ~DictationCommandIOS();
</del><ins>+
</ins><span class="cx"> private:
</span><del>- DictationCommandIOS(Document& document, PassOwnPtr<Vector<Vector<String> > > dictationPhrase, RetainPtr<id> metadata);
-
- virtual void doApply();
- virtual EditAction editingAction() const { return EditActionDictation; }
-
- OwnPtr<Vector<Vector<String> > > m_dictationPhrases;
</del><ins>+ DictationCommandIOS(Document&, Vector<Vector<String>>&& dictationPhrases, RetainPtr<id> metadata);
+
+ virtual void doApply() override;
+ virtual EditAction editingAction() const override { return EditActionDictation; }
+
+ Vector<Vector<String>> m_dictationPhrases;
</ins><span class="cx"> RetainPtr<id> m_metadata;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkiosQuickLookh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ios/QuickLook.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ios/QuickLook.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebCore/platform/network/ios/QuickLook.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #import "QuickLookHandleClient.h"
</span><span class="cx"> #import "ResourceRequest.h"
</span><span class="cx"> #import <objc/objc-runtime.h>
</span><del>-#import <wtf/PassOwnPtr.h>
</del><span class="cx"> #import <wtf/RefPtr.h>
</span><span class="cx">
</span><span class="cx"> OBJC_CLASS NSData;
</span><span class="lines">@@ -41,6 +40,7 @@
</span><span class="cx"> OBJC_CLASS NSString;
</span><span class="cx"> OBJC_CLASS NSURL;
</span><span class="cx"> OBJC_CLASS NSURLConnection;
</span><ins>+OBJC_CLASS NSURLRequest;
</ins><span class="cx"> OBJC_CLASS NSURLResponse;
</span><span class="cx"> OBJC_CLASS QLPreviewConverter;
</span><span class="cx">
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> WEBCORE_EXPORT NSString *qlPreviewConverterUTIForURL(NSURL *);
</span><span class="cx"> WEBCORE_EXPORT void removeQLPreviewConverterForURL(NSURL *);
</span><span class="cx">
</span><del>-WEBCORE_EXPORT PassOwnPtr<ResourceRequest> registerQLPreviewConverterIfNeeded(NSURL *, NSString *mimeType, NSData *);
</del><ins>+WEBCORE_EXPORT RetainPtr<NSURLRequest> registerQLPreviewConverterIfNeeded(NSURL *, NSString *mimeType, NSData *);
</ins><span class="cx">
</span><span class="cx"> const URL safeQLURLForDocumentURLAndResourceURL(const URL& documentURL, const String& resourceURL);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkiosQuickLookmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ios/QuickLook.mm (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ios/QuickLook.mm        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebCore/platform/network/ios/QuickLook.mm        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -188,7 +188,7 @@
</span><span class="cx"> [QLContentDictionary() removeObjectForKey:url];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<ResourceRequest> WebCore::registerQLPreviewConverterIfNeeded(NSURL *url, NSString *mimeType, NSData *data)
</del><ins>+RetainPtr<NSURLRequest> WebCore::registerQLPreviewConverterIfNeeded(NSURL *url, NSString *mimeType, NSData *data)
</ins><span class="cx"> {
</span><span class="cx"> RetainPtr<NSString> updatedMIMEType = adoptNS(WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType(url, mimeType));
</span><span class="cx">
</span><span class="lines">@@ -202,10 +202,10 @@
</span><span class="cx"> // the URL that the WebDataSource will see during -dealloc.
</span><span class="cx"> addQLPreviewConverterWithFileForURL([request URL], converter.get(), nil);
</span><span class="cx">
</span><del>- return adoptPtr(new ResourceRequest(request));
</del><ins>+ return request;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return nullptr;
</del><ins>+ return nil;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const URL WebCore::safeQLURLForDocumentURLAndResourceURL(const URL& documentURL, const String& resourceURL)
</span></span></pre></div>
<a id="trunkSourceWebKitcfChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/cf/ChangeLog (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/cf/ChangeLog        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/cf/ChangeLog        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2015-04-22 Darin Adler <darin@apple.com>
+
+ Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=143943
+
+ Reviewed by Anders Carlsson.
+
+ * WebCoreSupport/WebInspectorClientCF.cpp: Removed unneeded include.
+
</ins><span class="cx"> 2014-09-25 Csaba Osztrogonác <ossy@webkit.org>
</span><span class="cx">
</span><span class="cx"> Remove WinCE port from trunk
</span></span></pre></div>
<a id="trunkSourceWebKitcfWebCoreSupportWebInspectorClientCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -54,7 +54,6 @@
</span><span class="cx"> #include <WebCore/InspectorFrontendClientLocal.h>
</span><span class="cx"> #include <WebCore/Page.h>
</span><span class="cx">
</span><del>-#include <wtf/PassOwnPtr.h>
</del><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/ChangeLog        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2015-04-22 Darin Adler <darin@apple.com>
+
+ Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=143943
+
+ Reviewed by Anders Carlsson.
+
+ * Plugins/Hosted/ProxyInstance.h: Removed unneeded include.
+ * Plugins/WebBaseNetscapePluginView.h: Ditto.
+
+ * Plugins/WebNetscapePluginEventHandler.h: Use unique_ptr instead of
+ PassOwnPtr for the create function. Also tweaked formatting and removed
+ unneeded forward declaration of CGRect.
+ * Plugins/WebNetscapePluginEventHandler.mm:
+ (WebNetscapePluginEventHandler::create): Changed to use unique_ptr and
+ make_unique.
+
+ * Plugins/WebNetscapePluginView.h: Use unique_ptr instead of OwnPtr for
+ the _eventHandler field.
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView destroyPlugin]): Changed code to work with unique_ptr.
+
+ * WebCoreSupport/WebUserMediaClient.mm: Removed unneeded include.
+
+ * WebView/WebDeviceOrientationProviderMock.mm: Changed to use make_unique.
+ * WebView/WebDeviceOrientationProviderMockInternal.h: Changed to use unique_ptr.
+
+ * WebView/WebFrame.mm:
+ (vectorForDictationPhrasesArray): Changed to return Vector<Vector<String>> and
+ not a PassOwnPtr. Also rewrote to be much simpler, although there is still a
+ pre-existing problem here where this could put empty vectors into the result,
+ and I'm pretty sure the client never expects any of the Vector<String> to be empty.
+ (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
+ Rewrote logic to involve WebCore types a bit less; old code was round tripping
+ things through WebCore::URL for no obvious reason.
+
+ * WebView/WebFrameInternal.h: Changed vectorForDictationPhrasesArray to return
+ a Vector<Vector<String>> and not a PassOwnPtr.
+
+ * WebView/WebFullScreenController.h: Removed unneeded include.
+
+ * WebView/WebViewData.h: Changed m_alternativeTextUIController to be a
+ m_alternativeTextUIController.
+ * WebView/WebViewData.mm:
+ (-[WebViewPrivate init]): Use make_unique to initialize m_alternativeTextUIController.
+
</ins><span class="cx"> 2015-04-22 Brent Fulgham <bfulgham@apple.com>
</span><span class="cx">
</span><span class="cx"> VisibleSelection should only accept Range by reference
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsHostedProxyInstanceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #import "WebKitPluginHostTypes.h"
</span><span class="cx"> #import <WebCore/BridgeJSC.h>
</span><span class="cx"> #import <WebCore/runtime_root.h>
</span><del>-#import <wtf/OwnPtr.h>
</del><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsWebBaseNetscapePluginViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #import "WebNetscapePluginPackage.h"
</span><span class="cx"> #import "WebPluginContainerCheck.h"
</span><span class="cx"> #import <wtf/Forward.h>
</span><del>-#import <wtf/OwnPtr.h>
</del><span class="cx"> #import <wtf/PassRefPtr.h>
</span><span class="cx"> #import <wtf/RefPtr.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsWebNetscapePluginEventHandlerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/WebNetscapePluginEventHandler.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/WebNetscapePluginEventHandler.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/Plugins/WebNetscapePluginEventHandler.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -33,26 +33,24 @@
</span><span class="cx"> @class NSEvent;
</span><span class="cx"> @class WebNetscapePluginView;
</span><span class="cx">
</span><del>-struct CGRect;
-
</del><span class="cx"> class WebNetscapePluginEventHandler {
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<WebNetscapePluginEventHandler> create(WebNetscapePluginView*);
</del><ins>+ static std::unique_ptr<WebNetscapePluginEventHandler> create(WebNetscapePluginView *);
</ins><span class="cx"> virtual ~WebNetscapePluginEventHandler() { }
</span><span class="cx">
</span><span class="cx"> virtual void drawRect(CGContextRef, const NSRect&) = 0;
</span><span class="cx">
</span><del>- virtual void mouseDown(NSEvent*) = 0;
- virtual void mouseDragged(NSEvent*) = 0;
- virtual void mouseEntered(NSEvent*) = 0;
- virtual void mouseExited(NSEvent*) = 0;
- virtual void mouseMoved(NSEvent*) = 0;
- virtual void mouseUp(NSEvent*) = 0;
- virtual bool scrollWheel(NSEvent*) = 0;
</del><ins>+ virtual void mouseDown(NSEvent *) = 0;
+ virtual void mouseDragged(NSEvent *) = 0;
+ virtual void mouseEntered(NSEvent *) = 0;
+ virtual void mouseExited(NSEvent *) = 0;
+ virtual void mouseMoved(NSEvent *) = 0;
+ virtual void mouseUp(NSEvent *) = 0;
+ virtual bool scrollWheel(NSEvent *) = 0;
</ins><span class="cx">
</span><del>- virtual void keyDown(NSEvent*) = 0;
- virtual void keyUp(NSEvent*) = 0;
- virtual void flagsChanged(NSEvent*) = 0;
</del><ins>+ virtual void keyDown(NSEvent *) = 0;
+ virtual void keyUp(NSEvent *) = 0;
+ virtual void flagsChanged(NSEvent *) = 0;
</ins><span class="cx"> virtual void syntheticKeyDownWithCommandModifier(int keyCode, char character) = 0;
</span><span class="cx">
</span><span class="cx"> virtual void focusChanged(bool hasFocus) = 0;
</span><span class="lines">@@ -62,17 +60,18 @@
</span><span class="cx"> virtual void stopTimers() { }
</span><span class="cx">
</span><span class="cx"> // Returns the platform specific window used in NPP_SetWindow
</span><del>- virtual void* platformWindow(NSWindow*) = 0;
</del><ins>+ virtual void* platformWindow(NSWindow *) = 0;
</ins><span class="cx">
</span><span class="cx"> bool currentEventIsUserGesture() const { return m_currentEventIsUserGesture; }
</span><ins>+
</ins><span class="cx"> protected:
</span><del>- WebNetscapePluginEventHandler(WebNetscapePluginView* pluginView)
</del><ins>+ explicit WebNetscapePluginEventHandler(WebNetscapePluginView *pluginView)
</ins><span class="cx"> : m_pluginView(pluginView)
</span><span class="cx"> , m_currentEventIsUserGesture(false)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- WebNetscapePluginView* m_pluginView;
</del><ins>+ WebNetscapePluginView *m_pluginView;
</ins><span class="cx"> bool m_currentEventIsUserGesture;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsWebNetscapePluginEventHandlermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/WebNetscapePluginEventHandler.mm (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/WebNetscapePluginEventHandler.mm        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/Plugins/WebNetscapePluginEventHandler.mm        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -28,20 +28,19 @@
</span><span class="cx"> #import "WebNetscapePluginEventHandler.h"
</span><span class="cx">
</span><span class="cx"> #import <wtf/Assertions.h>
</span><del>-#import <wtf/PassOwnPtr.h>
</del><span class="cx"> #import "WebNetscapePluginView.h"
</span><span class="cx"> #import "WebNetscapePluginEventHandlerCarbon.h"
</span><span class="cx"> #import "WebNetscapePluginEventHandlerCocoa.h"
</span><span class="cx">
</span><del>-PassOwnPtr<WebNetscapePluginEventHandler> WebNetscapePluginEventHandler::create(WebNetscapePluginView* pluginView)
</del><ins>+std::unique_ptr<WebNetscapePluginEventHandler> WebNetscapePluginEventHandler::create(WebNetscapePluginView *pluginView)
</ins><span class="cx"> {
</span><span class="cx"> switch ([pluginView eventModel]) {
</span><span class="cx"> #ifndef NP_NO_CARBON
</span><span class="cx"> case NPEventModelCarbon:
</span><del>- return adoptPtr(new WebNetscapePluginEventHandlerCarbon(pluginView));
-#endif // NP_NO_CARBON
</del><ins>+ return std::make_unique<WebNetscapePluginEventHandlerCarbon>(pluginView);
+#endif
</ins><span class="cx"> case NPEventModelCocoa:
</span><del>- return adoptPtr(new WebNetscapePluginEventHandlerCocoa(pluginView));
</del><ins>+ return std::make_unique<WebNetscapePluginEventHandlerCocoa>(pluginView);
</ins><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsWebNetscapePluginViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -29,18 +29,13 @@
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx">
</span><span class="cx"> #import "WebBaseNetscapePluginView.h"
</span><del>-
</del><span class="cx"> #import "WebNetscapeContainerCheckPrivate.h"
</span><span class="cx"> #import <WebKitLegacy/npfunctions.h>
</span><span class="cx"> #import <WebKitLegacy/npapi.h>
</span><span class="cx"> #import <wtf/HashMap.h>
</span><span class="cx"> #import <wtf/HashSet.h>
</span><del>-#import <wtf/OwnPtr.h>
</del><span class="cx">
</span><del>-@class WebDataSource;
-@class WebFrame;
</del><span class="cx"> @class WebNetscapePluginPackage;
</span><del>-@class WebView;
</del><span class="cx">
</span><span class="cx"> class PluginTimer;
</span><span class="cx"> class WebNetscapePluginStream;
</span><span class="lines">@@ -83,7 +78,7 @@
</span><span class="cx"> GWorldPtr offscreenGWorld;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- OwnPtr<WebNetscapePluginEventHandler> _eventHandler;
</del><ins>+ std::unique_ptr<WebNetscapePluginEventHandler> _eventHandler;
</ins><span class="cx">
</span><span class="cx"> BOOL inSetWindow;
</span><span class="cx"> BOOL shouldStopSoon;
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsWebNetscapePluginViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.mm (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.mm        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.mm        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -1187,12 +1187,12 @@
</span><span class="cx"> // Setting the window type to 0 ensures that NPP_SetWindow will be called if the plug-in is restarted.
</span><span class="cx"> lastSetWindow.type = (NPWindowType)0;
</span><span class="cx">
</span><del>- _pluginLayer = 0;
</del><ins>+ _pluginLayer = nil;
</ins><span class="cx">
</span><span class="cx"> [self _destroyPlugin];
</span><span class="cx"> [_pluginPackage.get() close];
</span><span class="cx">
</span><del>- _eventHandler.clear();
</del><ins>+ _eventHandler = nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NPEventModel)eventModel
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebUserMediaClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebUserMediaClient.mm (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebUserMediaClient.mm        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebUserMediaClient.mm        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #import <WebCore/ScriptExecutionContext.h>
</span><span class="cx"> #import <WebCore/UserMediaRequest.h>
</span><span class="cx"> #import <wtf/HashMap.h>
</span><del>-#import <wtf/PassOwnPtr.h>
</del><span class="cx"> #import <wtf/RefPtr.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebDeviceOrientationProviderMockmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMock.mm        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #import "WebDeviceOrientationProviderMockInternal.h"
</span><span class="cx">
</span><span class="cx"> #import "WebDeviceOrientationInternal.h"
</span><del>-#import <wtf/PassOwnPtr.h>
</del><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -37,7 +36,7 @@
</span><span class="cx"> self = [super init];
</span><span class="cx"> if (!self)
</span><span class="cx"> return nil;
</span><del>- m_core = adoptPtr(new DeviceOrientationClientMock());
</del><ins>+ m_core = std::make_unique<DeviceOrientationClientMock>();
</ins><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebDeviceOrientationProviderMockInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMockInternal.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMockInternal.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/WebView/WebDeviceOrientationProviderMockInternal.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -24,12 +24,10 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #import "WebDeviceOrientationProviderMock.h"
</span><del>-
</del><span class="cx"> #import <WebCore/DeviceOrientationClientMock.h>
</span><del>-#import <wtf/OwnPtr.h>
</del><span class="cx">
</span><span class="cx"> @interface WebDeviceOrientationProviderMockInternal : NSObject {
</span><del>- OwnPtr<WebCore::DeviceOrientationClientMock> m_core;
</del><ins>+ std::unique_ptr<WebCore::DeviceOrientationClientMock> m_core;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (id)init;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFramemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrame.mm        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -240,37 +240,25 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-PassOwnPtr<Vector<Vector<String>>> vectorForDictationPhrasesArray(NSArray *dictationPhrases)
</del><ins>+
+Vector<Vector<String>> vectorForDictationPhrasesArray(NSArray *dictationPhrases)
</ins><span class="cx"> {
</span><del>- NSUInteger dictationPhrasesCount = [dictationPhrases count];
- if (!dictationPhrasesCount)
- return PassOwnPtr<Vector<Vector<String> > >();
-
- OwnPtr<Vector<Vector<String> > > dictationPhrasesVector = adoptPtr(new Vector<Vector<String> >(dictationPhrasesCount));
-
- for (NSUInteger i = 0; i < dictationPhrasesCount; i++) {
-
- id dictationPhrase = [dictationPhrases objectAtIndex:i];
</del><ins>+ Vector<Vector<String>> result;
+
+ for (id dictationPhrase in dictationPhrases) {
</ins><span class="cx"> if (![dictationPhrase isKindOfClass:[NSArray class]])
</span><span class="cx"> continue;
</span><del>-
- NSArray *interpretationsArray = (NSArray *)dictationPhrase;
- Vector<String>& interpretationsVector = dictationPhrasesVector->at(i);
-
- NSUInteger interpretationsCount = [interpretationsArray count];
-
- for (NSUInteger j = 0; j < interpretationsCount; j++) {
-
- id interpretation = [interpretationsArray objectAtIndex:j];
</del><ins>+ result.append(Vector<String>());
+ for (id interpretation : (NSArray *)dictationPhrase) {
</ins><span class="cx"> if (![interpretation isKindOfClass:[NSString class]])
</span><span class="cx"> continue;
</span><del>-
- interpretationsVector.append(String((NSString *)interpretation));
</del><ins>+ result.last().append((NSString *)interpretation);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return dictationPhrasesVector.release();
</del><ins>+ return result;
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> @implementation WebFrame (WebInternal)
</span><span class="lines">@@ -1704,11 +1692,11 @@
</span><span class="cx"> if (!element)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- WebCore::Frame *frame = core(self);
</del><ins>+ auto* frame = core(self);
</ins><span class="cx"> if (!frame)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- frame->editor().setDictationPhrasesAsChildOfElement(vectorForDictationPhrasesArray(dictationPhrases), metadata, core(element));
</del><ins>+ frame->editor().setDictationPhrasesAsChildOfElement(vectorForDictationPhrasesArray(dictationPhrases), metadata, *core(element));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSArray *)interpretationsForCurrentRoot
</span><span class="lines">@@ -2507,33 +2495,32 @@
</span><span class="cx">
</span><span class="cx"> - (void)_loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)baseURL unreachableURL:(NSURL *)unreachableURL
</span><span class="cx"> {
</span><del>-#if !PLATFORM(IOS)
</del><ins>+#if PLATFORM(MAC)
</ins><span class="cx"> if (!pthread_main_np())
</span><span class="cx"> return [[self _webkit_invokeOnMainThread] _loadData:data MIMEType:MIMEType textEncodingName:encodingName baseURL:baseURL unreachableURL:unreachableURL];
</span><span class="cx"> #endif
</span><del>-
- URL responseURL;
- if (!baseURL) {
</del><ins>+
+ NSURL *responseURL = nil;
+ if (baseURL)
+ baseURL = [baseURL absoluteURL];
+ else {
</ins><span class="cx"> baseURL = blankURL();
</span><span class="cx"> responseURL = createUniqueWebDataURL();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> if (shouldUseQuickLookForMIMEType(MIMEType)) {
</span><del>- URL qlURL = responseURL;
- if (qlURL.isEmpty())
- qlURL = [baseURL absoluteURL];
- OwnPtr<ResourceRequest> qlRequest(registerQLPreviewConverterIfNeeded((NSURL *)qlURL, MIMEType, data));
- if (qlRequest) {
- _private->coreFrame->loader().load(FrameLoadRequest(_private->coreFrame, *qlRequest));
</del><ins>+ NSURL *quickLookURL = responseURL ? responseURL : baseURL;
+ if (auto request = registerQLPreviewConverterIfNeeded(quickLookURL, MIMEType, data)) {
+ _private->coreFrame->loader().load(FrameLoadRequest(_private->coreFrame, request.get()));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>-#endif // USE(QUICK_LOOK)
</del><ins>+#endif
</ins><span class="cx">
</span><del>- ResourceRequest request([baseURL absoluteURL]);
</del><ins>+ ResourceRequest request(baseURL);
</ins><span class="cx">
</span><del>-#if !PLATFORM(IOS)
</del><ins>+#if PLATFORM(MAC)
</ins><span class="cx"> // hack because Mail checks for this property to detect data / archive loads
</span><span class="cx"> [NSURLProtocol setProperty:@"" forKey:@"WebDataRequest" inRequest:(NSMutableURLRequest *)request.nsURLRequest(UpdateHTTPBody)];
</span><span class="cx"> #endif
</span><span class="lines">@@ -2543,7 +2530,6 @@
</span><span class="cx"> _private->coreFrame->loader().load(FrameLoadRequest(_private->coreFrame, request, substituteData));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> - (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)baseURL
</span><span class="cx"> {
</span><span class="cx"> WebCoreThreadViolationCheckRoundTwo();
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFrameInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrameInternal.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrameInternal.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/WebView/WebFrameInternal.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> WebCore::TextDirectionSubmenuInclusionBehavior core(WebTextDirectionSubmenuInclusionBehavior);
</span><span class="cx">
</span><span class="cx"> #if defined(__cplusplus) && PLATFORM(IOS)
</span><del>-PassOwnPtr<Vector<Vector<String>>> vectorForDictationPhrasesArray(NSArray *);
</del><ins>+Vector<Vector<String>> vectorForDictationPhrasesArray(NSArray *);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> WebView *getWebView(WebFrame *webFrame);
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFullScreenControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFullScreenController.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFullScreenController.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/WebView/WebFullScreenController.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #if ENABLE(FULLSCREEN_API) && !PLATFORM(IOS)
</span><span class="cx">
</span><span class="cx"> #import <WebCore/IntPoint.h>
</span><del>-#import <wtf/OwnPtr.h>
</del><span class="cx"> #import <wtf/RefPtr.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewData.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewData.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/WebView/WebViewData.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #import <WebCore/LayerFlushSchedulerClient.h>
</span><span class="cx"> #import <WebCore/WebCoreKeyboardUIMode.h>
</span><span class="cx"> #import <wtf/HashMap.h>
</span><del>-#import <wtf/PassOwnPtr.h>
</del><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx"> #import <wtf/ThreadingPrimitives.h>
</span><span class="cx"> #import <wtf/text/WTFString.h>
</span><span class="lines">@@ -318,7 +317,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if USE(DICTATION_ALTERNATIVES)
</span><del>- OwnPtr<WebCore::AlternativeTextUIController> m_alternativeTextUIController;
</del><ins>+ std::unique_ptr<WebCore::AlternativeTextUIController> m_alternativeTextUIController;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> RetainPtr<NSData> sourceApplicationAuditData;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewDatamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewData.mm (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewData.mm        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit/mac/WebView/WebViewData.mm        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx"> pluginDatabaseClientCount++;
</span><span class="cx">
</span><span class="cx"> #if USE(DICTATION_ALTERNATIVES)
</span><del>- m_alternativeTextUIController = adoptPtr(new WebCore::AlternativeTextUIController);
</del><ins>+ m_alternativeTextUIController = std::make_unique<WebCore::AlternativeTextUIController>();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> return self;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit2/ChangeLog        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-04-22 Darin Adler <darin@apple.com>
+
+ Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=143943
+
+ Reviewed by Anders Carlsson.
+
+ * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
+ Removed unneeded include.
+
</ins><span class="cx"> 2015-04-22 Brent Fulgham <bfulgham@apple.com>
</span><span class="cx">
</span><span class="cx"> VisibleSelection should only accept Range by reference
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsThreadedCoordinatedLayerTreeHosth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h (183171 => 183172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h        2015-04-23 05:56:28 UTC (rev 183171)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h        2015-04-23 06:02:14 UTC (rev 183172)
</span><span class="lines">@@ -41,7 +41,6 @@
</span><span class="cx"> #include <WebCore/IntSize.h>
</span><span class="cx"> #include <WebCore/PageOverlay.h>
</span><span class="cx"> #include <WebCore/Timer.h>
</span><del>-#include <wtf/OwnPtr.h>
</del><span class="cx"> #include <wtf/RunLoop.h>
</span><span class="cx"> #include <wtf/Threading.h>
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>