• commit-queue@webkit.org's avatar
    Add AVKit fullscreen video interface. · 631001b6
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=126818
    
    Patch by Jeremy Jones <jeremyj@apple.com> on 2014-01-20
    Reviewed by Eric Carlson.
    
    Source/WebCore:
    
    No new tests, no observable change in functionality.
    
    * WebCore.exp.in:
    * WebCore.xcodeproj/project.pbxproj:
    * html/HTMLMediaElement.cpp:
    (WebCore::HTMLMediaElement::parseAttribute):
    * html/HTMLMediaElement.h:
    Add ability for fullscreen to borrow the AVPlayerLayer.
    * page/Settings.cpp:
    * page/Settings.h:
    (WebCore::Settings::setMediaPlaybackFullscreenAVKit):
    (WebCore::Settings::mediaPlaybackFullscreenAVKit):
    Add a disabled setting.
    * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
    (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen):
    Enabled fullscreen for iOS.
    * platform/ios/WebVideoFullscreenControllerAVKit.h: Added.
    * platform/ios/WebVideoFullscreenControllerAVKit.mm: Added.
    (-[WebAVPlayerController init]):
    (-[WebAVPlayerController dealloc]):
    (-[WebAVPlayerController forwardingTargetForSelector:]):
    (-[WebAVPlayerController shouldDismissForDone]):
    (-[WebAVPlayerController play:]):
    (-[WebAVPlayerController pause:]):
    (-[WebAVPlayerController togglePlayback:]):
    (-[WebAVPlayerController isPlaying]):
    (-[WebAVPlayerController setPlaying:]):
    (+[WebAVPlayerController keyPathsForValuesAffectingPlaying]):
    (-[WebAVPlayerController seekToTime:]):
    (-[WebAVPlayerController updateTimingWithCurrentTime:]):
    (-[WebAVPlayerController effectiveRate]):
    (-[WebAVPlayerController setMediaElement:]):
    (-[WebAVPlayerController handleEvent:]):
    (-[WebVideoFullscreenController init]):
    (-[WebVideoFullscreenController dealloc]):
    (-[WebVideoFullscreenController setMediaElement:]):
    (-[WebVideoFullscreenController mediaElement]):
    (-[WebVideoFullscreenController enterFullscreen:]):
    (-[WebVideoFullscreenController exitFullscreen]):
    Add WebAVPlayerController for HTMLMediaElememt to interface with AVPlayerViewController.
    
    Source/WebKit/mac:
    
    * WebCoreSupport/WebChromeClient.h:
    * WebCoreSupport/WebChromeClient.mm:
    (WebChromeClient::supportsFullscreenForNode):
    Enable *FullscreenForNode for HTMLMediaElement for iOS
    
    * WebView/WebPreferenceKeysPrivate.h:
    * WebView/WebPreferences.mm:
    (+[WebPreferences initialize]):
    (-[WebPreferences mediaPlaybackFullscreenAVKit]):
    (-[WebPreferences setMediaPlaybackFullscreenAVKit:]):
    * WebView/WebPreferencesPrivate.h:
    * WebView/WebView.mm:
    (-[WebView _preferencesChanged:]):
    (-[WebView _enterFullscreenForNode:WebCore::]):
    * WebView/WebViewInternal.h:
    Add a disabled pref mediaPlaybackFullscreenAVKit.
    Use WebVideoFullscreenControllerAVKit on iOS
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    631001b6