Put a strong reference from a JSEventListener to its wrapper.

This should fix #54.
Get MEDIA_STREAM compiling on OSX https://bugs.webkit.org/show_bug.cgi?id=120650

Reviewed by Darin Adler.

No new tests, the code changed doesn't run on OSX yet.

* DerivedSources.make: Add MediaStream idl files.

* Modules/mediastream/LocalMediaStream.h: Mark class as FINAL.

* Modules/mediastream/MediaConstraintsImpl.cpp:
(WebCore::MediaConstraintsImpl::getOptionalConstraints): append -> appendRange so we don't
    need a MediaConstraint copy constructor.

* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::send): Remove an unused parameter name.
* Modules/mediastream/RTCDataChannel.h: ArrayBuffer and ArrayBufferView are in the JSC namespace.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection): loader() doesn't return a pointer.
(WebCore::RTCPeerConnection::localDescription): Set the ExceptionCode on error.
(WebCore::RTCPeerConnection::remoteDescription): Ditto.

* Modules/mediastream/RTCSessionDescription.cpp:
(WebCore::RTCSessionDescription::setSdp): Remove the unused ExceptionCode parameter.
* Modules/mediastream/RTCSessionDescription.h: Ditto.
* Modules/mediastream/RTCSessionDescription.idl: Ditto.

* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::canGetItemsForName): Add so JSRTCStatsResponse::canGetItemsForName
    doesn't cause ref count churn.
* Modules/mediastream/RTCStatsResponse.h: Mark class as FINAL. Declare canGetItemsForName.

* WebCore.xcodeproj/project.pbxproj: Add new files.

* bindings/js/JSRTCStatsResponseCustom.cpp:
(WebCore::JSRTCStatsResponse::canGetItemsForName): Use canGetItemsForName instead of namedItem.
    Use propertyNameToAtomicString instead of propertyNameToString
(WebCore::JSRTCStatsResponse::nameGetter): Use propertyNameToAtomicString instead of
    propertyNameToString because namedItem takes an AtomicString.

* platform/mediastream/mac: Added.
* platform/mediastream/mac/MediaStreamCenterMac.cpp: Added.
* platform/mediastream/mac/MediaStreamCenterMac.h: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
	Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
	Source/WebCore/WebCore.xcodeproj/project.pbxproj
Get MEDIA_STREAM compiling for other ports (EFL and GTK) https://bugs.webkit.org/show_bug.cgi?id=120811

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-09-06
Reviewed by Eric Carlson.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/mediastream/LocalMediaStream.h:
* Modules/mediastream/MediaStreamRegistry.cpp:
(WebCore::MediaStreamRegistry::lookupMediaStreamDescriptor):
* Modules/mediastream/RTCStatsResponse.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155248 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
MediaStream should fire ended event when all tracks are ended https://bugs.webkit.org/show_bug.cgi?id=120871

Reviewed by Jer Noble.

Merge https://chromium.googlesource.com/chromium/blink/+/bebd179b65be69e46f2f434a3ec8b1e4aa85cc42

Source/WebCore:

Test: fast/mediastream/MediaStream-onended.html

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::trackEnded): New.
* Modules/mediastream/MediaStream.h:

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::sourceChangedState): Call didEndTrack when state changes to ReadyStateEnded.
(WebCore::MediaStreamTrack::didEndTrack): New.
(WebCore::MediaStreamTrack::stop): Call didEndTrack.
* Modules/mediastream/MediaStreamTrack.h:

* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Require didEndTrack.

LayoutTests:

* fast/mediastream/MediaStream-onended-expected.txt: Added.
* fast/mediastream/MediaStream-onended.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155249 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	LayoutTests/ChangeLog
	Source/WebCore/ChangeLog
Adding username to RTCIceServer https://bugs.webkit.org/show_bug.cgi?id=120861

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-09-09
Reviewed by Eric Carlson.

