Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClie...
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jan 2016 23:26:42 +0000 (23:26 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jan 2016 23:26:42 +0000 (23:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153220

Reviewed by Eric Carlson.

Source/WebCore:

No new tests, just code refactoring.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::supportsFullscreen):
Just pass in VideoFullscreenModeStandard as this is used for checking the standard fullscreen case.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enterFullscreen):
Only use the FullScreen API if the mode is VideoFullscreenModeStandard. Call ChromeClient::supportsVideoFullscreen()
with the mode.
(WebCore::HTMLMediaElement::exitFullscreen):
Move the fullscreen element check up so we can use this method to exit picture-in-picture mode.
* html/HTMLMediaElement.h:

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::supportsFullscreen):
Ditto.
(WebCore::HTMLVideoElement::webkitEnterFullscreen):
Pass in VideoFullscreenModeStandard to supportsFullscreen() as this is used for the standard fullscreen case.
(WebCore::HTMLVideoElement::webkitSupportsFullscreen):
Ditto.
(WebCore::HTMLVideoElement::webkitSupportsPresentationMode):
Pass in the correct VideoFullscreenMode to supportsFullscreen() corresponding to the mode string passed in.
(WebCore::HTMLVideoElement::setFullscreenMode):
Pass in the mode to supportsFullscreen().
* html/HTMLVideoElement.h:

* html/MediaController.h:
* html/MediaControllerInterface.h:
Make supportsFullscreen() take a VideoFullscreenMode.

* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::reset):
Pass in VideoFullscreenModeStandard to supportsFullscreen() here since this is used for the standard
fullscreen button.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::reset):
Ditto.

* page/ChromeClient.h:
Make supportsVideoFullscreen() take a VideoFullscreenMode.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaSupportsFullscreen):
(WebCore::HitTestResult::toggleMediaFullscreenState):
(WebCore::HitTestResult::enterFullscreenForVideo):
Pass in VideoFullscreenModeStandard in the code relating to the standard fullscreen.

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::supportsVideoFullscreen):

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::supportsVideoFullscreen):
* WebCoreSupport/WebChromeClient.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::supportsVideoFullscreen):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLVideoElement.cpp
Source/WebCore/html/HTMLVideoElement.h
Source/WebCore/html/MediaController.h
Source/WebCore/html/MediaControllerInterface.h
Source/WebCore/html/shadow/MediaControls.cpp
Source/WebCore/html/shadow/MediaControlsApple.cpp
Source/WebCore/page/ChromeClient.h
Source/WebCore/rendering/HitTestResult.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/win/WebCoreSupport/WebChromeClient.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

index 97c5476..9e1fd27 100644 (file)
@@ -1,3 +1,58 @@
+2016-01-17  Ada Chan  <adachan@apple.com>
+
+        Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().
+        https://bugs.webkit.org/show_bug.cgi?id=153220
+
+        Reviewed by Eric Carlson.
+
+        No new tests, just code refactoring.
+
+        * Modules/mediacontrols/MediaControlsHost.cpp:
+        (WebCore::MediaControlsHost::supportsFullscreen):
+        Just pass in VideoFullscreenModeStandard as this is used for checking the standard fullscreen case.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::enterFullscreen):
+        Only use the FullScreen API if the mode is VideoFullscreenModeStandard. Call ChromeClient::supportsVideoFullscreen()
+        with the mode.
+        (WebCore::HTMLMediaElement::exitFullscreen):
+        Move the fullscreen element check up so we can use this method to exit picture-in-picture mode.
+        * html/HTMLMediaElement.h:
+
+        * html/HTMLVideoElement.cpp:
+        (WebCore::HTMLVideoElement::supportsFullscreen):
+        Ditto.
+        (WebCore::HTMLVideoElement::webkitEnterFullscreen):
+        Pass in VideoFullscreenModeStandard to supportsFullscreen() as this is used for the standard fullscreen case.
+        (WebCore::HTMLVideoElement::webkitSupportsFullscreen):
+        Ditto.
+        (WebCore::HTMLVideoElement::webkitSupportsPresentationMode):
+        Pass in the correct VideoFullscreenMode to supportsFullscreen() corresponding to the mode string passed in.
+        (WebCore::HTMLVideoElement::setFullscreenMode):
+        Pass in the mode to supportsFullscreen().
+        * html/HTMLVideoElement.h:
+
+        * html/MediaController.h:
+        * html/MediaControllerInterface.h:
+        Make supportsFullscreen() take a VideoFullscreenMode.
+
+        * html/shadow/MediaControls.cpp:
+        (WebCore::MediaControls::reset):
+        Pass in VideoFullscreenModeStandard to supportsFullscreen() here since this is used for the standard
+        fullscreen button.
+        * html/shadow/MediaControlsApple.cpp:
+        (WebCore::MediaControlsApple::reset):
+        Ditto.
+
+        * page/ChromeClient.h:
+        Make supportsVideoFullscreen() take a VideoFullscreenMode.
+
+        * rendering/HitTestResult.cpp:
+        (WebCore::HitTestResult::mediaSupportsFullscreen):
+        (WebCore::HitTestResult::toggleMediaFullscreenState):
+        (WebCore::HitTestResult::enterFullscreenForVideo):
+        Pass in VideoFullscreenModeStandard in the code relating to the standard fullscreen.
+
 2016-01-22  Chris Dumez  <cdumez@apple.com>
 
         Document.URL / Document.documentURI should return "about:blank" instead of empty string / null
