Title: [260217] trunk/Source/WebCore
Revision
260217
Author
[email protected]
Date
2020-04-16 13:27:12 -0700 (Thu, 16 Apr 2020)

Log Message

Unreviewed build-fix after r260182; guard call to fullscreenManager() for ports which do not
ENABLE(FULLSCREEN_API).

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::updateMediaUsageIfChanged):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (260216 => 260217)


--- trunk/Source/WebCore/ChangeLog	2020-04-16 20:13:01 UTC (rev 260216)
+++ trunk/Source/WebCore/ChangeLog	2020-04-16 20:27:12 UTC (rev 260217)
@@ -1,3 +1,11 @@
+2020-04-16  Jer Noble  <[email protected]>
+
+        Unreviewed build-fix after r260182; guard call to fullscreenManager() for ports which do not
+        ENABLE(FULLSCREEN_API).
+
+        * html/MediaElementSession.cpp:
+        (WebCore::MediaElementSession::updateMediaUsageIfChanged):
+
 2020-04-16  Claudio Saavedra  <[email protected]>
 
         [GTK] Deprecation-guards fixes

Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (260216 => 260217)


--- trunk/Source/WebCore/html/MediaElementSession.cpp	2020-04-16 20:13:01 UTC (rev 260216)
+++ trunk/Source/WebCore/html/MediaElementSession.cpp	2020-04-16 20:27:12 UTC (rev 260217)
@@ -1018,7 +1018,11 @@
     if (!page)
         return;
 
-    auto* fullscreenElement = document.fullscreenManager().currentFullscreenElement();
+    bool isOutsideOfFullscreen = false;
+#if ENABLE(FULLSCREEN_API)
+    if (auto* fullscreenElement = document.fullscreenManager().currentFullscreenElement())
+        isOutsideOfFullscreen = !m_element.isDescendantOf(*fullscreenElement);
+#endif
     bool isAudio = client().presentationType() == MediaType::Audio;
     bool isVideo = client().presentationType() == MediaType::Video;
     bool processingUserGesture = document.processingUserGestureForMedia();
@@ -1054,7 +1058,7 @@
         !hasBehaviorRestriction(RequireUserGestureToControlControlsManager) || processingUserGesture,
         hasBehaviorRestriction(RequirePlaybackToControlControlsManager) && !isPlaying,
         m_element.hasEverNotifiedAboutPlaying(),
-        fullscreenElement && !m_element.isDescendantOf(*fullscreenElement),
+        isOutsideOfFullscreen,
         isLargeEnoughForMainContent(MediaSessionMainContentPurpose::MediaControls),
     };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to