<!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>[207214] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/207214">207214</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-10-12 07:41:59 -0700 (Wed, 12 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Stop using PassRefPtr in platform/efl
https://bugs.webkit.org/show_bug.cgi?id=163321
Reviewed by Laszlo Gombos.
Stop using PassRefPtr in platform/efl.
* platform/efl/BatteryProviderEfl.cpp:
(WebCore::batteryProperties):
(WebCore::BatteryProviderEfl::setBatteryStatus):
(WebCore::BatteryProviderEfl::dispatchEvent):
* platform/efl/BatteryProviderEfl.h:
* platform/efl/BatteryProviderEflClient.h:
* platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
(WebCore::PlatformSpeechSynthesisProviderEfl::voiceName):
(WebCore::PlatformSpeechSynthesisProviderEfl::speak):
* platform/efl/PlatformSpeechSynthesisProviderEfl.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformeflBatteryProviderEflcpp">trunk/Source/WebCore/platform/efl/BatteryProviderEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformeflBatteryProviderEflh">trunk/Source/WebCore/platform/efl/BatteryProviderEfl.h</a></li>
<li><a href="#trunkSourceWebCoreplatformeflBatteryProviderEflClienth">trunk/Source/WebCore/platform/efl/BatteryProviderEflClient.h</a></li>
<li><a href="#trunkSourceWebCoreplatformeflPlatformSpeechSynthesisProviderEflcpp">trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformeflPlatformSpeechSynthesisProviderEflh">trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflBatteryProvidercpp">trunk/Source/WebKit2/UIProcess/efl/BatteryProvider.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflBatteryProviderh">trunk/Source/WebKit2/UIProcess/efl/BatteryProvider.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207213 => 207214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-12 09:54:14 UTC (rev 207213)
+++ trunk/Source/WebCore/ChangeLog        2016-10-12 14:41:59 UTC (rev 207214)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-10-12 Chris Dumez <cdumez@apple.com>
+
+ Stop using PassRefPtr in platform/efl
+ https://bugs.webkit.org/show_bug.cgi?id=163321
+
+ Reviewed by Laszlo Gombos.
+
+ Stop using PassRefPtr in platform/efl.
+
+ * platform/efl/BatteryProviderEfl.cpp:
+ (WebCore::batteryProperties):
+ (WebCore::BatteryProviderEfl::setBatteryStatus):
+ (WebCore::BatteryProviderEfl::dispatchEvent):
+ * platform/efl/BatteryProviderEfl.h:
+ * platform/efl/BatteryProviderEflClient.h:
+ * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
+ (WebCore::PlatformSpeechSynthesisProviderEfl::voiceName):
+ (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
+ * platform/efl/PlatformSpeechSynthesisProviderEfl.h:
+
</ins><span class="cx"> 2016-10-12 Youenn Fablet <youenn@apple.com>
</span><span class="cx">
</span><span class="cx"> Attribute setter binding generated code should use more references
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflBatteryProviderEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/BatteryProviderEfl.cpp (207213 => 207214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/BatteryProviderEfl.cpp        2016-10-12 09:54:14 UTC (rev 207213)
+++ trunk/Source/WebCore/platform/efl/BatteryProviderEfl.cpp        2016-10-12 14:41:59 UTC (rev 207214)
</span><span class="lines">@@ -124,15 +124,16 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<BatteryStatus> batteryStatus = BatteryStatus::create(charging, chargingTime, dischargingTime, level / 100);
</del><ins>+ auto batteryStatus = BatteryStatus::create(charging, chargingTime, dischargingTime, level / 100);
+ client->setBatteryStatus(WTFMove(batteryStatus));
</ins><span class="cx"> if (chargingChanged)
</span><del>- client->setBatteryStatus(eventNames().chargingchangeEvent, batteryStatus);
</del><ins>+ client->dispatchEvent(eventNames().chargingchangeEvent);
</ins><span class="cx"> if (chargingTimeChanged)
</span><del>- client->setBatteryStatus(eventNames().chargingtimechangeEvent, batteryStatus);
</del><ins>+ client->dispatchEvent(eventNames().chargingtimechangeEvent);
</ins><span class="cx"> if (dischargingTimeChanged)
</span><del>- client->setBatteryStatus(eventNames().dischargingtimechangeEvent, batteryStatus);
</del><ins>+ client->dispatchEvent(eventNames().dischargingtimechangeEvent);
</ins><span class="cx"> if (levelChanged)
</span><del>- client->setBatteryStatus(eventNames().levelchangeEvent, batteryStatus);
</del><ins>+ client->dispatchEvent(eventNames().levelchangeEvent);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void batteryPropertiesChanged(void* data, const Eldbus_Message*)
</span><span class="lines">@@ -219,13 +220,17 @@
</span><span class="cx"> eldbus_proxy_call(m_proxy, "EnumerateDevices", enumerateDevices, this, -1, "");
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void BatteryProviderEfl::setBatteryStatus(const AtomicString& eventType, PassRefPtr<BatteryStatus> batteryStatus)
</del><ins>+void BatteryProviderEfl::setBatteryStatus(Ref<BatteryStatus>&& batteryStatus)
</ins><span class="cx"> {
</span><del>- m_batteryStatus = batteryStatus;
- m_client->didChangeBatteryStatus(eventType, m_batteryStatus);
</del><ins>+ m_batteryStatus = WTFMove(batteryStatus);
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+void BatteryProviderEfl::dispatchEvent(const AtomicString& type)
+{
+ m_client->didChangeBatteryStatus(type, m_batteryStatus.copyRef());
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+}
+
</ins><span class="cx"> #endif // BATTERY_STATUS
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflBatteryProviderEflh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/BatteryProviderEfl.h (207213 => 207214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/BatteryProviderEfl.h        2016-10-12 09:54:14 UTC (rev 207213)
+++ trunk/Source/WebCore/platform/efl/BatteryProviderEfl.h        2016-10-12 14:41:59 UTC (rev 207214)
</span><span class="lines">@@ -39,9 +39,11 @@
</span><span class="cx"> virtual void startUpdating();
</span><span class="cx"> virtual void stopUpdating();
</span><span class="cx">
</span><del>- void setBatteryStatus(const AtomicString& eventType, PassRefPtr<BatteryStatus>);
</del><ins>+ void setBatteryStatus(Ref<BatteryStatus>&&);
</ins><span class="cx"> BatteryStatus* batteryStatus() const;
</span><span class="cx">
</span><ins>+ void dispatchEvent(const AtomicString& type);
+
</ins><span class="cx"> private:
</span><span class="cx"> static void enumerateDevices(void* data, const Eldbus_Message*, Eldbus_Pending*);
</span><span class="cx"> static void deviceTypeCallback(void* data, const Eldbus_Message*, Eldbus_Pending*);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflBatteryProviderEflClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/BatteryProviderEflClient.h (207213 => 207214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/BatteryProviderEflClient.h        2016-10-12 09:54:14 UTC (rev 207213)
+++ trunk/Source/WebCore/platform/efl/BatteryProviderEflClient.h        2016-10-12 14:41:59 UTC (rev 207214)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">
</span><span class="cx"> class BatteryProviderEflClient {
</span><span class="cx"> public:
</span><del>- virtual void didChangeBatteryStatus(const AtomicString& eventType, PassRefPtr<BatteryStatus>) = 0;
</del><ins>+ virtual void didChangeBatteryStatus(const AtomicString& eventType, RefPtr<BatteryStatus>&&) = 0;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflPlatformSpeechSynthesisProviderEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp (207213 => 207214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp        2016-10-12 09:54:14 UTC (rev 207213)
+++ trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp        2016-10-12 14:41:59 UTC (rev 207214)
</span><span class="lines">@@ -64,13 +64,13 @@
</span><span class="cx"> return pitch * 50;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String PlatformSpeechSynthesisProviderEfl::voiceName(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance) const
</del><ins>+String PlatformSpeechSynthesisProviderEfl::voiceName(PlatformSpeechSynthesisUtterance& utterance) const
</ins><span class="cx"> {
</span><span class="cx"> if (!m_platformSpeechSynthesizer)
</span><span class="cx"> return String();
</span><span class="cx">
</span><del>- if (!utterance->lang().isEmpty()) {
- const String& language = utterance->lang();
</del><ins>+ if (!utterance.lang().isEmpty()) {
+ const String& language = utterance.lang();
</ins><span class="cx"> const Vector<RefPtr<PlatformSpeechSynthesisVoice>>& voiceList = m_platformSpeechSynthesizer->voiceList();
</span><span class="cx"> for (const auto& voice : voiceList) {
</span><span class="cx"> // Espeak adds an empty character at the beginning of the language
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_utterance = WTFMove(utterance);
</span><del>- String voice = voiceName(m_utterance);
</del><ins>+ String voice = voiceName(*m_utterance);
</ins><span class="cx"> espeak_SetVoiceByName(voice.utf8().data());
</span><span class="cx"> espeak_SetParameter(espeakRATE, convertRateToEspeakValue(m_utterance->rate()), 0);
</span><span class="cx"> espeak_SetParameter(espeakVOLUME, convertVolumeToEspeakValue(m_utterance->volume()), 0);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflPlatformSpeechSynthesisProviderEflh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.h (207213 => 207214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.h        2016-10-12 09:54:14 UTC (rev 207213)
+++ trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.h        2016-10-12 14:41:59 UTC (rev 207214)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> int convertPitchToEspeakValue(float) const;
</span><span class="cx">
</span><span class="cx"> espeak_VOICE* currentVoice() const;
</span><del>- String voiceName(PassRefPtr<PlatformSpeechSynthesisUtterance>) const;
</del><ins>+ String voiceName(PlatformSpeechSynthesisUtterance&) const;
</ins><span class="cx"> void fireSpeechEvent(SpeechEvent);
</span><span class="cx">
</span><span class="cx"> bool m_isEngineStarted;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflBatteryProvidercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/BatteryProvider.cpp (207213 => 207214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/BatteryProvider.cpp        2016-10-12 09:54:14 UTC (rev 207213)
+++ trunk/Source/WebKit2/UIProcess/efl/BatteryProvider.cpp        2016-10-12 14:41:59 UTC (rev 207214)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> m_provider.stopUpdating();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void BatteryProvider::didChangeBatteryStatus(const AtomicString& eventType, PassRefPtr<BatteryStatus> status)
</del><ins>+void BatteryProvider::didChangeBatteryStatus(const AtomicString& eventType, RefPtr<BatteryStatus>&& status)
</ins><span class="cx"> {
</span><span class="cx"> WKRetainPtr<WKBatteryStatusRef> wkBatteryStatus = adoptWK(WKBatteryStatusCreate(status->charging(), status->chargingTime(), status->dischargingTime(), status->level()));
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflBatteryProviderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/BatteryProvider.h (207213 => 207214)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/BatteryProvider.h        2016-10-12 09:54:14 UTC (rev 207213)
+++ trunk/Source/WebKit2/UIProcess/efl/BatteryProvider.h        2016-10-12 14:41:59 UTC (rev 207214)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> explicit BatteryProvider(WKContextRef);
</span><span class="cx">
</span><span class="cx"> // BatteryProviderEflClient interface.
</span><del>- virtual void didChangeBatteryStatus(const AtomicString& eventType, PassRefPtr<WebCore::BatteryStatus>);
</del><ins>+ virtual void didChangeBatteryStatus(const AtomicString& eventType, RefPtr<WebCore::BatteryStatus>&&);
</ins><span class="cx">
</span><span class="cx"> WKRetainPtr<WKBatteryManagerRef> m_batteryManager;
</span><span class="cx"> WebCore::BatteryProviderEfl m_provider;
</span></span></pre>
</div>
</div>
</body>
</html>