index f8f3eef..8a8c6ff 100644 (file)
@@ -202,7 +202,7 @@ bool MediaControlsHost::allowsInlineMediaPlayback() const
 
 bool MediaControlsHost::supportsFullscreen()
 {
-    return m_mediaElement->supportsFullscreen();
+    return m_mediaElement->supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModeStandard);
 }
 
 bool MediaControlsHost::userGestureRequired() const
index 37c435a..adb1b07 100644 (file)
@@ -5291,7 +5291,7 @@ void HTMLMediaElement::enterFullscreen(VideoFullscreenMode mode)
         return;
 
 #if ENABLE(FULLSCREEN_API)
-    if (document().settings() && document().settings()->fullScreenEnabled()) {
+    if (mode == VideoFullscreenModeStandard && document().settings() && document().settings()->fullScreenEnabled()) {
         document().requestFullScreenForElement(this, 0, Document::ExemptIFrameAllowFullScreenRequirement);
         return;
     }
@@ -5302,7 +5302,7 @@ void HTMLMediaElement::enterFullscreen(VideoFullscreenMode mode)
         mediaControls()->enteredFullscreen();
     if (document().page() && is<HTMLVideoElement>(*this)) {
         HTMLVideoElement& asVideo = downcast<HTMLVideoElement>(*this);
-        if (document().page()->chrome().client().supportsVideoFullscreen()) {
+        if (document().page()->chrome().client().supportsVideoFullscreen(m_videoFullscreenMode)) {
             document().page()->chrome().client().enterVideoFullscreenForVideoElement(asVideo, m_videoFullscreenMode);
             scheduleEvent(eventNames().webkitbeginfullscreenEvent);
         }
@@ -5319,13 +5319,15 @@ void HTMLMediaElement::exitFullscreen()
     LOG(Media, "HTMLMediaElement::exitFullscreen(%p)", this);
 
 #if ENABLE(FULLSCREEN_API)
-    if (document().settings() && document().settings()->fullScreenEnabled()) {
-        if (document().webkitIsFullScreen() && document().webkitCurrentFullScreenElement() == this)
+    if (document().settings() && document().settings()->fullScreenEnabled() && document().webkitCurrentFullScreenElement() == this) {
+        if (document().webkitIsFullScreen())
             document().webkitCancelFullScreen();
         return;
     }
 #endif
+
     ASSERT(m_videoFullscreenMode != VideoFullscreenModeNone);
+    VideoFullscreenMode oldVideoFullscreenMode = m_videoFullscreenMode;
     fullscreenModeChanged(VideoFullscreenModeNone);
     if (hasMediaControls())
         mediaControls()->exitedFullscreen();
@@ -5333,7 +5335,7 @@ void HTMLMediaElement::exitFullscreen()
         if (m_mediaSession->requiresFullscreenForVideoPlayback(*this))
             pauseInternal();
 
-        if (document().page()->chrome().client().supportsVideoFullscreen()) {
+        if (document().page()->chrome().client().supportsVideoFullscreen(oldVideoFullscreenMode)) {
             document().page()->chrome().client().exitVideoFullscreenForVideoElement(downcast<HTMLVideoElement>(*this));
             scheduleEvent(eventNames().webkitendfullscreenEvent);
         }
index 6849a92..4695954 100644 (file)
@@ -120,7 +120,7 @@ public:
     WEBCORE_EXPORT virtual void returnToRealtime() override;
 
     // Eventually overloaded in HTMLVideoElement
-    virtual bool supportsFullscreen() const override { return false; };
+    virtual bool supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenMode) const override { return false; };
 
     virtual bool supportsScanning() const override;
 
index 9185b5d..33ffe40 100644 (file)
@@ -144,7 +144,7 @@ void HTMLVideoElement::parseAttribute(const QualifiedName& name, const AtomicStr
 
 }
 
-bool HTMLVideoElement::supportsFullscreen() const
+bool HTMLVideoElement::supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode) const
 {
     Page* page = document().page();
     if (!page) 
@@ -154,20 +154,21 @@ bool HTMLVideoElement::supportsFullscreen() const
         return false;
 
 #if PLATFORM(IOS)
+    UNUSED_PARAM(videoFullscreenMode);
     // Fullscreen implemented by player.
     return true;
 #else
 #if ENABLE(FULLSCREEN_API)
     // If the full screen API is enabled and is supported for the current element
     // do not require that the player has a video track to enter full screen.
-    if (page->chrome().client().supportsFullScreenForElement(this, false))
+    if (videoFullscreenMode == HTMLMediaElementEnums::VideoFullscreenModeStandard && page->chrome().client().supportsFullScreenForElement(this, false))
         return true;
 #endif
 
     if (!player()->hasVideo())
         return false;
 
-    return page->chrome().client().supportsVideoFullscreen();
+    return page->chrome().client().supportsVideoFullscreen(videoFullscreenMode);
 #endif // PLATFORM(IOS)
 }
 
@@ -279,7 +280,7 @@ void HTMLVideoElement::webkitEnterFullscreen(ExceptionCode& ec)
 
     // Generate an exception if this isn't called in response to a user gesture, or if the 
     // element does not support fullscreen.
-    if (!mediaSession().fullscreenPermitted(*this) || !supportsFullscreen()) {
+    if (!mediaSession().fullscreenPermitted(*this) || !supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModeStandard)) {
         ec = INVALID_STATE_ERR;
         return;
     }
@@ -295,7 +296,7 @@ void HTMLVideoElement::webkitExitFullscreen()
 
 bool HTMLVideoElement::webkitSupportsFullscreen()
 {
-    return supportsFullscreen();
+    return supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModeStandard);
 }
 
 bool HTMLVideoElement::webkitDisplayingFullscreen()
@@ -371,7 +372,7 @@ static const AtomicString& presentationModeInline()
 bool HTMLVideoElement::webkitSupportsPresentationMode(const String& mode) const
 {
     if (mode == presentationModeFullscreen())
-        return mediaSession().fullscreenPermitted(*this) && supportsFullscreen();
+        return mediaSession().fullscreenPermitted(*this) && supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModeStandard);
 
     if (mode == presentationModePictureInPicture()) {
 #if PLATFORM(COCOA)
@@ -379,7 +380,7 @@ bool HTMLVideoElement::webkitSupportsPresentationMode(const String& mode) const
             return false;
 #endif
 
-        return mediaSession().allowsPictureInPicture(*this) && supportsFullscreen();
+        return mediaSession().allowsPictureInPicture(*this) && supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModePictureInPicture);
     }
 
     if (mode == presentationModeInline())
@@ -424,7 +425,7 @@ void HTMLVideoElement::setFullscreenMode(HTMLMediaElementEnums::VideoFullscreenM
         return;
     }
 
-    if (!mediaSession().fullscreenPermitted(*this) || !supportsFullscreen())
+    if (!mediaSession().fullscreenPermitted(*this) || !supportsFullscreen(mode))
         return;
 
     enterFullscreen(mode);
index 62fab75..433a8af 100644 (file)
@@ -96,7 +96,7 @@ private:
     virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
     virtual bool isVideo() const override { return true; }
     virtual bool hasVideo() const override { return player() && player()->hasVideo(); }
-    virtual bool supportsFullscreen() const override;
+    virtual bool supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenMode) const override;
     virtual bool isURLAttribute(const Attribute&) const override;
     virtual const AtomicString& imageSourceURL() const override;
 
