<!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>[203340] trunk/Source/WebCore</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/203340">203340</a></dd>
<dt>Author</dt> <dd>gyuyoung.kim@webkit.org</dd>
<dt>Date</dt> <dd>2016-07-17 23:13:28 -0700 (Sun, 17 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Clean up PassRefPtr uses in Modules/encryptedmedia, Modules/speech, and Modules/quota
https://bugs.webkit.org/show_bug.cgi?id=159701

Reviewed by Alex Christensen.

No new tests, no behavior changes.

* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/encryptedmedia/MediaKeys.h:
* Modules/quota/DOMWindowQuota.cpp:
* Modules/quota/StorageErrorCallback.cpp:
(WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
* Modules/quota/StorageErrorCallback.h:
* Modules/quota/StorageInfo.h:
* Modules/quota/StorageQuota.h:
* Modules/speech/DOMWindowSpeechSynthesis.cpp:
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::getVoices):
(WebCore::SpeechSynthesis::startSpeakingImmediately):
(WebCore::SpeechSynthesis::speak):
(WebCore::SpeechSynthesis::cancel):
(WebCore::SpeechSynthesis::handleSpeakingCompleted):
(WebCore::SpeechSynthesis::boundaryEventOccurred):
(WebCore::SpeechSynthesis::didStartSpeaking):
(WebCore::SpeechSynthesis::didPauseSpeaking):
(WebCore::SpeechSynthesis::didResumeSpeaking):
(WebCore::SpeechSynthesis::didFinishSpeaking):
(WebCore::SpeechSynthesis::speakingErrorOccurred):
* Modules/speech/SpeechSynthesis.h:
* Modules/speech/SpeechSynthesisEvent.h:
* Modules/speech/SpeechSynthesisUtterance.h:
* Modules/speech/SpeechSynthesisVoice.cpp:
(WebCore::SpeechSynthesisVoice::create):
(WebCore::SpeechSynthesisVoice::SpeechSynthesisVoice):
* Modules/speech/SpeechSynthesisVoice.h:
* platform/PlatformSpeechSynthesizer.h:
* platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
(WebCore::PlatformSpeechSynthesisProviderEfl::fireSpeechEvent):
* platform/mock/PlatformSpeechSynthesizerMock.cpp:
(WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
(WebCore::PlatformSpeechSynthesizerMock::speak):
(WebCore::PlatformSpeechSynthesizerMock::cancel):
(WebCore::PlatformSpeechSynthesizerMock::pause):
(WebCore::PlatformSpeechSynthesizerMock::resume):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaCDMh">trunk/Source/WebCore/Modules/encryptedmedia/CDM.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeySessionh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeysh">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaDOMWindowQuotacpp">trunk/Source/WebCore/Modules/quota/DOMWindowQuota.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaStorageErrorCallbackcpp">trunk/Source/WebCore/Modules/quota/StorageErrorCallback.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaStorageErrorCallbackh">trunk/Source/WebCore/Modules/quota/StorageErrorCallback.h</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaStorageInfoh">trunk/Source/WebCore/Modules/quota/StorageInfo.h</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaStorageQuotah">trunk/Source/WebCore/Modules/quota/StorageQuota.h</a></li>
<li><a href="#trunkSourceWebCoreModulesspeechDOMWindowSpeechSynthesiscpp">trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesspeechSpeechSynthesiscpp">trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesspeechSpeechSynthesish">trunk/Source/WebCore/Modules/speech/SpeechSynthesis.h</a></li>
<li><a href="#trunkSourceWebCoreModulesspeechSpeechSynthesisEventh">trunk/Source/WebCore/Modules/speech/SpeechSynthesisEvent.h</a></li>
<li><a href="#trunkSourceWebCoreModulesspeechSpeechSynthesisUtteranceh">trunk/Source/WebCore/Modules/speech/SpeechSynthesisUtterance.h</a></li>
<li><a href="#trunkSourceWebCoreModulesspeechSpeechSynthesisVoicecpp">trunk/Source/WebCore/Modules/speech/SpeechSynthesisVoice.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesspeechSpeechSynthesisVoiceh">trunk/Source/WebCore/Modules/speech/SpeechSynthesisVoice.h</a></li>
<li><a href="#trunkSourceWebCoreplatformPlatformSpeechSynthesizerh">trunk/Source/WebCore/platform/PlatformSpeechSynthesizer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformeflPlatformSpeechSynthesisProviderEflcpp">trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformiosPlatformSpeechSynthesizerIOSmm">trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacPlatformSpeechSynthesizerMacmm">trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmockPlatformSpeechSynthesizerMockcpp">trunk/Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/ChangeLog        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -1,3 +1,51 @@
</span><ins>+2016-07-17  Gyuyoung Kim  &lt;gyuyoung.kim@webkit.org&gt;
+
+        Clean up PassRefPtr uses in Modules/encryptedmedia, Modules/speech, and Modules/quota
+        https://bugs.webkit.org/show_bug.cgi?id=159701
+
+        Reviewed by Alex Christensen.
+
+        No new tests, no behavior changes.
+
+        * Modules/encryptedmedia/CDM.h:
+        * Modules/encryptedmedia/MediaKeySession.h:
+        * Modules/encryptedmedia/MediaKeys.h:
+        * Modules/quota/DOMWindowQuota.cpp:
+        * Modules/quota/StorageErrorCallback.cpp:
+        (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
+        * Modules/quota/StorageErrorCallback.h:
+        * Modules/quota/StorageInfo.h:
+        * Modules/quota/StorageQuota.h:
+        * Modules/speech/DOMWindowSpeechSynthesis.cpp:
+        * Modules/speech/SpeechSynthesis.cpp:
+        (WebCore::SpeechSynthesis::getVoices):
+        (WebCore::SpeechSynthesis::startSpeakingImmediately):
+        (WebCore::SpeechSynthesis::speak):
+        (WebCore::SpeechSynthesis::cancel):
+        (WebCore::SpeechSynthesis::handleSpeakingCompleted):
+        (WebCore::SpeechSynthesis::boundaryEventOccurred):
+        (WebCore::SpeechSynthesis::didStartSpeaking):
+        (WebCore::SpeechSynthesis::didPauseSpeaking):
+        (WebCore::SpeechSynthesis::didResumeSpeaking):
+        (WebCore::SpeechSynthesis::didFinishSpeaking):
+        (WebCore::SpeechSynthesis::speakingErrorOccurred):
+        * Modules/speech/SpeechSynthesis.h:
+        * Modules/speech/SpeechSynthesisEvent.h:
+        * Modules/speech/SpeechSynthesisUtterance.h:
+        * Modules/speech/SpeechSynthesisVoice.cpp:
+        (WebCore::SpeechSynthesisVoice::create):
+        (WebCore::SpeechSynthesisVoice::SpeechSynthesisVoice):
+        * Modules/speech/SpeechSynthesisVoice.h:
+        * platform/PlatformSpeechSynthesizer.h:
+        * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
+        (WebCore::PlatformSpeechSynthesisProviderEfl::fireSpeechEvent):
+        * platform/mock/PlatformSpeechSynthesizerMock.cpp:
+        (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
+        (WebCore::PlatformSpeechSynthesizerMock::speak):
+        (WebCore::PlatformSpeechSynthesizerMock::cancel):
+        (WebCore::PlatformSpeechSynthesizerMock::pause):
+        (WebCore::PlatformSpeechSynthesizerMock::resume):
+
</ins><span class="cx"> 2016-07-16  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebKit API] Add SPI to track multiple navigations caused by a single user gesture
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaCDMh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/CDM.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/CDM.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/encryptedmedia/CDM.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include &quot;CDMSession.h&quot;
</span><span class="cx"> #include &lt;runtime/Uint8Array.h&gt;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeySessionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #include &quot;Timer.h&quot;
</span><span class="cx"> #include &lt;runtime/Uint8Array.h&gt;
</span><span class="cx"> #include &lt;wtf/Deque.h&gt;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -71,7 +70,7 @@
</span><span class="cx">     using RefCounted&lt;MediaKeySession&gt;::ref;
</span><span class="cx">     using RefCounted&lt;MediaKeySession&gt;::deref;
</span><span class="cx"> 
</span><del>-    void enqueueEvent(PassRefPtr&lt;Event&gt;);
</del><ins>+    void enqueueEvent(RefPtr&lt;Event&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     EventTargetInterface eventTargetInterface() const override { return MediaKeySessionEventTargetInterfaceType; }
</span><span class="cx">     ScriptExecutionContext* scriptExecutionContext() const override { return ActiveDOMObject::scriptExecutionContext(); }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeysh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;EventTarget.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &lt;runtime/Uint8Array.h&gt;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaDOMWindowQuotacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/DOMWindowQuota.cpp (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/DOMWindowQuota.cpp        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/quota/DOMWindowQuota.cpp        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;StorageInfo.h&quot;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaStorageErrorCallbackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/StorageErrorCallback.cpp (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/StorageErrorCallback.cpp        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/quota/StorageErrorCallback.cpp        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-StorageErrorCallback::CallbackTask::CallbackTask(PassRefPtr&lt;StorageErrorCallback&gt; callback, ExceptionCode ec)
</del><ins>+StorageErrorCallback::CallbackTask::CallbackTask(RefPtr&lt;StorageErrorCallback&gt;&amp;&amp; callback, ExceptionCode ec)
</ins><span class="cx">     : ScriptExecutionContext::Task([callback, ec] (ScriptExecutionContext*) {
</span><span class="cx">         if (callback)
</span><span class="cx">             callback-&gt;handleEvent(DOMCoreException::create(ExceptionCodeDescription(ec)).get());
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaStorageErrorCallbackh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/StorageErrorCallback.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/StorageErrorCallback.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/quota/StorageErrorCallback.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> 
</span><span class="cx">     class CallbackTask : public ScriptExecutionContext::Task {
</span><span class="cx">     public:
</span><del>-        CallbackTask(PassRefPtr&lt;StorageErrorCallback&gt;, ExceptionCode);
</del><ins>+        CallbackTask(StorageErrorCallback*, ExceptionCode);
</ins><span class="cx"> 
</span><span class="cx">     private:
</span><span class="cx">         RefPtr&lt;StorageErrorCallback&gt; m_callback;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaStorageInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/StorageInfo.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/StorageInfo.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/quota/StorageInfo.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(QUOTA)
</span><span class="cx"> 
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaStorageQuotah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/StorageQuota.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/StorageQuota.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/quota/StorageQuota.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(QUOTA)
</span><span class="cx"> 
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesspeechDOMWindowSpeechSynthesiscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.cpp (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.cpp        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.cpp        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -34,10 +34,9 @@
</span><span class="cx"> #if ENABLE(SPEECH_SYNTHESIS)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><del>-    
</del><ins>+
</ins><span class="cx"> DOMWindowSpeechSynthesis::DOMWindowSpeechSynthesis(DOMWindow* window)
</span><span class="cx">     : DOMWindowProperty(window-&gt;frame())
</span><span class="cx"> {
</span><span class="lines">@@ -76,7 +75,7 @@
</span><span class="cx">         m_speechSynthesis = SpeechSynthesis::create();
</span><span class="cx">     return m_speechSynthesis.get();
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(SPEECH_SYNTHESIS)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesspeechSpeechSynthesiscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -38,12 +38,12 @@
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><del>-    
</del><ins>+
</ins><span class="cx"> Ref&lt;SpeechSynthesis&gt; SpeechSynthesis::create()
</span><span class="cx"> {
</span><span class="cx">     return adoptRef(*new SpeechSynthesis);
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> SpeechSynthesis::SpeechSynthesis()
</span><span class="cx">     : m_currentSpeechUtterance(nullptr)
</span><span class="cx">     , m_isPaused(false)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> void SpeechSynthesis::setPlatformSynthesizer(std::unique_ptr&lt;PlatformSpeechSynthesizer&gt; synthesizer)
</span><span class="cx"> {
</span><span class="cx">     m_platformSpeechSynthesizer = WTFMove(synthesizer);
</span><span class="lines">@@ -61,13 +61,13 @@
</span><span class="cx">     m_utteranceQueue.clear();
</span><span class="cx">     m_isPaused = false;
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> void SpeechSynthesis::voicesDidChange()
</span><span class="cx"> {
</span><span class="cx">     m_voiceList.clear();
</span><span class="cx"> }
</span><del>-    
-const Vector&lt;RefPtr&lt;SpeechSynthesisVoice&gt;&gt;&amp; SpeechSynthesis::getVoices()
</del><ins>+
+const Vector&lt;Ref&lt;SpeechSynthesisVoice&gt;&gt;&amp; SpeechSynthesis::getVoices()
</ins><span class="cx"> {
</span><span class="cx">     if (m_voiceList.size())
</span><span class="cx">         return m_voiceList;
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> 
</span><span class="cx">     // If the voiceList is empty, that's the cue to get the voices from the platform again.
</span><span class="cx">     for (auto&amp; voice : m_platformSpeechSynthesizer-&gt;voiceList())
</span><del>-        m_voiceList.append(SpeechSynthesisVoice::create(voice));
</del><ins>+        m_voiceList.append(SpeechSynthesisVoice::create(*voice));
</ins><span class="cx"> 
</span><span class="cx">     return m_voiceList;
</span><span class="cx"> }
</span><span class="lines">@@ -107,13 +107,13 @@
</span><span class="cx">     utterance.setStartTime(monotonicallyIncreasingTime());
</span><span class="cx">     m_currentSpeechUtterance = &amp;utterance;
</span><span class="cx">     m_isPaused = false;
</span><del>-    
</del><ins>+
</ins><span class="cx">     // Zero lengthed strings should immediately notify that the event is complete.
</span><span class="cx">     if (utterance.text().isEmpty()) {
</span><span class="cx">         handleSpeakingCompleted(utterance, false);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     if (!m_platformSpeechSynthesizer)
</span><span class="cx">         m_platformSpeechSynthesizer = std::make_unique&lt;PlatformSpeechSynthesizer&gt;(this);
</span><span class="cx">     m_platformSpeechSynthesizer-&gt;speak(utterance.platformUtterance());
</span><span class="lines">@@ -128,9 +128,9 @@
</span><span class="cx">     else if (userGestureRequiredForSpeechStart())
</span><span class="cx">         return;
</span><span class="cx"> #endif
</span><del>-    
</del><ins>+
</ins><span class="cx">     m_utteranceQueue.append(utterance);
</span><del>-    
</del><ins>+
</ins><span class="cx">     // If the queue was empty, speak this immediately and add it to the queue.
</span><span class="cx">     if (m_utteranceQueue.size() == 1)
</span><span class="cx">         startSpeakingImmediately(m_utteranceQueue.first());
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">     if (m_platformSpeechSynthesizer)
</span><span class="cx">         m_platformSpeechSynthesizer-&gt;cancel();
</span><span class="cx">     current = nullptr;
</span><del>-    
</del><ins>+
</ins><span class="cx">     // The platform should have called back immediately and cleared the current utterance.
</span><span class="cx">     ASSERT(!m_currentSpeechUtterance);
</span><span class="cx"> }
</span><span class="lines">@@ -166,12 +166,12 @@
</span><span class="cx"> {
</span><span class="cx">     utterance.dispatchEvent(SpeechSynthesisEvent::create(type, charIndex, (monotonicallyIncreasingTime() - utterance.startTime()), name));
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> void SpeechSynthesis::handleSpeakingCompleted(SpeechSynthesisUtterance&amp; utterance, bool errorOccurred)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_currentSpeechUtterance);
</span><span class="cx">     Ref&lt;SpeechSynthesisUtterance&gt; protect(utterance);
</span><del>-    
</del><ins>+
</ins><span class="cx">     m_currentSpeechUtterance = nullptr;
</span><span class="cx"> 
</span><span class="cx">     fireEvent(errorOccurred ? eventNames().errorEvent : eventNames().endEvent, utterance, 0, String());
</span><span class="lines">@@ -185,21 +185,20 @@
</span><span class="cx">             startSpeakingImmediately(m_utteranceQueue.first());
</span><span class="cx">     }
</span><span class="cx"> }
</span><del>-    
-void SpeechSynthesis::boundaryEventOccurred(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt; utterance, SpeechBoundary boundary, unsigned charIndex)
</del><ins>+
+void SpeechSynthesis::boundaryEventOccurred(PlatformSpeechSynthesisUtterance&amp; utterance, SpeechBoundary boundary, unsigned charIndex)
</ins><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;const String&gt; wordBoundaryString(ASCIILiteral(&quot;word&quot;));
</span><span class="cx">     static NeverDestroyed&lt;const String&gt; sentenceBoundaryString(ASCIILiteral(&quot;sentence&quot;));
</span><span class="cx"> 
</span><del>-    ASSERT(utterance);
-    ASSERT(utterance-&gt;client());
</del><ins>+    ASSERT(utterance.client());
</ins><span class="cx"> 
</span><span class="cx">     switch (boundary) {
</span><span class="cx">     case SpeechWordBoundary:
</span><del>-        fireEvent(eventNames().boundaryEvent, static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance-&gt;client()), charIndex, wordBoundaryString);
</del><ins>+        fireEvent(eventNames().boundaryEvent, static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance.client()), charIndex, wordBoundaryString);
</ins><span class="cx">         break;
</span><span class="cx">     case SpeechSentenceBoundary:
</span><del>-        fireEvent(eventNames().boundaryEvent, static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance-&gt;client()), charIndex, sentenceBoundaryString);
</del><ins>+        fireEvent(eventNames().boundaryEvent, static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance.client()), charIndex, sentenceBoundaryString);
</ins><span class="cx">         break;
</span><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="lines">@@ -206,36 +205,36 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SpeechSynthesis::didStartSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt; utterance)
</del><ins>+void SpeechSynthesis::didStartSpeaking(PlatformSpeechSynthesisUtterance&amp; utterance)
</ins><span class="cx"> {
</span><del>-    if (utterance-&gt;client())
-        fireEvent(eventNames().startEvent, static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance-&gt;client()), 0, String());
</del><ins>+    if (utterance.client())
+        fireEvent(eventNames().startEvent, static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance.client()), 0, String());
</ins><span class="cx"> }
</span><del>-    
-void SpeechSynthesis::didPauseSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt; utterance)
</del><ins>+
+void SpeechSynthesis::didPauseSpeaking(PlatformSpeechSynthesisUtterance&amp; utterance)
</ins><span class="cx"> {
</span><span class="cx">     m_isPaused = true;
</span><del>-    if (utterance-&gt;client())
-        fireEvent(eventNames().pauseEvent, static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance-&gt;client()), 0, String());
</del><ins>+    if (utterance.client())
+        fireEvent(eventNames().pauseEvent, static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance.client()), 0, String());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SpeechSynthesis::didResumeSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt; utterance)
</del><ins>+void SpeechSynthesis::didResumeSpeaking(PlatformSpeechSynthesisUtterance&amp; utterance)
</ins><span class="cx"> {
</span><span class="cx">     m_isPaused = false;
</span><del>-    if (utterance-&gt;client())
-        fireEvent(eventNames().resumeEvent, static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance-&gt;client()), 0, String());
</del><ins>+    if (utterance.client())
+        fireEvent(eventNames().resumeEvent, static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance.client()), 0, String());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SpeechSynthesis::didFinishSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt; utterance)
</del><ins>+void SpeechSynthesis::didFinishSpeaking(PlatformSpeechSynthesisUtterance&amp; utterance)
</ins><span class="cx"> {
</span><del>-    if (utterance-&gt;client())
-        handleSpeakingCompleted(static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance-&gt;client()), false);
</del><ins>+    if (utterance.client())
+        handleSpeakingCompleted(static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance.client()), false);
</ins><span class="cx"> }
</span><del>-    
-void SpeechSynthesis::speakingErrorOccurred(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt; utterance)
</del><ins>+
+void SpeechSynthesis::speakingErrorOccurred(PlatformSpeechSynthesisUtterance&amp; utterance)
</ins><span class="cx"> {
</span><del>-    if (utterance-&gt;client())
-        handleSpeakingCompleted(static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance-&gt;client()), true);
</del><ins>+    if (utterance.client())
+        handleSpeakingCompleted(static_cast&lt;SpeechSynthesisUtterance&amp;&gt;(*utterance.client()), true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesspeechSpeechSynthesish"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/speech/SpeechSynthesis.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/speech/SpeechSynthesis.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/speech/SpeechSynthesis.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -34,49 +34,48 @@
</span><span class="cx"> #include &quot;SpeechSynthesisUtterance.h&quot;
</span><span class="cx"> #include &quot;SpeechSynthesisVoice.h&quot;
</span><span class="cx"> #include &lt;wtf/Deque.h&gt;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><del>-    
</del><ins>+
</ins><span class="cx"> class PlatformSpeechSynthesizerClient;
</span><span class="cx"> class SpeechSynthesisVoice;
</span><del>-    
</del><ins>+
</ins><span class="cx"> class SpeechSynthesis : public PlatformSpeechSynthesizerClient, public RefCounted&lt;SpeechSynthesis&gt; {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;SpeechSynthesis&gt; create();
</span><del>-    
</del><ins>+
</ins><span class="cx">     bool pending() const;
</span><span class="cx">     bool speaking() const;
</span><span class="cx">     bool paused() const;
</span><del>-    
</del><ins>+
</ins><span class="cx">     void speak(SpeechSynthesisUtterance&amp;);
</span><span class="cx">     void cancel();
</span><span class="cx">     void pause();
</span><span class="cx">     void resume();
</span><del>-    
-    const Vector&lt;RefPtr&lt;SpeechSynthesisVoice&gt;&gt;&amp; getVoices();
-    
</del><ins>+
+    const Vector&lt;Ref&lt;SpeechSynthesisVoice&gt;&gt;&amp; getVoices();
+
</ins><span class="cx">     // Used in testing to use a mock platform synthesizer
</span><span class="cx">     WEBCORE_EXPORT void setPlatformSynthesizer(std::unique_ptr&lt;PlatformSpeechSynthesizer&gt;);
</span><del>-    
</del><ins>+
</ins><span class="cx"> private:
</span><span class="cx">     SpeechSynthesis();
</span><del>-    
</del><ins>+
</ins><span class="cx">     // PlatformSpeechSynthesizerClient override methods.
</span><span class="cx">     void voicesDidChange() override;
</span><del>-    void didStartSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) override;
-    void didPauseSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) override;
-    void didResumeSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) override;
-    void didFinishSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) override;
-    void speakingErrorOccurred(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) override;
-    void boundaryEventOccurred(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;, SpeechBoundary, unsigned charIndex) override;
</del><ins>+    void didStartSpeaking(PlatformSpeechSynthesisUtterance&amp;) override;
+    void didPauseSpeaking(PlatformSpeechSynthesisUtterance&amp;) override;
+    void didResumeSpeaking(PlatformSpeechSynthesisUtterance&amp;) override;
+    void didFinishSpeaking(PlatformSpeechSynthesisUtterance&amp;) override;
+    void speakingErrorOccurred(PlatformSpeechSynthesisUtterance&amp;) override;
+    void boundaryEventOccurred(PlatformSpeechSynthesisUtterance&amp;, SpeechBoundary, unsigned charIndex) override;
</ins><span class="cx"> 
</span><span class="cx">     void startSpeakingImmediately(SpeechSynthesisUtterance&amp;);
</span><span class="cx">     void handleSpeakingCompleted(SpeechSynthesisUtterance&amp;, bool errorOccurred);
</span><span class="cx">     void fireEvent(const AtomicString&amp; type, SpeechSynthesisUtterance&amp;, unsigned long charIndex, const String&amp; name);
</span><del>-    
</del><ins>+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     // Restrictions to change default behaviors.
</span><span class="cx">     enum BehaviorRestrictionFlags {
</span><span class="lines">@@ -84,12 +83,12 @@
</span><span class="cx">         RequireUserGestureForSpeechStartRestriction = 1 &lt;&lt; 0,
</span><span class="cx">     };
</span><span class="cx">     typedef unsigned BehaviorRestrictions;
</span><del>-    
</del><ins>+
</ins><span class="cx">     bool userGestureRequiredForSpeechStart() const { return m_restrictions &amp; RequireUserGestureForSpeechStartRestriction; }
</span><span class="cx">     void removeBehaviorRestriction(BehaviorRestrictions restriction) { m_restrictions &amp;= ~restriction; }
</span><span class="cx"> #endif
</span><span class="cx">     std::unique_ptr&lt;PlatformSpeechSynthesizer&gt; m_platformSpeechSynthesizer;
</span><del>-    Vector&lt;RefPtr&lt;SpeechSynthesisVoice&gt;&gt; m_voiceList;
</del><ins>+    Vector&lt;Ref&lt;SpeechSynthesisVoice&gt;&gt; m_voiceList;
</ins><span class="cx">     SpeechSynthesisUtterance* m_currentSpeechUtterance;
</span><span class="cx">     Deque&lt;Ref&lt;SpeechSynthesisUtterance&gt;&gt; m_utteranceQueue;
</span><span class="cx">     bool m_isPaused;
</span><span class="lines">@@ -97,7 +96,7 @@
</span><span class="cx">     BehaviorRestrictions m_restrictions;
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><del>-    
</del><ins>+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(SPEECH_SYNTHESIS)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesspeechSpeechSynthesisEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/speech/SpeechSynthesisEvent.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/speech/SpeechSynthesisEvent.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/speech/SpeechSynthesisEvent.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -29,20 +29,19 @@
</span><span class="cx"> #if ENABLE(SPEECH_SYNTHESIS)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Event.h&quot;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><del>-    
</del><ins>+
</ins><span class="cx"> class SpeechSynthesisEvent : public Event {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;SpeechSynthesisEvent&gt; create(const AtomicString&amp; type, unsigned charIndex, float elapsedTime, const String&amp; name);
</span><del>-    
</del><ins>+
</ins><span class="cx">     unsigned long charIndex() const { return m_charIndex; }
</span><span class="cx">     float elapsedTime() const { return m_elapsedTime; }
</span><span class="cx">     const String&amp; name() const { return m_name; }
</span><del>-    
</del><ins>+
</ins><span class="cx">     virtual EventInterface eventInterface() const { return SpeechSynthesisEventInterfaceType; }
</span><del>-    
</del><ins>+
</ins><span class="cx"> private:
</span><span class="cx">     SpeechSynthesisEvent(const AtomicString&amp; type, unsigned charIndex, float elapsedTime, const String&amp; name);
</span><span class="cx"> 
</span><span class="lines">@@ -50,7 +49,7 @@
</span><span class="cx">     float m_elapsedTime;
</span><span class="cx">     String m_name;
</span><span class="cx"> };
</span><del>-    
</del><ins>+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(SPEECH_SYNTHESIS)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesspeechSpeechSynthesisUtteranceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/speech/SpeechSynthesisUtterance.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/speech/SpeechSynthesisUtterance.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/speech/SpeechSynthesisUtterance.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;EventTarget.h&quot;
</span><span class="cx"> #include &quot;PlatformSpeechSynthesisUtterance.h&quot;
</span><span class="cx"> #include &quot;SpeechSynthesisVoice.h&quot;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -40,7 +39,7 @@
</span><span class="cx"> class SpeechSynthesisUtterance final : public PlatformSpeechSynthesisUtteranceClient, public RefCounted&lt;SpeechSynthesisUtterance&gt;, public ContextDestructionObserver, public EventTargetWithInlineData {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;SpeechSynthesisUtterance&gt; create(ScriptExecutionContext&amp;, const String&amp;);
</span><del>-    
</del><ins>+
</ins><span class="cx">     ~SpeechSynthesisUtterance();
</span><span class="cx"> 
</span><span class="cx">     const String&amp; text() const { return m_platformUtterance-&gt;text(); }
</span><span class="lines">@@ -63,7 +62,7 @@
</span><span class="cx"> 
</span><span class="cx">     double startTime() const { return m_platformUtterance-&gt;startTime(); }
</span><span class="cx">     void setStartTime(double startTime) { m_platformUtterance-&gt;setStartTime(startTime); }
</span><del>-    
</del><ins>+
</ins><span class="cx">     using RefCounted&lt;SpeechSynthesisUtterance&gt;::ref;
</span><span class="cx">     using RefCounted&lt;SpeechSynthesisUtterance&gt;::deref;
</span><span class="cx"> 
</span><span class="lines">@@ -80,7 +79,7 @@
</span><span class="cx">     void refEventTarget() override { ref(); }
</span><span class="cx">     void derefEventTarget() override { deref(); }
</span><span class="cx"> };
</span><del>-    
</del><ins>+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(SPEECH_SYNTHESIS)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesspeechSpeechSynthesisVoicecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/speech/SpeechSynthesisVoice.cpp (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/speech/SpeechSynthesisVoice.cpp        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/speech/SpeechSynthesisVoice.cpp        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -29,17 +29,17 @@
</span><span class="cx"> #if ENABLE(SPEECH_SYNTHESIS)
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><del>-    
-Ref&lt;SpeechSynthesisVoice&gt; SpeechSynthesisVoice::create(PassRefPtr&lt;PlatformSpeechSynthesisVoice&gt; voice)
</del><ins>+
+Ref&lt;SpeechSynthesisVoice&gt; SpeechSynthesisVoice::create(PlatformSpeechSynthesisVoice&amp; voice)
</ins><span class="cx"> {
</span><span class="cx">     return adoptRef(*new SpeechSynthesisVoice(voice));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-SpeechSynthesisVoice::SpeechSynthesisVoice(PassRefPtr&lt;PlatformSpeechSynthesisVoice&gt; voice)
</del><ins>+SpeechSynthesisVoice::SpeechSynthesisVoice(PlatformSpeechSynthesisVoice&amp; voice)
</ins><span class="cx">     : m_platformVoice(voice)
</span><span class="cx"> {
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(SPEECH_SYNTHESIS)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesspeechSpeechSynthesisVoiceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/speech/SpeechSynthesisVoice.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/speech/SpeechSynthesisVoice.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/Modules/speech/SpeechSynthesisVoice.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #if ENABLE(SPEECH_SYNTHESIS)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;PlatformSpeechSynthesisVoice.h&quot;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -38,20 +37,20 @@
</span><span class="cx"> class SpeechSynthesisVoice : public RefCounted&lt;SpeechSynthesisVoice&gt; {
</span><span class="cx"> public:
</span><span class="cx">     virtual ~SpeechSynthesisVoice() { }
</span><del>-    static Ref&lt;SpeechSynthesisVoice&gt; create(PassRefPtr&lt;PlatformSpeechSynthesisVoice&gt;);
-    
</del><ins>+    static Ref&lt;SpeechSynthesisVoice&gt; create(PlatformSpeechSynthesisVoice&amp;);
+
</ins><span class="cx">     const String&amp; voiceURI() const { return m_platformVoice-&gt;voiceURI(); }
</span><span class="cx">     const String&amp; name() const { return m_platformVoice-&gt;name(); }
</span><span class="cx">     const String&amp; lang() const { return m_platformVoice-&gt;lang(); }
</span><span class="cx">     bool localService() const { return m_platformVoice-&gt;localService(); }
</span><span class="cx">     bool isDefault() const { return m_platformVoice-&gt;isDefault(); }
</span><del>-    
-    PlatformSpeechSynthesisVoice* platformVoice() const { return m_platformVoice.get(); }
</del><span class="cx"> 
</span><ins>+    PlatformSpeechSynthesisVoice* platformVoice() { return m_platformVoice.ptr(); }
+
</ins><span class="cx"> private:
</span><del>-    explicit SpeechSynthesisVoice(PassRefPtr&lt;PlatformSpeechSynthesisVoice&gt;);
-    
-    RefPtr&lt;PlatformSpeechSynthesisVoice&gt; m_platformVoice;
</del><ins>+    explicit SpeechSynthesisVoice(PlatformSpeechSynthesisVoice&amp;);
+
+    Ref&lt;PlatformSpeechSynthesisVoice&gt; m_platformVoice;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformPlatformSpeechSynthesizerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/PlatformSpeechSynthesizer.h (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/PlatformSpeechSynthesizer.h        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/platform/PlatformSpeechSynthesizer.h        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -53,12 +53,12 @@
</span><span class="cx"> 
</span><span class="cx"> class PlatformSpeechSynthesizerClient {
</span><span class="cx"> public:
</span><del>-    virtual void didStartSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) = 0;
-    virtual void didFinishSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) = 0;
-    virtual void didPauseSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) = 0;
-    virtual void didResumeSpeaking(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) = 0;
-    virtual void speakingErrorOccurred(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) = 0;
-    virtual void boundaryEventOccurred(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;, SpeechBoundary, unsigned charIndex) = 0;
</del><ins>+    virtual void didStartSpeaking(PlatformSpeechSynthesisUtterance&amp;) = 0;
+    virtual void didFinishSpeaking(PlatformSpeechSynthesisUtterance&amp;) = 0;
+    virtual void didPauseSpeaking(PlatformSpeechSynthesisUtterance&amp;) = 0;
+    virtual void didResumeSpeaking(PlatformSpeechSynthesisUtterance&amp;) = 0;
+    virtual void speakingErrorOccurred(PlatformSpeechSynthesisUtterance&amp;) = 0;
+    virtual void boundaryEventOccurred(PlatformSpeechSynthesisUtterance&amp;, SpeechBoundary, unsigned charIndex) = 0;
</ins><span class="cx">     virtual void voicesDidChange() = 0;
</span><span class="cx"> protected:
</span><span class="cx">     virtual ~PlatformSpeechSynthesizerClient() { }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflPlatformSpeechSynthesisProviderEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -177,20 +177,22 @@
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesisProviderEfl::fireSpeechEvent(SpeechEvent speechEvent)
</span><span class="cx"> {
</span><ins>+    ASSERT(m_utterance);
+
</ins><span class="cx">     switch (speechEvent) {
</span><span class="cx">     case SpeechStart:
</span><del>-        m_platformSpeechSynthesizer-&gt;client()-&gt;didStartSpeaking(m_utterance);
</del><ins>+        m_platformSpeechSynthesizer-&gt;client()-&gt;didStartSpeaking(*m_utterance);
</ins><span class="cx">         break;
</span><span class="cx">     case SpeechPause:
</span><del>-        m_platformSpeechSynthesizer-&gt;client()-&gt;didPauseSpeaking(m_utterance);
</del><ins>+        m_platformSpeechSynthesizer-&gt;client()-&gt;didPauseSpeaking(*m_utterance);
</ins><span class="cx">         break;
</span><span class="cx">     case SpeechResume:
</span><del>-        m_platformSpeechSynthesizer-&gt;client()-&gt;didResumeSpeaking(m_utterance);
</del><ins>+        m_platformSpeechSynthesizer-&gt;client()-&gt;didResumeSpeaking(*m_utterance);
</ins><span class="cx">         break;
</span><span class="cx">     case SpeechError:
</span><span class="cx">         m_isEngineStarted = false;
</span><span class="cx">     case SpeechCancel:
</span><del>-        m_platformSpeechSynthesizer-&gt;client()-&gt;speakingErrorOccurred(m_utterance);
</del><ins>+        m_platformSpeechSynthesizer-&gt;client()-&gt;speakingErrorOccurred(*m_utterance);
</ins><span class="cx">         break;
</span><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformiosPlatformSpeechSynthesizerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx">     if (!m_utterance)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_synthesizerObject-&gt;client()-&gt;didStartSpeaking(m_utterance);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;didStartSpeaking(*m_utterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer didFinishSpeechUtterance:(AVSpeechUtterance *)utterance
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx">     RefPtr&lt;WebCore::PlatformSpeechSynthesisUtterance&gt; platformUtterance = m_utterance;
</span><span class="cx">     m_utterance = nullptr;
</span><span class="cx"> 
</span><del>-    m_synthesizerObject-&gt;client()-&gt;didFinishSpeaking(platformUtterance);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;didFinishSpeaking(*platformUtterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer didPauseSpeechUtterance:(AVSpeechUtterance *)utterance
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx">     if (!m_utterance)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_synthesizerObject-&gt;client()-&gt;didPauseSpeaking(m_utterance);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;didPauseSpeaking(*m_utterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer didContinueSpeechUtterance:(AVSpeechUtterance *)utterance
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx">     if (!m_utterance)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_synthesizerObject-&gt;client()-&gt;didResumeSpeaking(m_utterance);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;didResumeSpeaking(*m_utterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer didCancelSpeechUtterance:(AVSpeechUtterance *)utterance
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx">     RefPtr&lt;WebCore::PlatformSpeechSynthesisUtterance&gt; platformUtterance = m_utterance;
</span><span class="cx">     m_utterance = nullptr;
</span><span class="cx"> 
</span><del>-    m_synthesizerObject-&gt;client()-&gt;didFinishSpeaking(platformUtterance);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;didFinishSpeaking(*platformUtterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer willSpeakRangeOfSpeechString:(NSRange)characterRange utterance:(AVSpeechUtterance *)utterance
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // iOS only supports word boundaries.
</span><del>-    m_synthesizerObject-&gt;client()-&gt;boundaryEventOccurred(m_utterance, WebCore::SpeechWordBoundary, characterRange.location);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;boundaryEventOccurred(*m_utterance, WebCore::SpeechWordBoundary, characterRange.location);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacPlatformSpeechSynthesizerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_utterance = utterance;
</span><span class="cx">     [m_synthesizer startSpeakingString:utterance-&gt;text()];
</span><del>-    m_synthesizerObject-&gt;client()-&gt;didStartSpeaking(utterance);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;didStartSpeaking(*m_utterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)pause
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     [m_synthesizer pauseSpeakingAtBoundary:NSSpeechImmediateBoundary];
</span><del>-    m_synthesizerObject-&gt;client()-&gt;didPauseSpeaking(m_utterance);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;didPauseSpeaking(*m_utterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)resume
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     [m_synthesizer continueSpeaking];
</span><del>-    m_synthesizerObject-&gt;client()-&gt;didResumeSpeaking(m_utterance);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;didResumeSpeaking(*m_utterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)cancel
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     [m_synthesizer stopSpeakingAtBoundary:NSSpeechImmediateBoundary];
</span><del>-    m_synthesizerObject-&gt;client()-&gt;speakingErrorOccurred(m_utterance);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;speakingErrorOccurred(*m_utterance);
</ins><span class="cx">     m_utterance = 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -183,9 +183,9 @@
</span><span class="cx">     m_utterance = 0;
</span><span class="cx"> 
</span><span class="cx">     if (finishedSpeaking)
</span><del>-        m_synthesizerObject-&gt;client()-&gt;didFinishSpeaking(utterance);
</del><ins>+        m_synthesizerObject-&gt;client()-&gt;didFinishSpeaking(*utterance);
</ins><span class="cx">     else
</span><del>-        m_synthesizerObject-&gt;client()-&gt;speakingErrorOccurred(utterance);
</del><ins>+        m_synthesizerObject-&gt;client()-&gt;speakingErrorOccurred(*utterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)speechSynthesizer:(NSSpeechSynthesizer *)sender willSpeakWord:(NSRange)characterRange ofString:(NSString *)string
</span><span class="lines">@@ -197,7 +197,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // Mac platform only supports word boundaries.
</span><del>-    m_synthesizerObject-&gt;client()-&gt;boundaryEventOccurred(m_utterance, WebCore::SpeechWordBoundary, characterRange.location);
</del><ins>+    m_synthesizerObject-&gt;client()-&gt;boundaryEventOccurred(*m_utterance, WebCore::SpeechWordBoundary, characterRange.location);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmockPlatformSpeechSynthesizerMockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.cpp (203339 => 203340)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.cpp        2016-07-18 06:08:04 UTC (rev 203339)
+++ trunk/Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.cpp        2016-07-18 06:13:28 UTC (rev 203340)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     RefPtr&lt;PlatformSpeechSynthesisUtterance&gt; protect(m_utterance);
</span><span class="cx">     m_utterance = nullptr;
</span><span class="cx"> 
</span><del>-    client()-&gt;didFinishSpeaking(protect);
</del><ins>+    client()-&gt;didFinishSpeaking(*protect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesizerMock::initializeVoiceList()
</span><span class="lines">@@ -61,11 +61,11 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_utterance);
</span><span class="cx">     m_utterance = WTFMove(utterance);
</span><del>-    client()-&gt;didStartSpeaking(m_utterance);
</del><ins>+    client()-&gt;didStartSpeaking(*m_utterance);
</ins><span class="cx"> 
</span><span class="cx">     // Fire a fake word and then sentence boundary event.
</span><del>-    client()-&gt;boundaryEventOccurred(m_utterance, SpeechWordBoundary, 0);
-    client()-&gt;boundaryEventOccurred(m_utterance, SpeechSentenceBoundary, m_utterance-&gt;text().length());
</del><ins>+    client()-&gt;boundaryEventOccurred(*m_utterance, SpeechWordBoundary, 0);
+    client()-&gt;boundaryEventOccurred(*m_utterance, SpeechSentenceBoundary, m_utterance-&gt;text().length());
</ins><span class="cx"> 
</span><span class="cx">     // Give the fake speech job some time so that pause and other functions have time to be called.
</span><span class="cx">     m_speakingFinishedTimer.startOneShot(.1);
</span><span class="lines">@@ -77,18 +77,18 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_speakingFinishedTimer.stop();
</span><del>-    client()-&gt;speakingErrorOccurred(m_utterance);
</del><ins>+    client()-&gt;speakingErrorOccurred(*m_utterance);
</ins><span class="cx">     m_utterance = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesizerMock::pause()
</span><span class="cx"> {
</span><del>-    client()-&gt;didPauseSpeaking(m_utterance);
</del><ins>+    client()-&gt;didPauseSpeaking(*m_utterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesizerMock::resume()
</span><span class="cx"> {
</span><del>-    client()-&gt;didResumeSpeaking(m_utterance);
</del><ins>+    client()-&gt;didResumeSpeaking(*m_utterance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre>
</div>
</div>

</body>
</html>