[WPE][GTK] Building with ENABLE_VIDEO=OFF fails trying to use Document MediaPlayback...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Jan 2019 17:15:29 +0000 (17:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Jan 2019 17:15:29 +0000 (17:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193174

Patch by Pablo Saavedra <psaavedra@igalia.com> on 2019-01-06
Reviewed by Michael Catanzaro.

* page/Page.cpp:
(WebCore::Page::stopAllMediaPlayback):
(WebCore::Page::suspendAllMediaPlayback):
(WebCore::Page::resumeAllMediaPlayback):

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

Source/WebCore/ChangeLog
Source/WebCore/page/Page.cpp

index 9066243..e0534ad 100644 (file)
@@ -1,3 +1,15 @@
+2019-01-06  Pablo Saavedra  <psaavedra@igalia.com>
+
+        [WPE][GTK] Building with ENABLE_VIDEO=OFF fails trying to use Document MediaPlayback functions.
+        https://bugs.webkit.org/show_bug.cgi?id=193174
+
+        Reviewed by Michael Catanzaro.
+
+        * page/Page.cpp:
+        (WebCore::Page::stopAllMediaPlayback):
+        (WebCore::Page::suspendAllMediaPlayback):
+        (WebCore::Page::resumeAllMediaPlayback):
+
 2019-01-05  David Kilzer  <ddkilzer@apple.com>
 
         Leak of two CCRSACryptorRef (4.0 Kbytes/1 page each) in com.apple.WebKit.WebContent running WebKit layout tests
index ddf3912..e81cb23 100644 (file)
@@ -1718,14 +1718,17 @@ void Page::stopMediaCapture()
 
 void Page::stopAllMediaPlayback()
 {
+#if ENABLE(VIDEO)
     for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
         if (auto* document = frame->document())
             document->stopAllMediaPlayback();
     }
+#endif
 }
 
 void Page::suspendAllMediaPlayback()
 {
+#if ENABLE(VIDEO)
     ASSERT(!m_mediaPlaybackIsSuspended);
     if (m_mediaPlaybackIsSuspended)
         return;
@@ -1736,10 +1739,12 @@ void Page::suspendAllMediaPlayback()
     }
 
     m_mediaPlaybackIsSuspended = true;
+#endif
 }
 
 void Page::resumeAllMediaPlayback()
 {
+#if ENABLE(VIDEO)
     ASSERT(m_mediaPlaybackIsSuspended);
     if (!m_mediaPlaybackIsSuspended)
         return;
@@ -1749,6 +1754,7 @@ void Page::resumeAllMediaPlayback()
         if (auto* document = frame->document())
             document->resumeAllMediaPlayback();
     }
+#endif
 }
 
 #if ENABLE(MEDIA_SESSION)