index 315eecd..4561fad 100644 (file)
@@ -84,7 +84,7 @@ public:
     enum PlaybackState { WAITING, PLAYING, ENDED };
     const AtomicString& playbackState() const;
 
-    virtual bool supportsFullscreen() const override { return false; }
+    virtual bool supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenMode) const override { return false; }
     virtual bool isFullscreen() const override { return false; }
     virtual void enterFullscreen() override { }
 
index ee70e2e..eb881c2 100644 (file)
@@ -70,7 +70,7 @@ public:
     virtual ReadyState readyState() const = 0;
 
     // MediaControlElements:
-    virtual bool supportsFullscreen() const = 0;
+    virtual bool supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenMode) const = 0;
     virtual bool isFullscreen() const = 0;
     virtual void enterFullscreen() = 0;
 
index b85fdc1..0ff0e81 100644 (file)
@@ -116,7 +116,7 @@ void MediaControls::reset()
     refreshClosedCaptionsButtonVisibility();
 
     if (m_fullScreenButton) {
-        if (m_mediaController->supportsFullscreen() && m_mediaController->hasVideo())
+        if (m_mediaController->supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModeStandard) && m_mediaController->hasVideo())
             m_fullScreenButton->show();
         else
             m_fullScreenButton->hide();
