Changeset 206208 in webkit
- Timestamp:
- Sep 21, 2016 9:12:33 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206206 r206208 1 2016-09-20 Jer Noble <jer.noble@apple.com> 2 3 [media-source] Fix imported/w3c/web-platform-tests/media-source/URL-createObjectURL-null.html 4 https://bugs.webkit.org/show_bug.cgi?id=162299 5 6 Reviewed by Eric Carlson. 7 8 * platform/mac/TestExpectations: 9 1 10 2016-09-21 Youenn Fablet <youenn@apple.com> 2 11 -
trunk/LayoutTests/platform/mac/TestExpectations
r206186 r206208 1044 1044 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/SourceBuffer-abort.html [ Pass ] 1045 1045 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/URL-createObjectURL.html [ Pass ] 1046 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/URL-createObjectURL-null.html [ Pass ] 1046 1047 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-mode.html [ Pass ] 1047 1048 [ Yosemite+ ] imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer.html [ Pass ] -
trunk/Source/WebCore/ChangeLog
r206206 r206208 1 2016-09-20 Jer Noble <jer.noble@apple.com> 2 3 [media-source] Fix imported/w3c/web-platform-tests/media-source/URL-createObjectURL-null.html 4 https://bugs.webkit.org/show_bug.cgi?id=162299 5 6 Reviewed by Eric Carlson. 7 8 URL.createObjectURL() should not take an optional parameter (nor return an optional String). 9 (Ref: https://w3c.github.io/FileAPI/#dfn-createObjectURL) 10 11 * Modules/mediasource/DOMURLMediaSource.cpp: 12 (WebCore::DOMURLMediaSource::createObjectURL): 13 * Modules/mediasource/DOMURLMediaSource.h: 14 * Modules/mediasource/DOMURLMediaSource.idl: 15 * Modules/mediasource/MediaSourceRegistry.cpp: 16 (WebCore::MediaSourceRegistry::registerURL): 17 * Modules/mediasource/MediaSourceRegistry.h: 18 * Modules/mediastream/DOMURLMediaStream.cpp: 19 (WebCore::DOMURLMediaStream::createObjectURL): 20 * Modules/mediastream/DOMURLMediaStream.h: 21 * Modules/mediastream/DOMURLMediaStream.idl: 22 * Modules/mediastream/MediaStreamRegistry.cpp: 23 (WebCore::MediaStreamRegistry::registerURL): 24 * Modules/mediastream/MediaStreamRegistry.h: 25 * fileapi/Blob.cpp: 26 (WebCore::BlobURLRegistry::registerURL): 27 * html/DOMURL.cpp: 28 (WebCore::DOMURL::createObjectURL): 29 (WebCore::DOMURL::createPublicURL): 30 * html/DOMURL.h: 31 * html/DOMURL.idl: 32 * html/HTMLMediaElement.cpp: 33 (WebCore::HTMLMediaElement::setSrcObject): 34 * html/PublicURLManager.cpp: 35 (WebCore::PublicURLManager::registerURL): 36 * html/PublicURLManager.h: 37 * html/URLRegistry.h: 38 1 39 2016-09-21 Youenn Fablet <youenn@apple.com> 2 40 -
trunk/Source/WebCore/Modules/mediasource/DOMURLMediaSource.cpp
r198002 r206208 40 40 namespace WebCore { 41 41 42 String DOMURLMediaSource::createObjectURL(ScriptExecutionContext& scriptExecutionContext, MediaSource *source)42 String DOMURLMediaSource::createObjectURL(ScriptExecutionContext& scriptExecutionContext, MediaSource& source) 43 43 { 44 44 // Since WebWorkers cannot obtain MediaSource objects, we should be on the main thread. 45 45 ASSERT(isMainThread()); 46 47 if (!source)48 return String();49 46 return DOMURL::createPublicURL(scriptExecutionContext, source); 50 47 } -
trunk/Source/WebCore/Modules/mediasource/DOMURLMediaSource.h
r198002 r206208 43 43 class DOMURLMediaSource { 44 44 public: 45 static String createObjectURL(ScriptExecutionContext&, MediaSource *);45 static String createObjectURL(ScriptExecutionContext&, MediaSource&); 46 46 }; 47 47 -
trunk/Source/WebCore/Modules/mediasource/DOMURLMediaSource.idl
r197060 r206208 32 32 ] 33 33 partial interface DOMURL { 34 [CallWith=ScriptExecutionContext] static DOMString ? createObjectURL(MediaSource?source);34 [CallWith=ScriptExecutionContext] static DOMString createObjectURL(MediaSource source); 35 35 }; -
trunk/Source/WebCore/Modules/mediasource/MediaSourceRegistry.cpp
r166053 r206208 47 47 } 48 48 49 void MediaSourceRegistry::registerURL(SecurityOrigin*, const URL& url, URLRegistrable *registrable)49 void MediaSourceRegistry::registerURL(SecurityOrigin*, const URL& url, URLRegistrable& registrable) 50 50 { 51 ASSERT(®istrable ->registry() == this);51 ASSERT(®istrable.registry() == this); 52 52 ASSERT(isMainThread()); 53 53 54 MediaSource * source = static_cast<MediaSource*>(registrable);55 source ->addedToRegistry();56 m_mediaSources.set(url.string(), source);54 MediaSource& source = static_cast<MediaSource&>(registrable); 55 source.addedToRegistry(); 56 m_mediaSources.set(url.string(), &source); 57 57 } 58 58 -
trunk/Source/WebCore/Modules/mediasource/MediaSourceRegistry.h
r204239 r206208 51 51 52 52 // Registers a blob URL referring to the specified media source. 53 void registerURL(SecurityOrigin*, const URL&, URLRegistrable *) override;53 void registerURL(SecurityOrigin*, const URL&, URLRegistrable&) override; 54 54 void unregisterURL(const URL&) override; 55 55 URLRegistrable* lookup(const String&) const override; -
trunk/Source/WebCore/Modules/mediastream/DOMURLMediaStream.cpp
r198002 r206208 41 41 namespace WebCore { 42 42 43 String DOMURLMediaStream::createObjectURL(ScriptExecutionContext& scriptExecutionContext, MediaStream *stream)43 String DOMURLMediaStream::createObjectURL(ScriptExecutionContext& scriptExecutionContext, MediaStream& stream) 44 44 { 45 45 // Since WebWorkers cannot obtain Stream objects, we should be on the main thread. 46 46 ASSERT(isMainThread()); 47 48 if (!stream)49 return String();50 47 return DOMURL::createPublicURL(scriptExecutionContext, stream); 51 48 } -
trunk/Source/WebCore/Modules/mediastream/DOMURLMediaStream.h
r198002 r206208 43 43 class DOMURLMediaStream { 44 44 public: 45 static String createObjectURL(ScriptExecutionContext&, MediaStream *);45 static String createObjectURL(ScriptExecutionContext&, MediaStream&); 46 46 }; 47 47 -
trunk/Source/WebCore/Modules/mediastream/DOMURLMediaStream.idl
r197060 r206208 32 32 ] 33 33 partial interface DOMURL { 34 [CallWith=ScriptExecutionContext] static DOMString ? createObjectURL(MediaStream?stream);34 [CallWith=ScriptExecutionContext] static DOMString createObjectURL(MediaStream stream); 35 35 }; -
trunk/Source/WebCore/Modules/mediastream/MediaStreamRegistry.cpp
r194397 r206208 44 44 } 45 45 46 void MediaStreamRegistry::registerURL(SecurityOrigin*, const URL& url, URLRegistrable *stream)46 void MediaStreamRegistry::registerURL(SecurityOrigin*, const URL& url, URLRegistrable& stream) 47 47 { 48 ASSERT(&stream ->registry() == this);48 ASSERT(&stream.registry() == this); 49 49 ASSERT(isMainThread()); 50 m_mediaStreams.set(url.string(), static_cast<MediaStream*>( stream));50 m_mediaStreams.set(url.string(), static_cast<MediaStream*>(&stream)); 51 51 } 52 52 -
trunk/Source/WebCore/Modules/mediastream/MediaStreamRegistry.h
r204239 r206208 47 47 48 48 // Registers a blob URL referring to the specified stream data. 49 void registerURL(SecurityOrigin*, const URL&, URLRegistrable *) override;49 void registerURL(SecurityOrigin*, const URL&, URLRegistrable&) override; 50 50 void unregisterURL(const URL&) override; 51 51 -
trunk/Source/WebCore/fileapi/Blob.cpp
r202747 r206208 43 43 class BlobURLRegistry final : public URLRegistry { 44 44 public: 45 void registerURL(SecurityOrigin*, const URL&, URLRegistrable *) override;45 void registerURL(SecurityOrigin*, const URL&, URLRegistrable&) override; 46 46 void unregisterURL(const URL&) override; 47 47 … … 50 50 51 51 52 void BlobURLRegistry::registerURL(SecurityOrigin* origin, const URL& publicURL, URLRegistrable *blob)52 void BlobURLRegistry::registerURL(SecurityOrigin* origin, const URL& publicURL, URLRegistrable& blob) 53 53 { 54 ASSERT(&blob ->registry() == this);55 ThreadableBlobRegistry::registerBlobURL(origin, publicURL, static_cast<Blob *>(blob)->url());54 ASSERT(&blob.registry() == this); 55 ThreadableBlobRegistry::registerBlobURL(origin, publicURL, static_cast<Blob&>(blob).url()); 56 56 } 57 57 -
trunk/Source/WebCore/html/DOMURL.cpp
r206168 r206208 104 104 } 105 105 106 String DOMURL::createObjectURL(ScriptExecutionContext& scriptExecutionContext, Blob *blob)106 String DOMURL::createObjectURL(ScriptExecutionContext& scriptExecutionContext, Blob& blob) 107 107 { 108 if (!blob)109 return String();110 108 return createPublicURL(scriptExecutionContext, blob); 111 109 } 112 110 113 String DOMURL::createPublicURL(ScriptExecutionContext& scriptExecutionContext, URLRegistrable *registrable)111 String DOMURL::createPublicURL(ScriptExecutionContext& scriptExecutionContext, URLRegistrable& registrable) 114 112 { 115 113 URL publicURL = BlobURL::createPublicURL(scriptExecutionContext.securityOrigin()); -
trunk/Source/WebCore/html/DOMURL.h
r206168 r206208 55 55 URLSearchParams& searchParams(); 56 56 57 static String createObjectURL(ScriptExecutionContext&, Blob *);57 static String createObjectURL(ScriptExecutionContext&, Blob&); 58 58 static void revokeObjectURL(ScriptExecutionContext&, const String&); 59 59 60 static String createPublicURL(ScriptExecutionContext&, URLRegistrable *);60 static String createPublicURL(ScriptExecutionContext&, URLRegistrable&); 61 61 private: 62 62 DOMURL(const String& url, const String& base, ExceptionCode&); -
trunk/Source/WebCore/html/DOMURL.idl
r204215 r206208 37 37 ExportMacro=WEBCORE_EXPORT, 38 38 ] interface DOMURL { 39 [CallWith=ScriptExecutionContext] static DOMString ? createObjectURL(Blob? blob); // FIXME: The return value and the parameter should not be nullable.39 [CallWith=ScriptExecutionContext] static DOMString createObjectURL(Blob blob); 40 40 [CallWith=ScriptExecutionContext] static void revokeObjectURL(DOMString url); 41 41 }; -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r206193 r206208 1096 1096 m_mediaStreamSrcObject = mediaStream; 1097 1097 if (mediaStream) 1098 setSrc(DOMURL::createPublicURL(context, mediaStream));1098 setSrc(DOMURL::createPublicURL(context, *mediaStream)); 1099 1099 } 1100 1100 #endif -
trunk/Source/WebCore/html/PublicURLManager.cpp
r192848 r206208 46 46 } 47 47 48 void PublicURLManager::registerURL(SecurityOrigin* origin, const URL& url, URLRegistrable *registrable)48 void PublicURLManager::registerURL(SecurityOrigin* origin, const URL& url, URLRegistrable& registrable) 49 49 { 50 50 if (m_isStopped) 51 51 return; 52 52 53 RegistryURLMap::iterator found = m_registryToURL.add(®istrable ->registry(), URLSet()).iterator;53 RegistryURLMap::iterator found = m_registryToURL.add(®istrable.registry(), URLSet()).iterator; 54 54 found->key->registerURL(origin, url, registrable); 55 55 found->value.add(url.string()); -
trunk/Source/WebCore/html/PublicURLManager.h
r192848 r206208 48 48 static std::unique_ptr<PublicURLManager> create(ScriptExecutionContext*); 49 49 50 void registerURL(SecurityOrigin*, const URL&, URLRegistrable *);50 void registerURL(SecurityOrigin*, const URL&, URLRegistrable&); 51 51 void revoke(const URL&); 52 52 -
trunk/Source/WebCore/html/URLRegistry.h
r159771 r206208 50 50 public: 51 51 virtual ~URLRegistry() { } 52 virtual void registerURL(SecurityOrigin*, const URL&, URLRegistrable *) = 0;52 virtual void registerURL(SecurityOrigin*, const URL&, URLRegistrable&) = 0; 53 53 virtual void unregisterURL(const URL&) = 0; 54 54
Note: See TracChangeset
for help on using the changeset viewer.