Changeset 178486 in webkit
- Timestamp:
- Jan 14, 2015 10:00:43 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r178471 r178486 1 2015-01-14 Jer Noble <jer.noble@apple.com> 2 3 [Mac][MSE] Stalled YouTube playback does not allow display to sleep. 4 https://bugs.webkit.org/show_bug.cgi?id=140468 5 rdar://problem/19171162 6 7 Reviewed by Eric Carlson. 8 9 * media/media-source/content/test-fragmented-manifest.json: Added. 10 * media/media-source/content/test-fragmented.mp4: Added. 11 * media/media-source/media-source-loader.js: Added. 12 (MediaSourceLoader): 13 (MediaSourceLoader.prototype.loadManifest): 14 (MediaSourceLoader.prototype.loadManifestSucceeded): 15 (MediaSourceLoader.prototype.loadManifestFailed): 16 (MediaSourceLoader.prototype.loadMediaData): 17 (MediaSourceLoader.prototype.loadMediaDataSucceeded): 18 (MediaSourceLoader.prototype.loadMediaDataFailed): 19 (MediaSourceLoader.prototype.type): 20 (MediaSourceLoader.prototype.duration): 21 (MediaSourceLoader.prototype.initSegment): 22 (MediaSourceLoader.prototype.mediaSegmentsLength): 23 (MediaSourceLoader.prototype.mediaSegment): 24 * media/media-source/media-source-stalled-holds-sleep-assertion-expected.txt: Added. 25 * media/media-source/media-source-stalled-holds-sleep-assertion.html: Added. 26 1 27 2015-01-14 Andrzej Badowski <a.badowski@samsung.com> 2 28 -
trunk/LayoutTests/media/media-source/media-source-canplaythrough.html
r160336 r178486 16 16 internals.initializeMockMediaSource(); 17 17 18 function runTest() { 18 function runTest() 19 { 19 20 findMediaElement(); 20 21 source = new MediaSource(); … … 27 28 } 28 29 29 function startLoad() { 30 function startLoad() 31 { 30 32 sourceBuffer = source.addSourceBuffer('video/mock; codecs="mock"'); 31 33 sourceBuffer.addEventListener('update', sourceUpdated); … … 37 39 } 38 40 39 function sourceUpdated() { 41 function sourceUpdated() 42 { 40 43 source.activeSourceBuffers.length; 41 44 if (nextRequest < totalLength) { -
trunk/Source/WebCore/ChangeLog
r178481 r178486 1 2015-01-14 Jer Noble <jer.noble@apple.com> 2 3 [Mac][MSE] Stalled YouTube playback does not allow display to sleep. 4 https://bugs.webkit.org/show_bug.cgi?id=140468 5 rdar://problem/19171162 6 7 Reviewed by Eric Carlson. 8 9 Test: media/media-source/media-source-stalled-holds-sleep-assertion.html 10 11 The unstated convention of MediaPlayerPrivate::paused() is that implementations should 12 return 'true' if the playback rate is 0. However, MediaPlayerPrivateMediaSourceAVFObjC 13 was returning 'false' if it was supposed to be playing, regardless of the actual rate. 14 This caused a check in HTMLMediaElement of whether to release the sleep assertion token 15 to fail, thinking the media engine was still playing. 16 17 Add some testing infrastructure to allow us to test whether the media element is disabling 18 display sleep from within layout tests. 19 20 * html/HTMLMediaElement.h: 21 (WebCore::HTMLMediaElement::isDisablingSleep): 22 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: 23 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused): 24 * testing/Internals.cpp: 25 (WebCore::Internals::elementIsBlockingDisplaySleep): 26 * testing/Internals.h: 27 * testing/Internals.idl: 28 1 29 2015-01-14 Zalan Bujtas <zalan@apple.com> 2 30 -
trunk/Source/WebCore/html/HTMLMediaElement.h
r178367 r178486 466 466 MediaControlsHost* mediaControlsHost() { return m_mediaControlsHost.get(); } 467 467 468 bool isDisablingSleep() const { return m_sleepDisabler.get(); } 469 468 470 protected: 469 471 HTMLMediaElement(const QualifiedName&, Document&, bool); -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
r176924 r178486 338 338 bool MediaPlayerPrivateMediaSourceAVFObjC::paused() const 339 339 { 340 return ! m_playing;340 return ![m_synchronizer rate]; 341 341 } 342 342 -
trunk/Source/WebCore/testing/Internals.cpp
r178462 r178486 60 60 #include "HTMLSelectElement.h" 61 61 #include "HTMLTextAreaElement.h" 62 #include "HTMLVideoElement.h" 62 63 #include "HistoryController.h" 63 64 #include "HistoryItem.h" … … 2435 2436 } 2436 2437 2438 bool Internals::elementIsBlockingDisplaySleep(Element* element) const 2439 { 2440 HTMLMediaElement* mediaElement = downcast<HTMLMediaElement>(element); 2441 return mediaElement ? mediaElement->isDisablingSleep() : false; 2442 } 2443 2437 2444 void Internals::installMockPageOverlay(const String& overlayType, ExceptionCode& ec) 2438 2445 { -
trunk/Source/WebCore/testing/Internals.h
r178462 r178486 352 352 void simulateSystemSleep() const; 353 353 void simulateSystemWake() const; 354 bool elementIsBlockingDisplaySleep(Element*) const; 354 355 355 356 void installMockPageOverlay(const String& overlayType, ExceptionCode&); -
trunk/Source/WebCore/testing/Internals.idl
r178462 r178486 308 308 [Conditional=VIDEO] void simulateSystemSleep(); 309 309 [Conditional=VIDEO] void simulateSystemWake(); 310 [Conditional=VIDEO] boolean elementIsBlockingDisplaySleep(Element element); 310 311 311 312 [RaisesException] void installMockPageOverlay(PageOverlayType type);
Note: See TracChangeset
for help on using the changeset viewer.