No new tests needed. Existing media stream tests already cover it

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::parseConfiguration):
* platform/mediastream/RTCConfiguration.h:
(WebCore::RTCIceServer::create):
(WebCore::RTCIceServer::username):
(WebCore::RTCIceServer::RTCIceServer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155346 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
MediaStream API: Moving Add/Remove track from WebMediaStreamCenterClient to WebMediaStream https://bugs.webkit.org/show_bug.cgi?id=120872

Reviewed by Jer Noble.

Merge https://chromium.googlesource.com/chromium/blink/+/7d740fd27c1f345b59c846df01c3adce53c18e6e
Simple cleanup that makes the API cleaner.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::addRemoteTrack):
(WebCore::MediaStream::removeRemoteTrack):
* platform/mediastream/MediaStreamCenter.cpp:
* platform/mediastream/MediaStreamCenter.h:
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::removeAudioComponent):
(WebCore::MediaStreamDescriptor::addRemoteTrack):
(WebCore::MediaStreamDescriptor::removeRemoteTrack):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155362 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
MediaStream API: Stop means stop https://bugs.webkit.org/show_bug.cgi?id=120873

Reviewed by Jer Noble.

Merge blink https://chromium.googlesource.com/chromium/blink/+/9a97b0f3892320fa5741485e06a78183b77c3635
by Tommy Widenflycht.

Removing notification functionality from MediaStreamTrack::stop because the world is being torn down.

No new tests, the original author was unable to come up with a reliable test case.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::stop): Don't call didEndTrack, the world is going away.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155364 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
MediaStream API: Enhance MediaStreamDescriptor add/remove component https://bugs.webkit.org/show_bug.cgi?id=120874

Merge blink https://chromium.googlesource.com/chromium/blink/+/67fcacf13ce922a762d7a1c6fb9e1b8e51e662ea

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-09-10
Reviewed by Eric Carlson.

No new tests needed.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::addRemoteTrack):
(WebCore::MediaStream::removeRemoteTrack):
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::addRemoteTrack):
(WebCore::MediaStreamDescriptor::removeRemoteTrack):
(WebCore::MediaStreamDescriptor::addComponent):
(WebCore::MediaStreamDescriptor::removeComponent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155434 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
	Source/WebCore/platform/mediastream/MediaStreamDescriptor.h
Split MediaStreamDescriptor.h and MediaStreamComponent.h into .h and .cpp https://bugs.webkit.org/show_bug.cgi?id=120878

Reviewed by Jer Noble.

No new tests, no functional change.

* CMakeLists.txt: Add MediaStreamComponent.cpp and MediaStreamDescriptor.cpp.
* GNUmakefile.list.am: Ditto.

* Modules/mediastream/LocalMediaStream.cpp:
(WebCore::LocalMediaStream::create): MediaStreamDescriptor::create() doesn't take a UUID.

* Modules/mediastream/MediaStream.cpp:
(WebCore::createFromSourceVectors): Ditto.

* WebCore.xcodeproj/project.pbxproj: Add MediaStreamComponent.cpp and MediaStreamDescriptor.cpp.

* platform/mediastream/MediaStreamComponent.cpp: Added.
* platform/mediastream/MediaStreamComponent.h:

* platform/mediastream/MediaStreamDescriptor.cpp: Added.
* platform/mediastream/MediaStreamDescriptor.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155477 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
	Source/WebCore/platform/mediastream/MediaStreamDescriptor.h
Make MediaStream objects ScriptWrappable https://bugs.webkit.org/show_bug.cgi?id=120879

Reviewed by Jer Noble.

* Modules/mediastream/MediaStream.h: Inherit from ScriptWrappable.
* Modules/mediastream/MediaStreamTrack.h: Ditto.
* Modules/mediastream/RTCDTMFSender.h: Ditto.
* Modules/mediastream/RTCDataChannel.h: Ditto.
* Modules/mediastream/RTCIceCandidate.h: Ditto.
* Modules/mediastream/RTCPeerConnection.h: Ditto.
* Modules/mediastream/RTCSessionDescription.h: Ditto.
* Modules/mediastream/RTCStatsReport.h: Ditto.
* Modules/mediastream/RTCStatsResponse.h: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155478 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
MediaStream API: Remove LocalMediaStream https://bugs.webkit.org/show_bug.cgi?id=120875

blink merge: https://chromium.googlesource.com/chromium/blink/+/81643ee3fe048a64fa8931132e1294fa2c8e821a

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-09-11
Reviewed by Eric Carlson.

Source/WebCore:

Existing tests were updated.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* Modules/mediastream/LocalMediaStream.cpp: Removed.
* Modules/mediastream/LocalMediaStream.h: Removed.
* Modules/mediastream/LocalMediaStream.idl: Removed.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::stop):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.h:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::succeed):
* Modules/mediastream/UserMediaRequest.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
* WebCore.xcodeproj/project.pbxproj:
* dom/EventTarget.h:
* dom/EventTargetFactory.in:
* platform/mediastream/MediaStreamDescriptor.h:

