[WebKitLegacy] Media playback pauses on scroll
[WebKit-https.git] / Source / WebCore / ChangeLog
index 56aa4f4..0e0a078 100644 (file)
@@ -1,3 +1,50 @@
+2019-01-04  Jer Noble  <jer.noble@apple.com>
+
+        [WebKitLegacy] Media playback pauses on scroll
+        https://bugs.webkit.org/show_bug.cgi?id=192829
+
+        Reviewed by Eric Carlson.
+
+        New API tests:
+            WebKitLegacy.ScrollingDoesNotPauseMedia
+            WKWebView.StopAllMediaPlayback
+            WKWebView.SuspendResumeAllMediaPlayback
+
+        Do not use suspendActiveDOMObjects(ReasonForSuspension::PageWillBeSuspended) to pause
+        video. Roll back the changes to HTMLMediaElement, and introduce a new set of Page calls
+        suspendAllMediaPlayback() & resumeAllMediaPlayback() which replaces the removed bahavior.
+
+        * dom/Document.cpp:
+        (WebCore::Document::~Document):
+        (WebCore::Document::stopAllMediaPlayback):
+        (WebCore::Document::suspendAllMediaPlayback):
+        (WebCore::Document::resumeAllMediaPlayback):
+        * dom/Document.h:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::HTMLMediaElement):
+        (WebCore::HTMLMediaElement::parseAttribute):
+        (WebCore::HTMLMediaElement::didFinishInsertingNode):
+        (WebCore::HTMLMediaElement::setSrcObject):
+        (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
+        (WebCore::HTMLMediaElement::suspend):
+        (WebCore::HTMLMediaElement::resume):
+        (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const):
+        * html/HTMLMediaElement.h:
+        (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const): Deleted.
+        * html/MediaElementSession.cpp:
+        (WebCore::MediaElementSession::playbackPermitted const):
+        * page/Page.cpp:
+        (WebCore::Page::stopAllMediaPlayback):
+        (WebCore::Page::suspendAllMediaPlayback):
+        (WebCore::Page::resumeAllMediaPlayback):
+        * page/Page.h:
+        (WebCore::Page::mediaPlaybackIsSuspended):
+        * platform/audio/PlatformMediaSession.h:
+        * platform/audio/PlatformMediaSessionManager.cpp:
+        (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument):
+        (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument):
+        * platform/audio/PlatformMediaSessionManager.h:
+
 2019-01-04  Chris Dumez  <cdumez@apple.com>
 
         Add support for toggling device orientation API support per site