index 58bbe04..3569afa 100644 (file)
@@ -307,7 +307,7 @@ void MediaControlsApple::reset()
 
     updateStatusDisplay();
 
-    if (m_mediaController->supportsFullscreen())
+    if (m_mediaController->supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModeStandard))
         m_fullScreenButton->show();
     else
         m_fullScreenButton->hide();
index 8658095..720cf09 100644 (file)
@@ -338,7 +338,7 @@ public:
     virtual GraphicsDeviceAdapter* graphicsDeviceAdapter() const { return 0; }
 #endif
 
-    virtual bool supportsVideoFullscreen() { return false; }
+    virtual bool supportsVideoFullscreen(HTMLMediaElementEnums::VideoFullscreenMode) { return false; }
 #if ENABLE(VIDEO)
     virtual void enterVideoFullscreenForVideoElement(HTMLVideoElement&, HTMLMediaElementEnums::VideoFullscreenMode) { }
 #endif
index 14449b6..1a3f6ae 100644 (file)
@@ -406,7 +406,7 @@ bool HitTestResult::mediaSupportsFullscreen() const
 {
 #if ENABLE(VIDEO)
     HTMLMediaElement* mediaElt(mediaElement());
-    return is<HTMLVideoElement>(mediaElt) && mediaElt->supportsFullscreen();
+    return is<HTMLVideoElement>(mediaElt) && mediaElt->supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModeStandard);
 #else
     return false;
 #endif
