Changeset 176841 in webkit


Ignore:
Timestamp:
Dec 5, 2014, 5:25:28 AM (10 years ago)
Author:
eric.carlson@apple.com
Message:

[iOS] allow host application to opt-out of alternate fullscreen pt. 2
https://bugs.webkit.org/show_bug.cgi?id=139227

Source/WebCore:

Reviewed by Jer Noble and Anders Carlsson

  • WebCore.exp.in: Export HTMLMediaSession::allowsAlternateFullscreen, change the signature of

WebVideoFullscreenInterfaceAVKit::setupFullscreen.

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(-[WebVideoFullscreenController enterFullscreen:mode:]): Update for

WebVideoFullscreenInterfaceAVKit::setupFullscreen change.

  • platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add argument to setupFullscreen.
  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.

Source/WebKit2:

Reviewed by Jer Noble and Anders Carlsson.

  • UIProcess/ios/WebVideoFullscreenManagerProxy.h: Add bool param to setupFullscreenWithID.
  • UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: Ditto.
  • UIProcess/ios/WebVideoFullscreenManagerProxy.mm:

(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.

  • WebProcess/ios/WebVideoFullscreenManager.mm:

(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Pass new parameter

to SetupFullscreenWithID.

Location:
trunk/Source
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r176840 r176841  
     12014-12-05  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [iOS] allow host application to opt-out of alternate fullscreen pt. 2
     4        https://bugs.webkit.org/show_bug.cgi?id=139227
     5
     6        Reviewed by Jer Noble and Anders Carlsson
     7
     8        * WebCore.exp.in: Export HTMLMediaSession::allowsAlternateFullscreen, change the signature of
     9            WebVideoFullscreenInterfaceAVKit::setupFullscreen.
     10
     11        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
     12        (-[WebVideoFullscreenController enterFullscreen:mode:]): Update for
     13            WebVideoFullscreenInterfaceAVKit::setupFullscreen change.
     14
     15        * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add argument to setupFullscreen.
     16        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
     17        (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.
     18
    1192014-12-05  Shivakumar JM  <shiva.jm@samsung.com>
    220
  • trunk/Source/WebCore/WebCore.exp.in

    r176810 r176841  
    34793479__ZN7WebCore35WebVideoFullscreenModelVideoElementC2Ev
    34803480__ZN7WebCore35WebVideoFullscreenModelVideoElementD2Ev
     3481__ZNK7WebCore16HTMLMediaSession25allowsAlternateFullscreenERKNS_16HTMLMediaElementE
    34813482__ZNK7WebCore16HTMLVideoElement10videoWidthEv
    34823483__ZNK7WebCore16HTMLVideoElement11videoHeightEv
     
    34903491__ZN7WebCore32WebVideoFullscreenInterfaceAVKit14setCurrentTimeEdd
    34913492__ZN7WebCore32WebVideoFullscreenInterfaceAVKit15enterFullscreenEv
    3492 __ZN7WebCore32WebVideoFullscreenInterfaceAVKit15setupFullscreenER7CALayerNS_7IntRectEP6UIViewNS_16HTMLMediaElement19VideoFullscreenModeE
     3493__ZN7WebCore32WebVideoFullscreenInterfaceAVKit15setupFullscreenER7CALayerNS_7IntRectEP6UIViewNS_16HTMLMediaElement19VideoFullscreenModeEb
    34933494__ZN7WebCore32WebVideoFullscreenInterfaceAVKit17cleanupFullscreenEv
    34943495__ZN7WebCore32WebVideoFullscreenInterfaceAVKit17setSeekableRangesERKNS_10TimeRangesE
  • trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm

    r175279 r176841  
    126126    _model->setVideoElement(_videoElement.get());
    127127    _videoFullscreenLayer = [CALayer layer];
    128     _interface->setupFullscreen(*_videoFullscreenLayer.get(), _videoElement->clientRect(), view, mode);
     128    _interface->setupFullscreen(*_videoFullscreenLayer.get(), _videoElement->clientRect(), view, mode, _videoElement->mediaSession().allowsAlternateFullscreen(*_videoElement.get()));
    129129}
    130130
  • trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h

    r175980 r176841  
    8282    WEBCORE_EXPORT virtual void setExternalPlayback(bool enabled, ExternalPlaybackTargetType, WTF::String localizedDeviceName) override;
    8383   
    84     WEBCORE_EXPORT virtual void setupFullscreen(PlatformLayer&, IntRect initialRect, UIView *, HTMLMediaElement::VideoFullscreenMode);
     84    WEBCORE_EXPORT virtual void setupFullscreen(PlatformLayer&, IntRect initialRect, UIView *, HTMLMediaElement::VideoFullscreenMode, bool allowOptimizedFullscreen);
    8585    WEBCORE_EXPORT virtual void enterFullscreen();
    8686    WEBCORE_EXPORT virtual void exitFullscreen(IntRect finalRect);
  • trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm

    r176734 r176841  
    785785}
    786786
    787 void WebVideoFullscreenInterfaceAVKit::setupFullscreen(PlatformLayer& videoLayer, WebCore::IntRect initialRect, UIView* parentView, HTMLMediaElement::VideoFullscreenMode mode)
     787void WebVideoFullscreenInterfaceAVKit::setupFullscreen(PlatformLayer& videoLayer, WebCore::IntRect initialRect, UIView* parentView, HTMLMediaElement::VideoFullscreenMode mode, bool allowOptimizedFullscreen)
    788788{
    789789    __block RefPtr<WebVideoFullscreenInterfaceAVKit> protect(this);
     
    824824        [m_playerViewController setPlayerController:(AVPlayerController *)playerController()];
    825825        [m_playerViewController setDelegate:playerController()];
     826        [m_playerViewController setAllowsOptimizedFullscreen:allowOptimizedFullscreen];
     827
    826828        [m_videoLayerContainer setPlayerViewController:m_playerViewController.get()];
    827829
  • trunk/Source/WebKit2/ChangeLog

    r176829 r176841  
     12014-12-05  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [iOS] allow host application to opt-out of alternate fullscreen pt. 2
     4        https://bugs.webkit.org/show_bug.cgi?id=139227
     5
     6        Reviewed by Jer Noble and Anders Carlsson.
     7
     8        * UIProcess/ios/WebVideoFullscreenManagerProxy.h: Add bool param to setupFullscreenWithID.
     9        * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: Ditto.
     10        * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
     11        (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.
     12
     13        * WebProcess/ios/WebVideoFullscreenManager.mm:
     14        (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Pass new parameter
     15            to SetupFullscreenWithID.
     16
    1172014-12-04  Anders Carlsson  <andersca@apple.com>
    218
  • trunk/Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h

    r175279 r176841  
    5656
    5757    // Translate to FullscreenInterface
    58     void setupFullscreenWithID(uint32_t, WebCore::IntRect initialRect, float hostingDeviceScaleFactor, uint32_t videoFullscreenMode);
     58    void setupFullscreenWithID(uint32_t, WebCore::IntRect initialRect, float hostingDeviceScaleFactor, uint32_t videoFullscreenMode, bool allowOptimizedFullscreen);
    5959    void setSeekableRangesVector(Vector<std::pair<double, double>>&);
    6060    void setExternalPlaybackProperties(bool enabled, uint32_t targetType, String localizedDeviceName);
  • trunk/Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in

    r175279 r176841  
    3232    SetDuration(double duration)
    3333    SetRate(bool isPlaying, double rate)
    34     SetupFullscreenWithID(uint32_t videoLayerID, WebCore::IntRect initialRect, float hostingScaleFactor, uint32_t videoFullscreenMode)
     34    SetupFullscreenWithID(uint32_t videoLayerID, WebCore::IntRect initialRect, float hostingScaleFactor, uint32_t videoFullscreenMode, bool allowOptimizedFullscreen)
    3535    EnterFullscreen()
    3636    ExitFullscreen(WebCore::IntRect finalRect)
  • trunk/Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm

    r176487 r176841  
    8585}
    8686
    87 void WebVideoFullscreenManagerProxy::setupFullscreenWithID(uint32_t videoLayerID, WebCore::IntRect initialRect, float hostingDeviceScaleFactor, uint32_t videoFullscreenMode)
     87void WebVideoFullscreenManagerProxy::setupFullscreenWithID(uint32_t videoLayerID, WebCore::IntRect initialRect, float hostingDeviceScaleFactor, uint32_t videoFullscreenMode, bool allowOptimizedFullscreen)
    8888{
    8989    ASSERT(videoLayerID);
     
    9797    UIView *parentView = downcast<RemoteLayerTreeDrawingAreaProxy>(*m_page->drawingArea()).remoteLayerTreeHost().rootLayer();
    9898    HTMLMediaElement::VideoFullscreenMode mode = static_cast<HTMLMediaElement::VideoFullscreenMode>(videoFullscreenMode);
    99     setupFullscreen(*m_layerHost.get(), initialRect, parentView, mode);
     99    setupFullscreen(*m_layerHost.get(), initialRect, parentView, mode, allowOptimizedFullscreen);
    100100}
    101101   
  • trunk/Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm

    r175279 r176841  
    102102
    103103    m_layerHostingContext = LayerHostingContext::createForExternalHostingProcess();
    104    
    105     m_page->send(Messages::WebVideoFullscreenManagerProxy::SetupFullscreenWithID(m_layerHostingContext->contextID(), clientRectForElement(videoElement), m_page->deviceScaleFactor(), m_fullscreenMode), m_page->pageID());
     104    bool allowOptimizedFullscreen = m_videoElement->mediaSession().allowsAlternateFullscreen(*m_videoElement.get());
     105   
     106    m_page->send(Messages::WebVideoFullscreenManagerProxy::SetupFullscreenWithID(m_layerHostingContext->contextID(), clientRectForElement(videoElement), m_page->deviceScaleFactor(), m_fullscreenMode, allowOptimizedFullscreen), m_page->pageID());
    106107}
    107108
Note: See TracChangeset for help on using the changeset viewer.