LayoutTests:

* fast/mediastream/LocalMediaStream-onended-expected.txt: Removed.
* fast/mediastream/LocalMediaStream-onended.html: Removed.
* fast/mediastream/MediaStream-onended-expected.txt:
* fast/mediastream/MediaStream-onended.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155573 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	LayoutTests/ChangeLog
	Source/WebCore/ChangeLog
Updating NavigatorUserMediaError to match the spec https://bugs.webkit.org/show_bug.cgi?id=120880

Reviewed by Darin Adler.

Merge https://chromium.googlesource.com/chromium/blink/+/f07305e49ddebaa166f5dee514bcc881a8efd341
by Tommy Widenflycht.

The Blink change did not have any test changes because they don't appear to have any tests
for NavigatorUserMediaError. I can't add tests now because the MediaStream feature isn't enabled
yet, so https://bugs.webkit.org/show_bug.cgi?id=121182 tracks adding tests.

* Modules/mediastream/NavigatorUserMediaError.h:
(WebCore::NavigatorUserMediaError::create):
(WebCore::NavigatorUserMediaError::name):
(WebCore::NavigatorUserMediaError::message):
(WebCore::NavigatorUserMediaError::constraintName):
(WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
* Modules/mediastream/NavigatorUserMediaError.idl:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::fail):
(WebCore::UserMediaRequest::failConstraint):
* Modules/mediastream/UserMediaRequest.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155579 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
CodeGeneratorJS doesn't generate header includes for sequence<type>
https://bugs.webkit.org/show_bug.cgi?id=121314

Reviewed by Dean Jackson.

* bindings/scripts/CodeGeneratorJS.pm:
(SkipIncludeHeader): Don't return false for sequence and array types.
(AddIncludesForType): Do add includes for sequence and array types.
(GenerateCallbackImplementation):
* bindings/scripts/test/JS/JSTestTypedefs.cpp: Regenerated
* bindings/scripts/test/JS/JSTestTypedefs.h: Ditto.
* bindings/scripts/test/TestTypedefs.idl: Add a method that takes a sequence<TestEventTarget>.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155718 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
	Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
remove MediaStream.label https://bugs.webkit.org/show_bug.cgi?id=121337

Reviewed by Sam Weinig.

No new tests or modified tests, this attribute was apparently never tested.

* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStream.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155789 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
MediaStream API: Update RTCDataChannel to match the specification https://bugs.webkit.org/show_bug.cgi?id=120889

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-09-14
Reviewed by Eric Carlson

Merged from https://chromium.googlesource.com/chromium/blink/+/c3862b0a83e20fc8b1f770c7e4a886a7cceb80d2
by Tommy Widenflycht.

According to WebRTC specification, RTCDataChannel must have the following new attributes:
boolean ordered
unsigned short maxRetransmitTime
unsigned short maxRetransmits
DOMString protocol
boolean negotiated
unsigned short id

and the following one was deprecated:
boolean reliable

Test updates will be landed with https://webkit.org/b/121102.

* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::ordered):
(WebCore::RTCDataChannel::maxRetransmitTime):
(WebCore::RTCDataChannel::maxRetransmits):
(WebCore::RTCDataChannel::protocol):
(WebCore::RTCDataChannel::negotiated):
(WebCore::RTCDataChannel::id):
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCDataChannel.idl:
* platform/mediastream/RTCDataChannelHandler.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155792 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
MediaStream API: Update RTCDataChannel https://bugs.webkit.org/show_bug.cgi?id=121102

Reviewed by Sam Weinig.

Source/WebCore:

Based on https://chromium.googlesource.com/chromium/blink/+/c6975c41956acded7cf0363012d7d6b69d0c6d96,
and https://chromium.googlesource.com/chromium/blink/+/214dab0bd6385f573c918ba5ce58a5aa206ce186.

No new tests, existing tests updated.

* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::create): Take an options Dictionary.
(WebCore::RTCDataChannel::didChangeReadyState): String -> AtomicString. Early return if the
    state hasn't changed.
(WebCore::RTCDataChannel::binaryType): String -> AtomicString.
(WebCore::RTCDataChannel::setBinaryType): String -> AtomicString.
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCDataChannel.idl:

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createDataChannel): Take an options struct.
* platform/mediastream/RTCDataChannelHandler.h:

* platform/mediastream/RTCPeerConnectionHandler.h:
(WebCore::RTCDataChannelInit::RTCDataChannelInit): Take an options struct.

LayoutTests:

* fast/mediastream/RTCPeerConnection-datachannel-expected.txt:
* fast/mediastream/RTCPeerConnection-datachannel.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155794 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	LayoutTests/ChangeLog
	LayoutTests/fast/mediastream/RTCPeerConnection-datachannel-expected.txt
	LayoutTests/fast/mediastream/RTCPeerConnection-datachannel.html
	Source/WebCore/ChangeLog
	Source/WebCore/Modules/mediastream/RTCDataChannel.cpp
	Source/WebCore/Modules/mediastream/RTCDataChannel.h
MediaStream API: Storing the constraints in MediaStreamSource https://bugs.webkit.org/show_bug.cgi?id=120882

based on: https://chromium.googlesource.com/chromium/blink/+/04ac7655b54ae98f55774afde3f8e92b6c6302e6

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-09-16
Reviewed by Eric Carlson.

No new tests needed.

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::succeed):
* platform/mediastream/MediaStreamSource.h:
(WebCore::MediaStreamSource::setConstraints):
(WebCore::MediaStreamSource::constraints):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155881 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	Source/WebCore/ChangeLog
MediaStream API: Adding an async RTCPeerConnection::addIceCandidate https://bugs.webkit.org/show_bug.cgi?id=121403

Source/WebCore:

Merged from https://chromium.googlesource.com/chromium/blink/+/5bd81fda88d48dd2780832246e7d1ab973ee7a1d

Reviewed by Darin Adler.

No new tests, updated RTCPeerConnection-ice.html.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addIceCandidate): Add success and error callbacks.
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:

* platform/mediastream/RTCPeerConnectionHandler.h: Changed addIceCandidate signature.

* platform/mediastream/RTCVoidRequest.h: Removed ExtraData, it is unnecessary.

LayoutTests:

Reviewed by Darin Adler.

* fast/mediastream/RTCPeerConnection-ice-expected.txt:
* fast/mediastream/RTCPeerConnection-ice.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	LayoutTests/ChangeLog
	LayoutTests/fast/mediastream/RTCPeerConnection-ice-expected.txt
	LayoutTests/fast/mediastream/RTCPeerConnection-ice.html
	Source/WebCore/ChangeLog
MediaStream API: Changing the device enumeration to be async https://bugs.webkit.org/show_bug.cgi?id=120883

Reviewed by Darin Adler.

Source/WebCore:

Parts merged from https://chromium.googlesource.com/chromium/blink/+/40a96080a1531e50de4eb84571c7dc9fb321ece5
and https://chromium.googlesource.com/chromium/blink/+/ff783a23bb1add588971a8187048a305cf485121
by Tommy Widenflycht.