@@ -456,7 +456,7 @@ void HitTestResult::toggleMediaFullscreenState() const
 {
 #if ENABLE(VIDEO)
     if (HTMLMediaElement* mediaElement = this->mediaElement()) {
-        if (mediaElement->isVideo() && mediaElement->supportsFullscreen()) {
+        if (mediaElement->isVideo() && mediaElement->supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModeStandard)) {
             UserGestureIndicator indicator(DefinitelyProcessingUserGesture, &mediaElement->document());
             mediaElement->toggleFullscreenState();
         }
@@ -470,7 +470,7 @@ void HitTestResult::enterFullscreenForVideo() const
     HTMLMediaElement* mediaElement(this->mediaElement());
     if (is<HTMLVideoElement>(mediaElement)) {
         HTMLVideoElement& videoElement = downcast<HTMLVideoElement>(*mediaElement);
-        if (!videoElement.isFullscreen() && mediaElement->supportsFullscreen()) {
+        if (!videoElement.isFullscreen() && mediaElement->supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModeStandard)) {
             UserGestureIndicator indicator(DefinitelyProcessingUserGesture, &mediaElement->document());
             videoElement.enterFullscreen();
         }
index 2e3f6d8..d3782a8 100644 (file)
@@ -1,3 +1,14 @@
+2016-01-17  Ada Chan  <adachan@apple.com>
+
+        Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().
+        https://bugs.webkit.org/show_bug.cgi?id=153220
+
+        Reviewed by Eric Carlson.
+
+        * WebCoreSupport/WebChromeClient.h:
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::supportsVideoFullscreen):
+
 2016-01-22  Darin Adler  <darin@apple.com>
 
         Reduce use of equalIgnoringCase to just ignore ASCII case
index d335218..20c06e9 100644 (file)
@@ -175,7 +175,7 @@ public:
     }
 
 #if ENABLE(VIDEO)
-    virtual bool supportsVideoFullscreen() override;
+    virtual bool supportsVideoFullscreen(WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override;
     virtual void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&, WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override;
     virtual void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&) override;
 #endif
index db3ab2d..0c85940 100644 (file)
@@ -910,7 +910,7 @@ void WebChromeClient::scheduleCompositingLayerFlush()
 
 #if ENABLE(VIDEO)
 
-bool WebChromeClient::supportsVideoFullscreen()
+bool WebChromeClient::supportsVideoFullscreen(HTMLMediaElementEnums::VideoFullscreenMode)
 {
 #if PLATFORM(IOS)
     if (!Settings::avKitEnabled())
index 68caed3..fbc6b0f 100644 (file)
@@ -1,3 +1,14 @@
+2016-01-17  Ada Chan  <adachan@apple.com>
+
+        Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().
+        https://bugs.webkit.org/show_bug.cgi?id=153220
+
+        Reviewed by Eric Carlson.
+
+        * WebCoreSupport/WebChromeClient.cpp:
+        (WebChromeClient::supportsVideoFullscreen):
+        * WebCoreSupport/WebChromeClient.h:
+
 2016-01-22  Youenn Fablet  <youenn.fablet@crf.canon.fr>
 
         Remove PassRefPtr from ResourceRequest and FormData
index 00079fa..f7de3cc 100644 (file)
@@ -747,7 +747,7 @@ COMPtr<IWebUIDelegate> WebChromeClient::uiDelegate()
 
 #if ENABLE(VIDEO)
 
-bool WebChromeClient::supportsVideoFullscreen()
+bool WebChromeClient::supportsVideoFullscreen(HTMLMediaElementEnums::VideoFullscreenMode)
 {
     return true;
 }
index da7d1d8..b327e94 100644 (file)
@@ -139,7 +139,7 @@ public:
     virtual void scrollRectIntoView(const WebCore::IntRect&) const { }
 
 #if ENABLE(VIDEO)
-    virtual bool supportsVideoFullscreen();
+    virtual bool supportsVideoFullscreen(WebCore::HTMLMediaElementEnums::VideoFullscreenMode);
     virtual void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&);
     virtual void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&);
 #endif
index 654d2bd..231ff04 100644 (file)
@@ -1,3 +1,14 @@
+2016-01-17  Ada Chan  <adachan@apple.com>
+
+        Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen().
+        https://bugs.webkit.org/show_bug.cgi?id=153220
+
+        Reviewed by Eric Carlson.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::supportsVideoFullscreen):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+
 2016-01-22  Tim Horton  <timothy_horton@apple.com>
 
         Reproducible "Unhanded web process message 'WebUserContentController:AddUserScripts'" and friends
index 3900018..473e793 100644 (file)
@@ -850,7 +850,7 @@ PassRefPtr<ScrollingCoordinator> WebChromeClient::createScrollingCoordinator(Pag
 #endif
 
 #if PLATFORM(IOS)
-bool WebChromeClient::supportsVideoFullscreen()
+bool WebChromeClient::supportsVideoFullscreen(WebCore::HTMLMediaElementEnums::VideoFullscreenMode)
 {
     return m_page->videoFullscreenManager()->supportsVideoFullscreen();
 }
index 6e5144e..74bb858 100644 (file)
@@ -243,7 +243,7 @@ private:
 #endif
 
 #if PLATFORM(IOS)
-    virtual bool supportsVideoFullscreen() override;
+    virtual bool supportsVideoFullscreen(WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override;
     virtual void enterVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&, WebCore::HTMLMediaElementEnums::VideoFullscreenMode) override;
     virtual void exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement&) override;
 #endif