<!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 <gyuyoung.kim@webkit.org>
+
+ 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 <sam@webkit.org>
</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 "CDMSession.h"
</span><span class="cx"> #include <runtime/Uint8Array.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/text/WTFString.h>
</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 "Timer.h"
</span><span class="cx"> #include <runtime/Uint8Array.h>
</span><span class="cx"> #include <wtf/Deque.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="lines">@@ -71,7 +70,7 @@
</span><span class="cx"> using RefCounted<MediaKeySession>::ref;
</span><span class="cx"> using RefCounted<MediaKeySession>::deref;
</span><span class="cx">
</span><del>- void enqueueEvent(PassRefPtr<Event>);
</del><ins>+ void enqueueEvent(RefPtr<Event>&&);
</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 "EventTarget.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><span class="cx"> #include <runtime/Uint8Array.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</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 "Document.h"
</span><span class="cx"> #include "Frame.h"
</span><span class="cx"> #include "StorageInfo.h"
</span><del>-#include <wtf/PassRefPtr.h>
</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<StorageErrorCallback> callback, ExceptionCode ec)
</del><ins>+StorageErrorCallback::CallbackTask::CallbackTask(RefPtr<StorageErrorCallback>&& callback, ExceptionCode ec)
</ins><span class="cx"> : ScriptExecutionContext::Task([callback, ec] (ScriptExecutionContext*) {
</span><span class="cx"> if (callback)
</span><span class="cx"> callback->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<StorageErrorCallback>, ExceptionCode);
</del><ins>+ CallbackTask(StorageErrorCallback*, ExceptionCode);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> RefPtr<StorageErrorCallback> 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 <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</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 <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</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 "DOMWindow.h"
</span><del>-#include <wtf/PassRefPtr.h>
</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->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 <wtf/NeverDestroyed.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><del>-
</del><ins>+
</ins><span class="cx"> Ref<SpeechSynthesis> 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<PlatformSpeechSynthesizer> 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<RefPtr<SpeechSynthesisVoice>>& SpeechSynthesis::getVoices()
</del><ins>+
+const Vector<Ref<SpeechSynthesisVoice>>& 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& voice : m_platformSpeechSynthesizer->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 = &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<PlatformSpeechSynthesizer>(this);
</span><span class="cx"> m_platformSpeechSynthesizer->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->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& utterance, bool errorOccurred)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_currentSpeechUtterance);
</span><span class="cx"> Ref<SpeechSynthesisUtterance> 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<PlatformSpeechSynthesisUtterance> utterance, SpeechBoundary boundary, unsigned charIndex)
</del><ins>+
+void SpeechSynthesis::boundaryEventOccurred(PlatformSpeechSynthesisUtterance& utterance, SpeechBoundary boundary, unsigned charIndex)
</ins><span class="cx"> {
</span><span class="cx"> static NeverDestroyed<const String> wordBoundaryString(ASCIILiteral("word"));
</span><span class="cx"> static NeverDestroyed<const String> sentenceBoundaryString(ASCIILiteral("sentence"));
</span><span class="cx">
</span><del>- ASSERT(utterance);
- ASSERT(utterance->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<SpeechSynthesisUtterance&>(*utterance->client()), charIndex, wordBoundaryString);
</del><ins>+ fireEvent(eventNames().boundaryEvent, static_cast<SpeechSynthesisUtterance&>(*utterance.client()), charIndex, wordBoundaryString);
</ins><span class="cx"> break;
</span><span class="cx"> case SpeechSentenceBoundary:
</span><del>- fireEvent(eventNames().boundaryEvent, static_cast<SpeechSynthesisUtterance&>(*utterance->client()), charIndex, sentenceBoundaryString);
</del><ins>+ fireEvent(eventNames().boundaryEvent, static_cast<SpeechSynthesisUtterance&>(*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<PlatformSpeechSynthesisUtterance> utterance)
</del><ins>+void SpeechSynthesis::didStartSpeaking(PlatformSpeechSynthesisUtterance& utterance)
</ins><span class="cx"> {
</span><del>- if (utterance->client())
- fireEvent(eventNames().startEvent, static_cast<SpeechSynthesisUtterance&>(*utterance->client()), 0, String());
</del><ins>+ if (utterance.client())
+ fireEvent(eventNames().startEvent, static_cast<SpeechSynthesisUtterance&>(*utterance.client()), 0, String());
</ins><span class="cx"> }
</span><del>-
-void SpeechSynthesis::didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
</del><ins>+
+void SpeechSynthesis::didPauseSpeaking(PlatformSpeechSynthesisUtterance& utterance)
</ins><span class="cx"> {
</span><span class="cx"> m_isPaused = true;
</span><del>- if (utterance->client())
- fireEvent(eventNames().pauseEvent, static_cast<SpeechSynthesisUtterance&>(*utterance->client()), 0, String());
</del><ins>+ if (utterance.client())
+ fireEvent(eventNames().pauseEvent, static_cast<SpeechSynthesisUtterance&>(*utterance.client()), 0, String());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void SpeechSynthesis::didResumeSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
</del><ins>+void SpeechSynthesis::didResumeSpeaking(PlatformSpeechSynthesisUtterance& utterance)
</ins><span class="cx"> {
</span><span class="cx"> m_isPaused = false;
</span><del>- if (utterance->client())
- fireEvent(eventNames().resumeEvent, static_cast<SpeechSynthesisUtterance&>(*utterance->client()), 0, String());
</del><ins>+ if (utterance.client())
+ fireEvent(eventNames().resumeEvent, static_cast<SpeechSynthesisUtterance&>(*utterance.client()), 0, String());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void SpeechSynthesis::didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
</del><ins>+void SpeechSynthesis::didFinishSpeaking(PlatformSpeechSynthesisUtterance& utterance)
</ins><span class="cx"> {
</span><del>- if (utterance->client())
- handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance&>(*utterance->client()), false);
</del><ins>+ if (utterance.client())
+ handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance&>(*utterance.client()), false);
</ins><span class="cx"> }
</span><del>-
-void SpeechSynthesis::speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance)
</del><ins>+
+void SpeechSynthesis::speakingErrorOccurred(PlatformSpeechSynthesisUtterance& utterance)
</ins><span class="cx"> {
</span><del>- if (utterance->client())
- handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance&>(*utterance->client()), true);
</del><ins>+ if (utterance.client())
+ handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance&>(*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 "SpeechSynthesisUtterance.h"
</span><span class="cx"> #include "SpeechSynthesisVoice.h"
</span><span class="cx"> #include <wtf/Deque.h>
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</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<SpeechSynthesis> {
</span><span class="cx"> public:
</span><span class="cx"> static Ref<SpeechSynthesis> 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&);
</span><span class="cx"> void cancel();
</span><span class="cx"> void pause();
</span><span class="cx"> void resume();
</span><del>-
- const Vector<RefPtr<SpeechSynthesisVoice>>& getVoices();
-
</del><ins>+
+ const Vector<Ref<SpeechSynthesisVoice>>& 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<PlatformSpeechSynthesizer>);
</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<PlatformSpeechSynthesisUtterance>) override;
- void didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) override;
- void didResumeSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) override;
- void didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) override;
- void speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>) override;
- void boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>, SpeechBoundary, unsigned charIndex) override;
</del><ins>+ void didStartSpeaking(PlatformSpeechSynthesisUtterance&) override;
+ void didPauseSpeaking(PlatformSpeechSynthesisUtterance&) override;
+ void didResumeSpeaking(PlatformSpeechSynthesisUtterance&) override;
+ void didFinishSpeaking(PlatformSpeechSynthesisUtterance&) override;
+ void speakingErrorOccurred(PlatformSpeechSynthesisUtterance&) override;
+ void boundaryEventOccurred(PlatformSpeechSynthesisUtterance&, SpeechBoundary, unsigned charIndex) override;
</ins><span class="cx">
</span><span class="cx"> void startSpeakingImmediately(SpeechSynthesisUtterance&);
</span><span class="cx"> void handleSpeakingCompleted(SpeechSynthesisUtterance&, bool errorOccurred);
</span><span class="cx"> void fireEvent(const AtomicString& type, SpeechSynthesisUtterance&, unsigned long charIndex, const String& 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 << 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 & RequireUserGestureForSpeechStartRestriction; }
</span><span class="cx"> void removeBehaviorRestriction(BehaviorRestrictions restriction) { m_restrictions &= ~restriction; }
</span><span class="cx"> #endif
</span><span class="cx"> std::unique_ptr<PlatformSpeechSynthesizer> m_platformSpeechSynthesizer;
</span><del>- Vector<RefPtr<SpeechSynthesisVoice>> m_voiceList;
</del><ins>+ Vector<Ref<SpeechSynthesisVoice>> m_voiceList;
</ins><span class="cx"> SpeechSynthesisUtterance* m_currentSpeechUtterance;
</span><span class="cx"> Deque<Ref<SpeechSynthesisUtterance>> 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 "Event.h"
</span><del>-#include <wtf/PassRefPtr.h>
</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<SpeechSynthesisEvent> create(const AtomicString& type, unsigned charIndex, float elapsedTime, const String& 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& 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& type, unsigned charIndex, float elapsedTime, const String& 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 "EventTarget.h"
</span><span class="cx"> #include "PlatformSpeechSynthesisUtterance.h"
</span><span class="cx"> #include "SpeechSynthesisVoice.h"
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</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<SpeechSynthesisUtterance>, public ContextDestructionObserver, public EventTargetWithInlineData {
</span><span class="cx"> public:
</span><span class="cx"> static Ref<SpeechSynthesisUtterance> create(ScriptExecutionContext&, const String&);
</span><del>-
</del><ins>+
</ins><span class="cx"> ~SpeechSynthesisUtterance();
</span><span class="cx">
</span><span class="cx"> const String& text() const { return m_platformUtterance->text(); }
</span><span class="lines">@@ -63,7 +62,7 @@
</span><span class="cx">
</span><span class="cx"> double startTime() const { return m_platformUtterance->startTime(); }
</span><span class="cx"> void setStartTime(double startTime) { m_platformUtterance->setStartTime(startTime); }
</span><del>-
</del><ins>+
</ins><span class="cx"> using RefCounted<SpeechSynthesisUtterance>::ref;
</span><span class="cx"> using RefCounted<SpeechSynthesisUtterance>::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<SpeechSynthesisVoice> SpeechSynthesisVoice::create(PassRefPtr<PlatformSpeechSynthesisVoice> voice)
</del><ins>+
+Ref<SpeechSynthesisVoice> SpeechSynthesisVoice::create(PlatformSpeechSynthesisVoice& 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<PlatformSpeechSynthesisVoice> voice)
</del><ins>+SpeechSynthesisVoice::SpeechSynthesisVoice(PlatformSpeechSynthesisVoice& 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 "PlatformSpeechSynthesisVoice.h"
</span><del>-#include <wtf/PassRefPtr.h>
</del><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="lines">@@ -38,20 +37,20 @@
</span><span class="cx"> class SpeechSynthesisVoice : public RefCounted<SpeechSynthesisVoice> {
</span><span class="cx"> public:
</span><span class="cx"> virtual ~SpeechSynthesisVoice() { }
</span><del>- static Ref<SpeechSynthesisVoice> create(PassRefPtr<PlatformSpeechSynthesisVoice>);
-
</del><ins>+ static Ref<SpeechSynthesisVoice> create(PlatformSpeechSynthesisVoice&);
+
</ins><span class="cx"> const String& voiceURI() const { return m_platformVoice->voiceURI(); }
</span><span class="cx"> const String& name() const { return m_platformVoice->name(); }
</span><span class="cx"> const String& lang() const { return m_platformVoice->lang(); }
</span><span class="cx"> bool localService() const { return m_platformVoice->localService(); }
</span><span class="cx"> bool isDefault() const { return m_platformVoice->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<PlatformSpeechSynthesisVoice>);
-
- RefPtr<PlatformSpeechSynthesisVoice> m_platformVoice;
</del><ins>+ explicit SpeechSynthesisVoice(PlatformSpeechSynthesisVoice&);
+
+ Ref<PlatformSpeechSynthesisVoice> 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<PlatformSpeechSynthesisUtterance>) = 0;
- virtual void didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
- virtual void didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
- virtual void didResumeSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
- virtual void speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>) = 0;
- virtual void boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>, SpeechBoundary, unsigned charIndex) = 0;
</del><ins>+ virtual void didStartSpeaking(PlatformSpeechSynthesisUtterance&) = 0;
+ virtual void didFinishSpeaking(PlatformSpeechSynthesisUtterance&) = 0;
+ virtual void didPauseSpeaking(PlatformSpeechSynthesisUtterance&) = 0;
+ virtual void didResumeSpeaking(PlatformSpeechSynthesisUtterance&) = 0;
+ virtual void speakingErrorOccurred(PlatformSpeechSynthesisUtterance&) = 0;
+ virtual void boundaryEventOccurred(PlatformSpeechSynthesisUtterance&, 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->client()->didStartSpeaking(m_utterance);
</del><ins>+ m_platformSpeechSynthesizer->client()->didStartSpeaking(*m_utterance);
</ins><span class="cx"> break;
</span><span class="cx"> case SpeechPause:
</span><del>- m_platformSpeechSynthesizer->client()->didPauseSpeaking(m_utterance);
</del><ins>+ m_platformSpeechSynthesizer->client()->didPauseSpeaking(*m_utterance);
</ins><span class="cx"> break;
</span><span class="cx"> case SpeechResume:
</span><del>- m_platformSpeechSynthesizer->client()->didResumeSpeaking(m_utterance);
</del><ins>+ m_platformSpeechSynthesizer->client()->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->client()->speakingErrorOccurred(m_utterance);
</del><ins>+ m_platformSpeechSynthesizer->client()->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->client()->didStartSpeaking(m_utterance);
</del><ins>+ m_synthesizerObject->client()->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<WebCore::PlatformSpeechSynthesisUtterance> platformUtterance = m_utterance;
</span><span class="cx"> m_utterance = nullptr;
</span><span class="cx">
</span><del>- m_synthesizerObject->client()->didFinishSpeaking(platformUtterance);
</del><ins>+ m_synthesizerObject->client()->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->client()->didPauseSpeaking(m_utterance);
</del><ins>+ m_synthesizerObject->client()->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->client()->didResumeSpeaking(m_utterance);
</del><ins>+ m_synthesizerObject->client()->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<WebCore::PlatformSpeechSynthesisUtterance> platformUtterance = m_utterance;
</span><span class="cx"> m_utterance = nullptr;
</span><span class="cx">
</span><del>- m_synthesizerObject->client()->didFinishSpeaking(platformUtterance);
</del><ins>+ m_synthesizerObject->client()->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->client()->boundaryEventOccurred(m_utterance, WebCore::SpeechWordBoundary, characterRange.location);
</del><ins>+ m_synthesizerObject->client()->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->text()];
</span><del>- m_synthesizerObject->client()->didStartSpeaking(utterance);
</del><ins>+ m_synthesizerObject->client()->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->client()->didPauseSpeaking(m_utterance);
</del><ins>+ m_synthesizerObject->client()->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->client()->didResumeSpeaking(m_utterance);
</del><ins>+ m_synthesizerObject->client()->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->client()->speakingErrorOccurred(m_utterance);
</del><ins>+ m_synthesizerObject->client()->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->client()->didFinishSpeaking(utterance);
</del><ins>+ m_synthesizerObject->client()->didFinishSpeaking(*utterance);
</ins><span class="cx"> else
</span><del>- m_synthesizerObject->client()->speakingErrorOccurred(utterance);
</del><ins>+ m_synthesizerObject->client()->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->client()->boundaryEventOccurred(m_utterance, WebCore::SpeechWordBoundary, characterRange.location);
</del><ins>+ m_synthesizerObject->client()->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<PlatformSpeechSynthesisUtterance> protect(m_utterance);
</span><span class="cx"> m_utterance = nullptr;
</span><span class="cx">
</span><del>- client()->didFinishSpeaking(protect);
</del><ins>+ client()->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()->didStartSpeaking(m_utterance);
</del><ins>+ client()->didStartSpeaking(*m_utterance);
</ins><span class="cx">
</span><span class="cx"> // Fire a fake word and then sentence boundary event.
</span><del>- client()->boundaryEventOccurred(m_utterance, SpeechWordBoundary, 0);
- client()->boundaryEventOccurred(m_utterance, SpeechSentenceBoundary, m_utterance->text().length());
</del><ins>+ client()->boundaryEventOccurred(*m_utterance, SpeechWordBoundary, 0);
+ client()->boundaryEventOccurred(*m_utterance, SpeechSentenceBoundary, m_utterance->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()->speakingErrorOccurred(m_utterance);
</del><ins>+ client()->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()->didPauseSpeaking(m_utterance);
</del><ins>+ client()->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()->didResumeSpeaking(m_utterance);
</del><ins>+ client()->didResumeSpeaking(*m_utterance);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre>
</div>
</div>
</body>
</html>