Test: fast/mediastream/MediaStreamTrack-getSources.html

* CMakeLists.txt: Added new files.
* DerivedSources.make: Ditto.
* GNUmakefile.list.am: Ditto.

* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::kind): ASCIILiteral -> NeverDestroyed<AtomicString>.
(WebCore::MediaStreamTrack::readyState): Ditto.
(WebCore::MediaStreamTrack::getSources): New.
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:

* Modules/mediastream/MediaStreamTrackSourcesCallback.h: Added.
* Modules/mediastream/MediaStreamTrackSourcesCallback.idl: Added.
* Modules/mediastream/MediaStreamTrackSourcesRequest.cpp: Added.
* Modules/mediastream/MediaStreamTrackSourcesRequest.h: Added.

* Modules/mediastream/SourceInfo.cpp: Added.
* Modules/mediastream/SourceInfo.h: Added.
* Modules/mediastream/SourceInfo.idl: Added.

* WebCore.xcodeproj/project.pbxproj: Add new files.

* bindings/js/JSDOMBinding.h: Add toJS templates for Vector<T> and Vector<RefPtr<T>>.

* platform/mediastream/MediaStreamCenter.h: Add prototype for getMediaStreamTrackSources.

* platform/mediastream/MediaStreamTrackSourcesRequestClient.h: Added.

* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
(WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added.
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:

* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
(WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:

* platform/mediastream/mac/MediaStreamCenterMac.cpp:
(WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added.
* platform/mediastream/mac/MediaStreamCenterMac.h:

LayoutTests:

* fast/mediastream/MediaStreamTrack-getSources-expected.txt: Added.
* fast/mediastream/MediaStreamTrack-getSources.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155992 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Conflicts:
	LayoutTests/ChangeLog
	Source/WebCore/ChangeLog
Merge blink MediaSource changes since fork. https://bugs.webkit.org/show_bug.cgi?id=118752

Note: MediaSource parts ripped out of the patch to keep MediaStream
changes only. Those should have landed separately in the first place...
Rubber-stamped by Eric Carlson.

Source/WebCore:

Tests: http/tests/media/media-source/mediasource-addsourcebuffer.html
       http/tests/media/media-source/mediasource-append-buffer.html
       http/tests/media/media-source/mediasource-buffered.html
       http/tests/media/media-source/mediasource-closed.html
       http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html
       http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
       http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html
       http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html
       http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html
       http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html
       http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html
       http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html
       http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html
       http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html
       http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html
       http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html
       http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html
       http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html
       http/tests/media/media-source/mediasource-is-type-supported.html
       http/tests/media/media-source/mediasource-multiple-attach.html
       http/tests/media/media-source/mediasource-play.html
       http/tests/media/media-source/mediasource-sourcebufferlist.html

Add files to project. Fix compile errors exposed by enabling.

* WebCore.xcodeproj/project.pbxproj:
* Modules/mediasource/MediaSourceRegistry.cpp:
(WebCore::MediaSourceRegistry::lookupMediaSource):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
(WebCore::MediaPlayerPrivateQTKit::load):
* platform/mac/MIMETypeRegistryMac.mm:
(WebCore::MIMETypeRegistry::isSupportedMediaSourceMIMEType):
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:

Merge
https://chromium.googlesource.com/chromium/blink/+/c38e2955db98a300a535b692869fea0e41501497
https://chromium.googlesource.com/chromium/blink/+/8568015e9bee1de7fccee28163f9e4a4b51f9baf
https://chromium.googlesource.com/chromium/blink/+/14417e8fa6294f4e7dbc1e0fac549398522b2f97
https://chromium.googlesource.com/chromium/blink/+/f43a5496f233102f8861a067a9cf8053c010d401
https://chromium.googlesource.com/chromium/blink/+/57771439806f7c6e6a272efb1ea72900f5f6a015
https://chromium.googlesource.com/chromium/blink/+/8c77a790a9d225194db0a8832399d0f9e1fa54ec
https://chromium.googlesource.com/chromium/blink/+/d33ae3fa7a8592e946503ed17f862a27c6d9dde1
https://chromium.googlesource.com/chromium/blink/+/1caaa9c51f06e1b9341d58c994f77fd59fcd236d
https://chromium.googlesource.com/chromium/blink/+/e95720393b0ebe67f19de39bb77cdf2926165512
https://chromium.googlesource.com/chromium/blink/+/bad2c1b4b70faec731b2ad3cc8a4ccf28de6cc38
https://chromium.googlesource.com/chromium/blink/+/a7873430c3d5c9373336c6f3993db3cb4228e9cd
https://chromium.googlesource.com/chromium/blink/+/508966d5e32360b3cec058f9fbae0014542fbc52
https://chromium.googlesource.com/chromium/blink/+/371dfe72f61ce6f73e6c242324da73c415d38be3

LayoutTests:

* http/tests/media/media-source/mediasource-addsourcebuffer-expected.txt: Added.
* http/tests/media/media-source/mediasource-addsourcebuffer.html: Added.
* http/tests/media/media-source/mediasource-append-buffer-expected.txt: Added.
* http/tests/media/media-source/mediasource-append-buffer.html: Added.
* http/tests/media/media-source/mediasource-buffered-expected.txt: Added.
* http/tests/media/media-source/mediasource-buffered.html: Added.
* http/tests/media/media-source/mediasource-closed-expected.txt: Added.
* http/tests/media/media-source/mediasource-closed.html: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-av-framesize-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-v-framerate-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-v-framesize-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html: Added.
* http/tests/media/media-source/mediasource-config-change-webm-a-bitrate-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html: Added.
* http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html: Added.
* http/tests/media/media-source/mediasource-config-change-webm-av-framesize-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html: Added.
* http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html: Added.
* http/tests/media/media-source/mediasource-config-change-webm-v-bitrate-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html: Added.
* http/tests/media/media-source/mediasource-config-change-webm-v-framerate-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html: Added.
* http/tests/media/media-source/mediasource-config-change-webm-v-framesize-expected.txt: Added.
* http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html: Added.
* http/tests/media/media-source/mediasource-config-changes.js: Added.
* http/tests/media/media-source/mediasource-is-type-supported-expected.txt: Added.
* http/tests/media/media-source/mediasource-is-type-supported.html: Added.
* http/tests/media/media-source/mediasource-multiple-attach-expected.txt: Added.
* http/tests/media/media-source/mediasource-multiple-attach.html: Added.
* http/tests/media/media-source/mediasource-play-expected.txt: Added.
* http/tests/media/media-source/mediasource-play.html: Added.
* http/tests/media/media-source/mediasource-sourcebufferlist-expected.txt: Added.
* http/tests/media/media-source/mediasource-sourcebufferlist.html: Added.
* http/tests/media/media-source/mediasource-util.js: Added.
* http/tests/media/media-source/video-media-source-objects-expected.txt:
* http/tests/media/resources/media-source/generate-config-change-tests.py: Added.
* http/tests/media/resources/media-source/mp4/test-a-128k-44100Hz-1ch-manifest.json: Added.
* http/tests/media/resources/media-source/mp4/test-a-192k-44100Hz-1ch-manifest.json: Added.
* http/tests/media/resources/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/mp4/test-v-128k-320x240-24fps-8kfr-manifest.json: Added.
* http/tests/media/resources/media-source/mp4/test-v-128k-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/mp4/test-v-128k-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/mp4/test-v-256k-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/webm/test-a-128k-44100Hz-1ch-manifest.json: Added.
* http/tests/media/resources/media-source/webm/test-a-192k-44100Hz-1ch-manifest.json: Added.
* http/tests/media/resources/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/webm/test-v-128k-320x240-24fps-8kfr-manifest.json: Added.
* http/tests/media/resources/media-source/webm/test-v-128k-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/webm/test-v-128k-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/resources/media-source/webm/test-v-256k-320x240-30fps-10kfr-manifest.json: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156049 268f45cc-cd09-0410-ab3c-d52691b4dbfc