Diff
Modified: trunk/Source/WebCore/ChangeLog (204238 => 204239)
--- trunk/Source/WebCore/ChangeLog 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/ChangeLog 2016-08-07 05:52:23 UTC (rev 204239)
@@ -1,3 +1,95 @@
+2016-08-06 Gyuyoung Kim <gyuyoung....@webkit.org>
+
+ Purge all uses of PassRefPtr in WebCore/Modules
+ https://bugs.webkit.org/show_bug.cgi?id=159965
+
+ Reviewed by Chris Dumez.
+
+ Final clean up in Modules directory.
+
+ No new tests, no behavior changes.
+
+ * Modules/gamepad/deprecated/GamepadList.cpp:
+ (WebCore::GamepadList::set):
+ * Modules/gamepad/deprecated/GamepadList.h:
+ * Modules/indexeddb/IDBGetResult.h:
+ (WebCore::IDBGetResult::IDBGetResult):
+ * Modules/indieui/UIRequestEvent.cpp:
+ (WebCore::UIRequestEvent::create):
+ (WebCore::UIRequestEvent::UIRequestEvent):
+ * Modules/indieui/UIRequestEvent.h:
+ (WebCore::UIRequestEvent::receiver):
+ * Modules/mediasource/MediaSourceRegistry.h:
+ * Modules/mediasource/SampleMap.cpp:
+ (WebCore::SampleMap::addSample):
+ * Modules/mediasource/SampleMap.h:
+ (WebCore::SampleMap::addRange):
+ * Modules/mediasource/SourceBuffer.cpp:
+ (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
+ (WebCore::SourceBuffer::textTrackAddCue):
+ (WebCore::SourceBuffer::textTrackRemoveCue):
+ * Modules/mediasource/SourceBuffer.h:
+ * Modules/mediastream/CaptureDeviceManager.cpp:
+ (CaptureDeviceManager::bestSourcesForTypeAndConstraints):
+ * Modules/mediastream/CaptureDeviceManager.h:
+ * Modules/mediastream/MediaDevicesRequest.h:
+ * Modules/mediastream/MediaStream.cpp:
+ (WebCore::MediaStream::internalAddTrack):
+ (WebCore::MediaStream::internalRemoveTrack):
+ * Modules/mediastream/MediaStreamRegistry.h:
+ * Modules/mediastream/MediaStreamTrackEvent.cpp:
+ (WebCore::MediaStreamTrackEvent::create):
+ (WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent):
+ (WebCore::MediaStreamTrackEvent::track):
+ * Modules/mediastream/MediaStreamTrackEvent.h:
+ * Modules/mediastream/MediaTrackConstraints.cpp:
+ (WebCore::MediaTrackConstraints::create):
+ (WebCore::MediaTrackConstraints::MediaTrackConstraints):
+ (WebCore::MediaTrackConstraints::optional):
+ * Modules/mediastream/MediaTrackConstraints.h:
+ * Modules/mediastream/RTCDTMFSender.cpp:
+ (WebCore::RTCDTMFSender::create):
+ (WebCore::RTCDTMFSender::RTCDTMFSender):
+ * Modules/mediastream/RTCDTMFSender.h:
+ * Modules/mediastream/RTCDataChannelEvent.cpp:
+ (WebCore::RTCDataChannelEvent::create):
+ (WebCore::RTCDataChannelEvent::RTCDataChannelEvent):
+ (WebCore::RTCDataChannelEvent::channel):
+ * Modules/mediastream/RTCDataChannelEvent.h:
+ * Modules/mediastream/RTCIceServer.h:
+ * Modules/mediastream/RTCStatsReport.h:
+ * Modules/mediastream/SourceInfo.cpp:
+ (WebCore::SourceInfo::create):
+ (WebCore::SourceInfo::SourceInfo):
+ * Modules/mediastream/SourceInfo.h:
+ * Modules/mediastream/UserMediaClient.h:
+ * Modules/mediastream/UserMediaRequest.cpp:
+ (WebCore::UserMediaRequest::UserMediaRequest):
+ (WebCore::UserMediaRequest::didCreateStream):
+ * Modules/mediastream/UserMediaRequest.h:
+ * Modules/webdatabase/Database.cpp:
+ (WebCore::Database::~Database):
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::textTrackAddCue):
+ (WebCore::HTMLMediaElement::textTrackRemoveCue):
+ * html/HTMLMediaElement.h:
+ * html/HTMLTrackElement.cpp:
+ (WebCore::HTMLTrackElement::textTrackAddCue):
+ (WebCore::HTMLTrackElement::textTrackRemoveCue):
+ * html/HTMLTrackElement.h:
+ * html/track/TextTrack.h:
+ * platform/graphics/SourceBufferPrivateClient.h:
+ * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+ (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
+ * platform/mediastream/MediaStreamCreationClient.h:
+ * platform/mediastream/mac/AVCaptureDeviceManager.h:
+ * platform/mediastream/mac/AVCaptureDeviceManager.mm:
+ (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):
+ * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
+ (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
+ * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
+ (WebCore::MockSourceBufferPrivate::didReceiveSample):
+
2016-08-06 Chris Dumez <cdu...@apple.com>
a.replaceChild(a, a) should throw a HierarchyRequestError
Modified: trunk/Source/WebCore/Modules/gamepad/deprecated/GamepadList.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/gamepad/deprecated/GamepadList.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/gamepad/deprecated/GamepadList.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -36,11 +36,11 @@
{
}
-void GamepadList::set(unsigned index, PassRefPtr<Gamepad> gamepad)
+void GamepadList::set(unsigned index, RefPtr<Gamepad>&& gamepad)
{
if (index >= kMaximumGamepads)
return;
- m_items[index] = gamepad;
+ m_items[index] = WTFMove(gamepad);
}
unsigned GamepadList::length() const
Modified: trunk/Source/WebCore/Modules/gamepad/deprecated/GamepadList.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/gamepad/deprecated/GamepadList.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/gamepad/deprecated/GamepadList.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -29,7 +29,6 @@
#if ENABLE(GAMEPAD_DEPRECATED)
#include "Gamepad.h"
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
@@ -42,7 +41,7 @@
static Ref<GamepadList> create() { return adoptRef(*new GamepadList); }
~GamepadList();
- void set(unsigned index, PassRefPtr<Gamepad>);
+ void set(unsigned index, RefPtr<Gamepad>&&);
Gamepad* item(unsigned index);
unsigned length() const;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -59,8 +59,8 @@
{
}
- IDBGetResult(PassRefPtr<IDBKey> key)
- : m_keyData(key.get())
+ IDBGetResult(IDBKey& key)
+ : m_keyData(&key)
{
}
@@ -69,8 +69,8 @@
{
}
- IDBGetResult(PassRefPtr<SharedBuffer> buffer, PassRefPtr<IDBKey> key, const IDBKeyPath& path)
- : m_keyData(key.get())
+ IDBGetResult(SharedBuffer* buffer, IDBKey& key, const IDBKeyPath& path)
+ : m_keyData(&key)
, m_keyPath(path)
{
if (buffer)
Modified: trunk/Source/WebCore/Modules/indieui/UIRequestEvent.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/indieui/UIRequestEvent.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/indieui/UIRequestEvent.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -35,9 +35,9 @@
return adoptRef(*new UIRequestEvent(type, initializer));
}
-Ref<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, bool bubbles, bool cancelable, AbstractView* view, int detail, PassRefPtr<EventTarget> receiver)
+Ref<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, bool bubbles, bool cancelable, AbstractView* view, int detail, RefPtr<EventTarget>&& receiver)
{
- return adoptRef(*new UIRequestEvent(type, bubbles, cancelable, view, detail, receiver));
+ return adoptRef(*new UIRequestEvent(type, bubbles, cancelable, view, detail, WTFMove(receiver)));
}
UIRequestEvent::UIRequestEvent(const AtomicString& type, const UIRequestEventInit& initializer)
@@ -46,9 +46,9 @@
{
}
-UIRequestEvent::UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, AbstractView* view, int detail, PassRefPtr<EventTarget> receiver)
+UIRequestEvent::UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, AbstractView* view, int detail, RefPtr<EventTarget>&& receiver)
: UIEvent(type, bubbles, cancelable, view, detail)
- , m_receiver(receiver)
+ , m_receiver(WTFMove(receiver))
{
}
Modified: trunk/Source/WebCore/Modules/indieui/UIRequestEvent.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/indieui/UIRequestEvent.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/indieui/UIRequestEvent.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -39,7 +39,7 @@
class UIRequestEvent : public UIEvent {
public:
- static Ref<UIRequestEvent> create(const AtomicString& type, bool bubbles, bool cancelable, AbstractView*, int detail, PassRefPtr<EventTarget> receiver);
+ static Ref<UIRequestEvent> create(const AtomicString& type, bool bubbles, bool cancelable, AbstractView*, int detail, RefPtr<EventTarget>&& receiver);
static Ref<UIRequestEvent> createForBindings(const AtomicString& eventType, const UIRequestEventInit&);
virtual ~UIRequestEvent();
@@ -47,7 +47,7 @@
EventTarget* receiver() const { return m_receiver.get(); }
protected:
- UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, AbstractView*, int detail, PassRefPtr<EventTarget> receiver);
+ UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, AbstractView*, int detail, RefPtr<EventTarget>&& receiver);
UIRequestEvent(const AtomicString& type, const UIRequestEventInit&);
Modified: trunk/Source/WebCore/Modules/mediasource/MediaSourceRegistry.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediasource/MediaSourceRegistry.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSourceRegistry.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -36,7 +36,6 @@
#include "URLRegistry.h"
#include <wtf/HashMap.h>
#include <wtf/NeverDestroyed.h>
-#include <wtf/PassRefPtr.h>
#include <wtf/text/StringHash.h>
namespace WebCore {
Modified: trunk/Source/WebCore/Modules/mediasource/SampleMap.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediasource/SampleMap.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediasource/SampleMap.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -108,19 +108,16 @@
m_totalSize = 0;
}
-void SampleMap::addSample(PassRefPtr<MediaSample> prpSample)
+void SampleMap::addSample(MediaSample& sample)
{
- RefPtr<MediaSample> sample = prpSample;
- ASSERT(sample);
+ MediaTime presentationTime = sample.presentationTime();
- MediaTime presentationTime = sample->presentationTime();
+ presentationOrder().m_samples.insert(PresentationOrderSampleMap::MapType::value_type(presentationTime, &sample));
- presentationOrder().m_samples.insert(PresentationOrderSampleMap::MapType::value_type(presentationTime, sample));
+ auto decodeKey = DecodeOrderSampleMap::KeyType(sample.decodeTime(), presentationTime);
+ decodeOrder().m_samples.insert(DecodeOrderSampleMap::MapType::value_type(decodeKey, &sample));
- auto decodeKey = DecodeOrderSampleMap::KeyType(sample->decodeTime(), presentationTime);
- decodeOrder().m_samples.insert(DecodeOrderSampleMap::MapType::value_type(decodeKey, sample));
-
- m_totalSize += sample->sizeInBytes();
+ m_totalSize += sample.sizeInBytes();
}
void SampleMap::removeSample(MediaSample* sample)
Modified: trunk/Source/WebCore/Modules/mediasource/SampleMap.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediasource/SampleMap.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediasource/SampleMap.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -99,7 +99,7 @@
bool empty() const;
void clear();
- void addSample(PassRefPtr<MediaSample>);
+ void addSample(MediaSample&);
void removeSample(MediaSample*);
size_t sizeInBytes() const { return m_totalSize; }
@@ -120,7 +120,7 @@
void SampleMap::addRange(I begin, I end)
{
for (I iter = begin; iter != end; ++iter)
- addSample(iter->second);
+ addSample(*iter->second);
}
}
Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -1301,7 +1301,7 @@
m_source->streamEndedWithError(MediaSource::EndOfStreamError::Decode);
}
-void SourceBuffer::sourceBufferPrivateDidReceiveSample(SourceBufferPrivate*, PassRefPtr<MediaSample> prpSample)
+void SourceBuffer::sourceBufferPrivateDidReceiveSample(SourceBufferPrivate*, MediaSample& sample)
{
if (isRemoved())
return;
@@ -1317,8 +1317,6 @@
return;
}
- RefPtr<MediaSample> sample = prpSample;
-
// 3.5.8 Coded Frame Processing
// http://www.w3.org/TR/media-source/#sourcebuffer-coded-frame-processing
@@ -1341,16 +1339,16 @@
// ↳ Otherwise:
// 1. Let presentation timestamp be a double precision floating point representation of
// the coded frame's presentation timestamp in seconds.
- presentationTimestamp = sample->presentationTime();
+ presentationTimestamp = sample.presentationTime();
// 2. Let decode timestamp be a double precision floating point representation of the coded frame's
// decode timestamp in seconds.
- decodeTimestamp = sample->decodeTime();
+ decodeTimestamp = sample.decodeTime();
}
// 1.2 Let frame duration be a double precision floating point representation of the coded frame's
// duration in seconds.
- MediaTime frameDuration = sample->duration();
+ MediaTime frameDuration = sample.duration();
// 1.3 If mode equals "sequence" and group start timestamp is set, then run the following steps:
if (m_mode == AppendMode::Sequence && m_groupStartTimestamp.isValid()) {
@@ -1378,7 +1376,7 @@
}
// 1.5 Let track buffer equal the track buffer that the coded frame will be added to.
- AtomicString trackID = sample->trackID();
+ AtomicString trackID = sample.trackID();
auto it = m_trackBufferMap.find(trackID);
if (it == m_trackBufferMap.end())
it = m_trackBufferMap.add(trackID, TrackBuffer()).iterator;
@@ -1420,10 +1418,10 @@
if (m_mode == AppendMode::Sequence) {
// Use the generated timestamps instead of the sample's timestamps.
- sample->setTimestamps(presentationTimestamp, decodeTimestamp);
+ sample.setTimestamps(presentationTimestamp, decodeTimestamp);
} else if (m_timestampOffset) {
// Reflect the timestamp offset into the sample.
- sample->offsetTimestampsBy(m_timestampOffset);
+ sample.offsetTimestampsBy(m_timestampOffset);
}
// 1.7 Let frame end timestamp equal the sum of presentation timestamp and frame duration.
@@ -1457,7 +1455,7 @@
if (trackBuffer.needRandomAccessFlag) {
// 1.11.1 If the coded frame is not a random access point, then drop the coded frame and jump
// to the top of the loop to start processing the next coded frame.
- if (!sample->isSync()) {
+ if (!sample.isSync()) {
didDropSample();
return;
}
@@ -1500,7 +1498,7 @@
// 1.14.2.3 If the presentation timestamp is less than the remove window timestamp,
// then remove overlapped frame and any coded frames that depend on it from track buffer.
if (presentationTimestamp < removeWindowTimestamp)
- erasedSamples.addSample(iter->second);
+ erasedSamples.addSample(*iter->second);
}
// If track buffer contains timed text coded frames:
@@ -1589,7 +1587,7 @@
if (trackBuffer.lastEnqueuedDecodeEndTime.isInvalid() || decodeTimestamp >= trackBuffer.lastEnqueuedDecodeEndTime) {
DecodeOrderSampleMap::KeyType decodeKey(decodeTimestamp, presentationTimestamp);
- trackBuffer.decodeQueue.insert(DecodeOrderSampleMap::MapType::value_type(decodeKey, sample));
+ trackBuffer.decodeQueue.insert(DecodeOrderSampleMap::MapType::value_type(decodeKey, &sample));
}
// 1.18 Set last decode timestamp for track buffer to decode timestamp.
@@ -1732,7 +1730,7 @@
m_source->mediaElement()->textTrackModeChanged(track);
}
-void SourceBuffer::textTrackAddCue(TextTrack* track, WTF::PassRefPtr<TextTrackCue> cue)
+void SourceBuffer::textTrackAddCue(TextTrack* track, TextTrackCue& cue)
{
if (!isRemoved())
m_source->mediaElement()->textTrackAddCue(track, cue);
@@ -1744,7 +1742,7 @@
m_source->mediaElement()->textTrackAddCues(track, cueList);
}
-void SourceBuffer::textTrackRemoveCue(TextTrack* track, WTF::PassRefPtr<TextTrackCue> cue)
+void SourceBuffer::textTrackRemoveCue(TextTrack* track, TextTrackCue& cue)
{
if (!isRemoved())
m_source->mediaElement()->textTrackRemoveCue(track, cue);
Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -44,7 +44,6 @@
#include "Timer.h"
#include "VideoTrack.h"
#include <runtime/ArrayBufferView.h>
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
@@ -143,7 +142,7 @@
// SourceBufferPrivateClient
void sourceBufferPrivateDidReceiveInitializationSegment(SourceBufferPrivate*, const InitializationSegment&) override;
- void sourceBufferPrivateDidReceiveSample(SourceBufferPrivate*, PassRefPtr<MediaSample>) override;
+ void sourceBufferPrivateDidReceiveSample(SourceBufferPrivate*, MediaSample&) override;
bool sourceBufferPrivateHasAudio(const SourceBufferPrivate*) const override;
bool sourceBufferPrivateHasVideo(const SourceBufferPrivate*) const override;
void sourceBufferPrivateDidBecomeReadyForMoreSamples(SourceBufferPrivate*, AtomicString trackID) override;
@@ -162,8 +161,8 @@
void textTrackModeChanged(TextTrack*) override;
void textTrackAddCues(TextTrack*, const TextTrackCueList*) override;
void textTrackRemoveCues(TextTrack*, const TextTrackCueList*) override;
- void textTrackAddCue(TextTrack*, PassRefPtr<TextTrackCue>) override;
- void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>) override;
+ void textTrackAddCue(TextTrack*, TextTrackCue&) override;
+ void textTrackRemoveCue(TextTrack*, TextTrackCue&) override;
bool isRemoved() const;
void scheduleEvent(const AtomicString& eventName);
Modified: trunk/Source/WebCore/Modules/mediastream/CaptureDeviceManager.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/CaptureDeviceManager.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/CaptureDeviceManager.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -88,7 +88,7 @@
return true;
}
-Vector<RefPtr<RealtimeMediaSource>> CaptureDeviceManager::bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type type, PassRefPtr<MediaConstraints> constraints)
+Vector<RefPtr<RealtimeMediaSource>> CaptureDeviceManager::bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type type, MediaConstraints& constraints)
{
Vector<RefPtr<RealtimeMediaSource>> bestSourcesList;
@@ -103,7 +103,7 @@
if (!captureDevice.m_enabled || captureDevice.m_sourceId.isEmpty() || captureDevice.m_sourceType == RealtimeMediaSource::None)
continue;
- if (RefPtr<RealtimeMediaSource> captureSource = sourceWithUID(captureDevice.m_persistentDeviceID, type, constraints.get()))
+ if (RefPtr<RealtimeMediaSource> captureSource = sourceWithUID(captureDevice.m_persistentDeviceID, type, &constraints))
bestSourcesList.append(captureSource.leakRef());
}
std::sort(bestSourcesList.begin(), bestSourcesList.end(), sortBasedOnFitnessScore);
Modified: trunk/Source/WebCore/Modules/mediastream/CaptureDeviceManager.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/CaptureDeviceManager.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/CaptureDeviceManager.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -40,7 +40,7 @@
virtual Vector<CaptureDeviceInfo>& captureDeviceList() = 0;
virtual void refreshCaptureDeviceList() { }
virtual TrackSourceInfoVector getSourcesInfo(const String&);
- virtual Vector<RefPtr<RealtimeMediaSource>> bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type, PassRefPtr<MediaConstraints>);
+ virtual Vector<RefPtr<RealtimeMediaSource>> bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type, MediaConstraints&);
virtual RefPtr<RealtimeMediaSource> sourceWithUID(const String&, RealtimeMediaSource::Type, MediaConstraints*);
virtual bool verifyConstraintsForMediaType(RealtimeMediaSource::Type, MediaConstraints*, const CaptureSessionInfo*, String&);
Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevicesRequest.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/MediaDevicesRequest.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevicesRequest.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -34,7 +34,6 @@
#include "MediaStreamCreationClient.h"
#include "MediaStreamTrackSourcesRequestClient.h"
#include "UserMediaPermissionCheck.h"
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamRegistry.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/MediaStreamRegistry.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamRegistry.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -30,7 +30,6 @@
#include "URLRegistry.h"
#include <wtf/HashMap.h>
-#include <wtf/PassRefPtr.h>
#include <wtf/text/StringHash.h>
namespace WebCore {
Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -32,9 +32,9 @@
namespace WebCore {
-Ref<MediaStreamTrackEvent> MediaStreamTrackEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStreamTrack> track)
+Ref<MediaStreamTrackEvent> MediaStreamTrackEvent::create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStreamTrack>&& track)
{
- return adoptRef(*new MediaStreamTrackEvent(type, canBubble, cancelable, track));
+ return adoptRef(*new MediaStreamTrackEvent(type, canBubble, cancelable, WTFMove(track)));
}
Ref<MediaStreamTrackEvent> MediaStreamTrackEvent::createForBindings(const AtomicString& type, const MediaStreamTrackEventInit& initializer)
@@ -42,9 +42,9 @@
return adoptRef(*new MediaStreamTrackEvent(type, initializer));
}
-MediaStreamTrackEvent::MediaStreamTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStreamTrack> track)
+MediaStreamTrackEvent::MediaStreamTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStreamTrack>&& track)
: Event(type, canBubble, cancelable)
- , m_track(track)
+ , m_track(WTFMove(track))
{
}
Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackEvent.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -42,7 +42,7 @@
public:
virtual ~MediaStreamTrackEvent();
- static Ref<MediaStreamTrackEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStreamTrack>);
+ static Ref<MediaStreamTrackEvent> create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStreamTrack>&&);
static Ref<MediaStreamTrackEvent> createForBindings(const AtomicString& type, const MediaStreamTrackEventInit& initializer);
MediaStreamTrack* track() const;
@@ -51,7 +51,7 @@
EventInterface eventInterface() const override;
private:
- MediaStreamTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStreamTrack>);
+ MediaStreamTrackEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStreamTrack>&&);
MediaStreamTrackEvent(const AtomicString& type, const MediaStreamTrackEventInit&);
RefPtr<MediaStreamTrack> m_track;
Modified: trunk/Source/WebCore/Modules/mediastream/MediaTrackConstraints.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/MediaTrackConstraints.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/MediaTrackConstraints.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -38,21 +38,21 @@
namespace WebCore {
-Ref<MediaTrackConstraints> MediaTrackConstraints::create(PassRefPtr<MediaConstraintsImpl> constraints)
+Ref<MediaTrackConstraints> MediaTrackConstraints::create(MediaConstraintsImpl& constraints)
{
return adoptRef(*new MediaTrackConstraints(constraints));
}
-MediaTrackConstraints::MediaTrackConstraints(PassRefPtr<MediaConstraintsImpl> constraints)
+MediaTrackConstraints::MediaTrackConstraints(MediaConstraintsImpl& constraints)
: m_constraints(constraints)
{
}
-Vector<PassRefPtr<MediaTrackConstraint>> MediaTrackConstraints::optional() const
+Vector<RefPtr<MediaTrackConstraint>> MediaTrackConstraints::optional() const
{
// https://bugs.webkit.org/show_bug.cgi?id=121954
notImplemented();
- return Vector<PassRefPtr<MediaTrackConstraint>>();
+ return { };
}
MediaTrackConstraintSet* MediaTrackConstraints::mandatory() const
Modified: trunk/Source/WebCore/Modules/mediastream/MediaTrackConstraints.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/MediaTrackConstraints.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/MediaTrackConstraints.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -42,15 +42,15 @@
public:
virtual ~MediaTrackConstraints() { }
- static Ref<MediaTrackConstraints> create(PassRefPtr<MediaConstraintsImpl>);
+ static Ref<MediaTrackConstraints> create(MediaConstraintsImpl&);
- Vector<PassRefPtr<MediaTrackConstraint>> optional() const;
+ Vector<RefPtr<MediaTrackConstraint>> optional() const;
MediaTrackConstraintSet* mandatory() const;
private:
- explicit MediaTrackConstraints(PassRefPtr<MediaConstraintsImpl>);
+ explicit MediaTrackConstraints(MediaConstraintsImpl&);
- RefPtr<MediaConstraintsImpl> m_constraints;
+ Ref<MediaConstraintsImpl> m_constraints;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -44,9 +44,8 @@
static const long minInterToneGapMs = 30;
static const long defaultInterToneGapMs = 70;
-RefPtr<RTCDTMFSender> RTCDTMFSender::create(ScriptExecutionContext* context, RTCPeerConnectionHandler* peerConnectionHandler, PassRefPtr<MediaStreamTrack> prpTrack, ExceptionCode& ec)
+RefPtr<RTCDTMFSender> RTCDTMFSender::create(ScriptExecutionContext* context, RTCPeerConnectionHandler* peerConnectionHandler, RefPtr<MediaStreamTrack>&& track, ExceptionCode& ec)
{
- RefPtr<MediaStreamTrack> track = prpTrack;
std::unique_ptr<RTCDTMFSenderHandler> handler = peerConnectionHandler->createDTMFSender(&track->source());
if (!handler) {
ec = NOT_SUPPORTED_ERR;
@@ -53,14 +52,14 @@
return nullptr;
}
- RefPtr<RTCDTMFSender> dtmfSender = adoptRef(new RTCDTMFSender(context, track, WTFMove(handler)));
+ RefPtr<RTCDTMFSender> dtmfSender = adoptRef(new RTCDTMFSender(context, WTFMove(track), WTFMove(handler)));
dtmfSender->suspendIfNeeded();
return dtmfSender;
}
-RTCDTMFSender::RTCDTMFSender(ScriptExecutionContext* context, PassRefPtr<MediaStreamTrack> track, std::unique_ptr<RTCDTMFSenderHandler> handler)
+RTCDTMFSender::RTCDTMFSender(ScriptExecutionContext* context, RefPtr<MediaStreamTrack>&& track, std::unique_ptr<RTCDTMFSenderHandler> handler)
: ActiveDOMObject(context)
- , m_track(track)
+ , m_track(WTFMove(track))
, m_duration(defaultToneDurationMs)
, m_interToneGap(defaultInterToneGapMs)
, m_handler(WTFMove(handler))
Modified: trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -43,7 +43,7 @@
class RTCDTMFSender final : public RefCounted<RTCDTMFSender>, public EventTargetWithInlineData, public RTCDTMFSenderHandlerClient, public ActiveDOMObject {
public:
- static RefPtr<RTCDTMFSender> create(ScriptExecutionContext*, RTCPeerConnectionHandler*, PassRefPtr<MediaStreamTrack>, ExceptionCode&);
+ static RefPtr<RTCDTMFSender> create(ScriptExecutionContext*, RTCPeerConnectionHandler*, RefPtr<MediaStreamTrack>&&, ExceptionCode&);
~RTCDTMFSender();
bool canInsertDTMF() const;
@@ -62,7 +62,7 @@
using RefCounted<RTCDTMFSender>::deref;
private:
- RTCDTMFSender(ScriptExecutionContext*, PassRefPtr<MediaStreamTrack>, std::unique_ptr<RTCDTMFSenderHandler>);
+ RTCDTMFSender(ScriptExecutionContext*, RefPtr<MediaStreamTrack>&&, std::unique_ptr<RTCDTMFSenderHandler>);
// ActiveDOMObject
void stop() override;
Modified: trunk/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -32,12 +32,12 @@
namespace WebCore {
-Ref<RTCDataChannelEvent> RTCDataChannelEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<RTCDataChannel> channel)
+Ref<RTCDataChannelEvent> RTCDataChannelEvent::create(const AtomicString& type, bool canBubble, bool cancelable, RTCDataChannel& channel)
{
return adoptRef(*new RTCDataChannelEvent(type, canBubble, cancelable, channel));
}
-RTCDataChannelEvent::RTCDataChannelEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<RTCDataChannel> channel)
+RTCDataChannelEvent::RTCDataChannelEvent(const AtomicString& type, bool canBubble, bool cancelable, RTCDataChannel& channel)
: Event(type, canBubble, cancelable)
, m_channel(channel)
{
@@ -47,9 +47,9 @@
{
}
-RTCDataChannel* RTCDataChannelEvent::channel() const
+RTCDataChannel* RTCDataChannelEvent::channel()
{
- return m_channel.get();
+ return m_channel.ptr();
}
EventInterface RTCDataChannelEvent::eventInterface() const
Modified: trunk/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDataChannelEvent.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -37,16 +37,16 @@
public:
virtual ~RTCDataChannelEvent();
- static Ref<RTCDataChannelEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<RTCDataChannel>);
+ static Ref<RTCDataChannelEvent> create(const AtomicString& type, bool canBubble, bool cancelable, RTCDataChannel&);
- RTCDataChannel* channel() const;
+ RTCDataChannel* channel();
virtual EventInterface eventInterface() const;
private:
- RTCDataChannelEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<RTCDataChannel>);
+ RTCDataChannelEvent(const AtomicString& type, bool canBubble, bool cancelable, RTCDataChannel&);
- RefPtr<RTCDataChannel> m_channel;
+ Ref<RTCDataChannel> m_channel;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/mediastream/RTCIceServer.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/RTCIceServer.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceServer.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -28,7 +28,6 @@
#if ENABLE(WEB_RTC)
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
Modified: trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -27,7 +27,6 @@
#include "ScriptWrappable.h"
#include <wtf/HashMap.h>
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
Modified: trunk/Source/WebCore/Modules/mediastream/SourceInfo.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/SourceInfo.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/SourceInfo.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -33,13 +33,13 @@
namespace WebCore {
-Ref<SourceInfo> SourceInfo::create(PassRefPtr<TrackSourceInfo> trackSourceInfo)
+Ref<SourceInfo> SourceInfo::create(Ref<TrackSourceInfo>&& trackSourceInfo)
{
- return adoptRef(*new SourceInfo(trackSourceInfo));
+ return adoptRef(*new SourceInfo(WTFMove(trackSourceInfo)));
}
-SourceInfo::SourceInfo(PassRefPtr<TrackSourceInfo> trackSourceInfo)
- : m_trackSourceInfo(trackSourceInfo)
+SourceInfo::SourceInfo(Ref<TrackSourceInfo>&& trackSourceInfo)
+ : m_trackSourceInfo(WTFMove(trackSourceInfo))
{
}
Modified: trunk/Source/WebCore/Modules/mediastream/SourceInfo.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/SourceInfo.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/SourceInfo.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -40,7 +40,7 @@
class SourceInfo : public RefCounted<SourceInfo>, public ScriptWrappable {
public:
- static Ref<SourceInfo> create(PassRefPtr<TrackSourceInfo>);
+ static Ref<SourceInfo> create(Ref<TrackSourceInfo>&&);
const AtomicString& sourceId() const { return m_trackSourceInfo->id(); }
const AtomicString& label() const { return m_trackSourceInfo->label(); }
@@ -47,9 +47,9 @@
const AtomicString& kind() const;
private:
- SourceInfo(PassRefPtr<TrackSourceInfo>);
+ SourceInfo(Ref<TrackSourceInfo>&&);
- RefPtr<TrackSourceInfo> m_trackSourceInfo;
+ Ref<TrackSourceInfo> m_trackSourceInfo;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaClient.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/UserMediaClient.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaClient.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -33,8 +33,6 @@
#if ENABLE(MEDIA_STREAM)
-#include <wtf/PassRefPtr.h>
-
namespace WebCore {
class Page;
Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -92,10 +92,10 @@
request->start();
}
-UserMediaRequest::UserMediaRequest(ScriptExecutionContext* context, UserMediaController* controller, PassRefPtr<MediaConstraints> audioConstraints, PassRefPtr<MediaConstraints> videoConstraints, MediaDevices::Promise&& promise)
+UserMediaRequest::UserMediaRequest(ScriptExecutionContext* context, UserMediaController* controller, RefPtr<MediaConstraints>&& audioConstraints, RefPtr<MediaConstraints>&& videoConstraints, MediaDevices::Promise&& promise)
: ContextDestructionObserver(context)
- , m_audioConstraints(audioConstraints)
- , m_videoConstraints(videoConstraints)
+ , m_audioConstraints(WTFMove(audioConstraints))
+ , m_videoConstraints(WTFMove(videoConstraints))
, m_controller(controller)
, m_promise(WTFMove(promise))
{
@@ -163,13 +163,13 @@
failedToCreateStreamWithConstraintsError(constraintName);
}
-void UserMediaRequest::didCreateStream(PassRefPtr<MediaStreamPrivate> privateStream)
+void UserMediaRequest::didCreateStream(RefPtr<MediaStreamPrivate>&& privateStream)
{
if (!m_scriptExecutionContext)
return;
// 4 - Create the MediaStream and pass it to the success callback.
- Ref<MediaStream> stream = MediaStream::create(*m_scriptExecutionContext, privateStream);
+ Ref<MediaStream> stream = MediaStream::create(*m_scriptExecutionContext, WTFMove(privateStream));
if (m_audioConstraints) {
for (auto& track : stream->getAudioTracks()) {
track->applyConstraints(*m_audioConstraints);
Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h (204238 => 204239)
--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -38,7 +38,6 @@
#include "ActiveDOMObject.h"
#include "MediaDevices.h"
#include "MediaStreamCreationClient.h"
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
@@ -74,12 +73,12 @@
const String& allowedVideoDeviceUID() const { return m_allowedVideoDeviceUID; }
private:
- UserMediaRequest(ScriptExecutionContext*, UserMediaController*, PassRefPtr<MediaConstraints> audioConstraints, PassRefPtr<MediaConstraints> videoConstraints, MediaDevices::Promise&&);
+ UserMediaRequest(ScriptExecutionContext*, UserMediaController*, RefPtr<MediaConstraints>&& audioConstraints, RefPtr<MediaConstraints>&& videoConstraints, MediaDevices::Promise&&);
// MediaStreamCreationClient
void constraintsValidated(const Vector<RefPtr<RealtimeMediaSource>>& audioTracks, const Vector<RefPtr<RealtimeMediaSource>>& videoTracks) final;
void constraintsInvalid(const String& constraintName) final;
- void didCreateStream(PassRefPtr<MediaStreamPrivate>) final;
+ void didCreateStream(RefPtr<MediaStreamPrivate>&&) final;
void failedToCreateStreamWithConstraintsError(const String& constraintName) final;
void failedToCreateStreamWithPermissionError() final;
Modified: trunk/Source/WebCore/Modules/webdatabase/Database.cpp (204238 => 204239)
--- trunk/Source/WebCore/Modules/webdatabase/Database.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/Modules/webdatabase/Database.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -54,7 +54,6 @@
#include "SecurityOrigin.h"
#include "VoidCallback.h"
#include <wtf/NeverDestroyed.h>
-#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/StdLibExtras.h>
#include <wtf/text/CString.h>
@@ -246,7 +245,7 @@
if (!m_scriptExecutionContext->isContextThread()) {
// Grab a pointer to the script execution here because we're releasing it when we pass it to
// DerefContextTask::create.
- PassRefPtr<ScriptExecutionContext> passedContext = m_scriptExecutionContext.release();
+ RefPtr<ScriptExecutionContext> passedContext = WTFMove(m_scriptExecutionContext);
passedContext->postTask({ScriptExecutionContext::Task::CleanupTask, [passedContext] (ScriptExecutionContext& context) {
ASSERT_UNUSED(context, &context == passedContext);
RefPtr<ScriptExecutionContext> scriptExecutionContext(passedContext);
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (204238 => 204239)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -1837,7 +1837,7 @@
TrackDisplayUpdateScope scope(this);
for (size_t i = 0; i < cues->length(); ++i)
- textTrackAddCue(track, cues->item(i));
+ textTrackAddCue(track, *cues->item(i));
}
void HTMLMediaElement::textTrackRemoveCues(TextTrack*, const TextTrackCueList* cues)
@@ -1844,54 +1844,51 @@
{
TrackDisplayUpdateScope scope(this);
for (size_t i = 0; i < cues->length(); ++i)
- textTrackRemoveCue(cues->item(i)->track(), cues->item(i));
+ textTrackRemoveCue(cues->item(i)->track(), *cues->item(i));
}
-void HTMLMediaElement::textTrackAddCue(TextTrack* track, PassRefPtr<TextTrackCue> prpCue)
+void HTMLMediaElement::textTrackAddCue(TextTrack* track, TextTrackCue& cue)
{
if (track->mode() == TextTrack::Mode::Disabled)
return;
- RefPtr<TextTrackCue> cue = prpCue;
-
// Negative duration cues need be treated in the interval tree as
// zero-length cues.
- MediaTime endTime = std::max(cue->startMediaTime(), cue->endMediaTime());
+ MediaTime endTime = std::max(cue.startMediaTime(), cue.endMediaTime());
- CueInterval interval = m_cueTree.createInterval(cue->startMediaTime(), endTime, cue.get());
+ CueInterval interval = m_cueTree.createInterval(cue.startMediaTime(), endTime, &cue);
if (!m_cueTree.contains(interval))
m_cueTree.add(interval);
updateActiveTextTrackCues(currentMediaTime());
}
-void HTMLMediaElement::textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue> prpCue)
+void HTMLMediaElement::textTrackRemoveCue(TextTrack*, TextTrackCue& cue)
{
- RefPtr<TextTrackCue> cue = prpCue;
// Negative duration cues need to be treated in the interval tree as
// zero-length cues.
- MediaTime endTime = std::max(cue->startMediaTime(), cue->endMediaTime());
+ MediaTime endTime = std::max(cue.startMediaTime(), cue.endMediaTime());
- CueInterval interval = m_cueTree.createInterval(cue->startMediaTime(), endTime, cue.get());
+ CueInterval interval = m_cueTree.createInterval(cue.startMediaTime(), endTime, &cue);
m_cueTree.remove(interval);
// Since the cue will be removed from the media element and likely the
// TextTrack might also be destructed, notifying the region of the cue
// removal shouldn't be done.
- if (cue->isRenderable())
- toVTTCue(cue.get())->notifyRegionWhenRemovingDisplayTree(false);
+ if (cue.isRenderable())
+ toVTTCue(&cue)->notifyRegionWhenRemovingDisplayTree(false);
size_t index = m_currentlyActiveCues.find(interval);
if (index != notFound) {
- cue->setIsActive(false);
+ cue.setIsActive(false);
m_currentlyActiveCues.remove(index);
}
- if (cue->isRenderable())
- toVTTCue(cue.get())->removeDisplayTree();
+ if (cue.isRenderable())
+ toVTTCue(&cue)->removeDisplayTree();
updateActiveTextTrackCues(currentMediaTime());
- if (cue->isRenderable())
- toVTTCue(cue.get())->notifyRegionWhenRemovingDisplayTree(true);
+ if (cue.isRenderable())
+ toVTTCue(&cue)->notifyRegionWhenRemovingDisplayTree(true);
}
#endif
Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (204238 => 204239)
--- trunk/Source/WebCore/html/HTMLMediaElement.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -333,8 +333,8 @@
void textTrackModeChanged(TextTrack*) override;
void textTrackAddCues(TextTrack*, const TextTrackCueList*) override;
void textTrackRemoveCues(TextTrack*, const TextTrackCueList*) override;
- void textTrackAddCue(TextTrack*, PassRefPtr<TextTrackCue>) override;
- void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>) override;
+ void textTrackAddCue(TextTrack*, TextTrackCue&) override;
+ void textTrackRemoveCue(TextTrack*, TextTrackCue&) override;
// VideoTrackClient
void videoTrackSelectedChanged(VideoTrack*) override;
Modified: trunk/Source/WebCore/html/HTMLTrackElement.cpp (204238 => 204239)
--- trunk/Source/WebCore/html/HTMLTrackElement.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/html/HTMLTrackElement.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -306,13 +306,13 @@
return parent->textTrackRemoveCues(track, cues);
}
-void HTMLTrackElement::textTrackAddCue(TextTrack* track, PassRefPtr<TextTrackCue> cue)
+void HTMLTrackElement::textTrackAddCue(TextTrack* track, TextTrackCue& cue)
{
if (HTMLMediaElement* parent = mediaElement())
return parent->textTrackAddCue(track, cue);
}
-void HTMLTrackElement::textTrackRemoveCue(TextTrack* track, PassRefPtr<TextTrackCue> cue)
+void HTMLTrackElement::textTrackRemoveCue(TextTrack* track, TextTrackCue& cue)
{
if (HTMLMediaElement* parent = mediaElement())
return parent->textTrackRemoveCue(track, cue);
Modified: trunk/Source/WebCore/html/HTMLTrackElement.h (204238 => 204239)
--- trunk/Source/WebCore/html/HTMLTrackElement.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/html/HTMLTrackElement.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -78,8 +78,8 @@
void textTrackKindChanged(TextTrack*) final;
void textTrackAddCues(TextTrack*, const TextTrackCueList*) final;
void textTrackRemoveCues(TextTrack*, const TextTrackCueList*) final;
- void textTrackAddCue(TextTrack*, PassRefPtr<TextTrackCue>) final;
- void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>) final;
+ void textTrackAddCue(TextTrack*, TextTrackCue&) final;
+ void textTrackRemoveCue(TextTrack*, TextTrackCue&) final;
LoadableTextTrack& ensureTrack();
bool canLoadURL(const URL&);
Modified: trunk/Source/WebCore/html/track/TextTrack.cpp (204238 => 204239)
--- trunk/Source/WebCore/html/track/TextTrack.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/html/track/TextTrack.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -326,7 +326,7 @@
ensureTextTrackCueList().add(cue);
if (m_client)
- m_client->textTrackAddCue(this, cue.get());
+ m_client->textTrackAddCue(this, *cue);
}
void TextTrack::removeCue(TextTrackCue* cue, ExceptionCode& ec)
@@ -353,7 +353,7 @@
cue->setTrack(0);
if (m_client)
- m_client->textTrackRemoveCue(this, cue);
+ m_client->textTrackRemoveCue(this, *cue);
}
VTTRegionList& TextTrack::ensureVTTRegionList()
@@ -434,7 +434,7 @@
// The cue may need to be repositioned in the media element's interval tree, may need to
// be re-rendered, etc, so remove it before the modification...
- m_client->textTrackRemoveCue(this, cue);
+ m_client->textTrackRemoveCue(this, *cue);
}
void TextTrack::cueDidChange(TextTrackCue* cue)
@@ -446,7 +446,7 @@
ensureTextTrackCueList().updateCueIndex(cue);
// ... and add it back again.
- m_client->textTrackAddCue(this, cue);
+ m_client->textTrackAddCue(this, *cue);
}
int TextTrack::trackIndex()
Modified: trunk/Source/WebCore/html/track/TextTrack.h (204238 => 204239)
--- trunk/Source/WebCore/html/track/TextTrack.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/html/track/TextTrack.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -49,8 +49,8 @@
virtual void textTrackModeChanged(TextTrack*) = 0;
virtual void textTrackAddCues(TextTrack*, const TextTrackCueList*) = 0;
virtual void textTrackRemoveCues(TextTrack*, const TextTrackCueList*) = 0;
- virtual void textTrackAddCue(TextTrack*, PassRefPtr<TextTrackCue>) = 0;
- virtual void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>) = 0;
+ virtual void textTrackAddCue(TextTrack*, TextTrackCue&) = 0;
+ virtual void textTrackRemoveCue(TextTrack*, TextTrackCue&) = 0;
};
class TextTrack : public TrackBase, public EventTargetWithInlineData {
Modified: trunk/Source/WebCore/platform/gamepad/efl/GamepadsEfl.cpp (204238 => 204239)
--- trunk/Source/WebCore/platform/gamepad/efl/GamepadsEfl.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/platform/gamepad/efl/GamepadsEfl.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -224,7 +224,7 @@
gamepad->axes(gamepadDevice->axesCount(), gamepadDevice->axesData());
gamepad->buttons(gamepadDevice->buttonsCount(), gamepadDevice->buttonsData());
- into->set(i, gamepad);
+ into->set(i, WTFMove(gamepad));
} else
into->set(i, 0);
}
Modified: trunk/Source/WebCore/platform/graphics/SourceBufferPrivateClient.h (204238 => 204239)
--- trunk/Source/WebCore/platform/graphics/SourceBufferPrivateClient.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/platform/graphics/SourceBufferPrivateClient.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -66,7 +66,7 @@
Vector<TextTrackInformation> textTracks;
};
virtual void sourceBufferPrivateDidReceiveInitializationSegment(SourceBufferPrivate*, const InitializationSegment&) = 0;
- virtual void sourceBufferPrivateDidReceiveSample(SourceBufferPrivate*, PassRefPtr<MediaSample>) = 0;
+ virtual void sourceBufferPrivateDidReceiveSample(SourceBufferPrivate*, MediaSample&) = 0;
virtual bool sourceBufferPrivateHasAudio(const SourceBufferPrivate*) const = 0;
virtual bool sourceBufferPrivateHasVideo(const SourceBufferPrivate*) const = 0;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (204238 => 204239)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm 2016-08-07 05:52:23 UTC (rev 204239)
@@ -568,9 +568,9 @@
if (m_client) {
- RefPtr<MediaSample> mediaSample = MediaSampleAVFObjC::create(sampleBuffer, trackID);
- LOG(MediaSourceSamples, "SourceBufferPrivateAVFObjC::processCodedFrame(%p) - sample(%s)", this, toString(*mediaSample).utf8().data());
- m_client->sourceBufferPrivateDidReceiveSample(this, WTFMove(mediaSample));
+ Ref<MediaSample> mediaSample = MediaSampleAVFObjC::create(sampleBuffer, trackID);
+ LOG(MediaSourceSamples, "SourceBufferPrivateAVFObjC::processCodedFrame(%p) - sample(%s)", this, toString(mediaSample.get()).utf8().data());
+ m_client->sourceBufferPrivateDidReceiveSample(this, mediaSample);
}
return true;
Modified: trunk/Source/WebCore/platform/mediastream/MediaStreamCreationClient.h (204238 => 204239)
--- trunk/Source/WebCore/platform/mediastream/MediaStreamCreationClient.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/platform/mediastream/MediaStreamCreationClient.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -42,7 +42,7 @@
virtual void constraintsValidated(const Vector<RefPtr<RealtimeMediaSource>>& audioTracks, const Vector<RefPtr<RealtimeMediaSource>>& videoTracks) = 0;
virtual void constraintsInvalid(const String& constraintName) = 0;
- virtual void didCreateStream(PassRefPtr<MediaStreamPrivate>) = 0;
+ virtual void didCreateStream(RefPtr<MediaStreamPrivate>&&) = 0;
virtual void failedToCreateStreamWithConstraintsError(const String& constraintName) = 0;
virtual void failedToCreateStreamWithPermissionError() = 0;
};
Modified: trunk/Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.h (204238 => 204239)
--- trunk/Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.h 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.h 2016-08-07 05:52:23 UTC (rev 204239)
@@ -61,7 +61,7 @@
static AVCaptureDeviceManager& singleton();
RefPtr<RealtimeMediaSource> sourceWithUID(const String&, RealtimeMediaSource::Type, MediaConstraints*) override;
- Vector<RefPtr<RealtimeMediaSource>> bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type, PassRefPtr<MediaConstraints>) override;
+ Vector<RefPtr<RealtimeMediaSource>> bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type, MediaConstraints&) override;
TrackSourceInfoVector getSourcesInfo(const String&) override;
bool verifyConstraintsForMediaType(RealtimeMediaSource::Type, MediaConstraints*, const CaptureSessionInfo*, String&) override;
Modified: trunk/Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm (204238 => 204239)
--- trunk/Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm 2016-08-07 05:52:23 UTC (rev 204239)
@@ -224,7 +224,7 @@
[m_objcObserver disconnect];
}
-Vector<RefPtr<RealtimeMediaSource>> AVCaptureDeviceManager::bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type type, PassRefPtr<MediaConstraints> constraints)
+Vector<RefPtr<RealtimeMediaSource>> AVCaptureDeviceManager::bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type type, MediaConstraints& constraints)
{
if (!isAvailable())
return Vector<RefPtr<RealtimeMediaSource>>();
Modified: trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp (204238 => 204239)
--- trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -82,7 +82,7 @@
return;
}
- audioSources = AVCaptureDeviceManager::singleton().bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type::Audio, audioConstraints);
+ audioSources = AVCaptureDeviceManager::singleton().bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type::Audio, *audioConstraints);
}
if (videoConstraints) {
@@ -93,7 +93,7 @@
return;
}
- videoSources = AVCaptureDeviceManager::singleton().bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type::Video, videoConstraints);
+ videoSources = AVCaptureDeviceManager::singleton().bestSourcesForTypeAndConstraints(RealtimeMediaSource::Type::Video, *videoConstraints);
}
client->constraintsValidated(audioSources, videoSources);
}
@@ -116,7 +116,7 @@
}
// FIXME: Consider the constraints when choosing among multiple devices. For now just select the first available
// device of the appropriate type.
- auto audioSource = AVCaptureDeviceManager::singleton().bestSourcesForTypeAndConstraints(RealtimeMediaSource::Audio, audioConstraints.get()).at(0);
+ auto audioSource = AVCaptureDeviceManager::singleton().bestSourcesForTypeAndConstraints(RealtimeMediaSource::Audio, *audioConstraints).at(0);
ASSERT(audioSource);
audioSources.append(WTFMove(audioSource));
@@ -131,7 +131,7 @@
}
// FIXME: Consider the constraints when choosing among multiple devices. For now just select the first available
// device of the appropriate type.
- auto videoSource = AVCaptureDeviceManager::singleton().bestSourcesForTypeAndConstraints(RealtimeMediaSource::Video, videoConstraints.get()).at(0);
+ auto videoSource = AVCaptureDeviceManager::singleton().bestSourcesForTypeAndConstraints(RealtimeMediaSource::Video, *videoConstraints).at(0);
ASSERT(videoSource);
videoSources.append(WTFMove(videoSource));
Modified: trunk/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp (204238 => 204239)
--- trunk/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp 2016-08-07 04:21:37 UTC (rev 204238)
+++ trunk/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp 2016-08-07 05:52:23 UTC (rev 204239)
@@ -20,7 +20,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
@@ -44,7 +44,7 @@
class MockMediaSample final : public MediaSample {
public:
- static RefPtr<MockMediaSample> create(const MockSampleBox& box) { return adoptRef(new MockMediaSample(box)); }
+ static Ref<MockMediaSample> create(const MockSampleBox& box) { return adoptRef(*new MockMediaSample(box)); }
virtual ~MockMediaSample() { }
private: