Enable activating optimized fullscreen mode from standard fulscreen mode.
https://bugs.webkit.org/show_bug.cgi?id=139137

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-12-09
Source/WebCore:

Reviewed by Jer Noble.

Going from standard fullscreen mode to optimized fullscreen mode requires the ability to
update the fullscreen mode in HTMLMediaElement and a new standard-and-optimized-fullscreen mode.

This change KVO observes AVKit's optimizedFullscreenActive and forwards the change down to HTMLMediaElement so it can adjust behavior appropriately.
It also hides the standard fullscreen window when going into this mode.
When exiting fullscreen from standard-and-optimized, first exit fullscreen immediately, then stopOptimizedFullscreen, and notify of completion when
optimizedFullscreen goes inactive.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::fullscreenMode):
    Treat VideoFullscreenModeStandardAndOptimized as a kind of optimized mode.
* WebCore.exp.in: New export for WebVideoFullscreenModelVideoElement::fullscreenModeChanged
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::displayType):
    Treat VideoFullscreenModeStandardAndOptimized as a kind of optimized mode.
* html/HTMLMediaElement.h: Add new fullscreen mode.
(WebCore::HTMLMediaElement::fullscreenModeChanged): Update fullscreen mode so it does optimized fullscreen mode behaviors when applicable.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h: Declare setOptimizedActive
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVVideoLayer setPlayerViewController:]): observe optimizedFullscreenActive
(-[WebAVVideoLayer observeValueForKeyPath:ofObject:change:context:]): respond to changes to optimizedFullscreenActive
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): Init members.
(WebVideoFullscreenInterfaceAVKit::playerController):
    Give player controller a reference to the WebVideoFullscreenInterface so it can pass along mode change state.
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): Handle new fullscreen modes.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
(WebVideoFullscreenInterfaceAVKit::invalidate): ditto
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
(WebVideoFullscreenInterfaceAVKit::setOptimizedActive): Handle changes to fullscreen mode.
    Also handle the case that exiting fullscreen happend when optimized mode ends.
* platform/ios/WebVideoFullscreenModel.h: declare fullscreenModeChanged()
* platform/ios/WebVideoFullscreenModelVideoElement.h: declare fullscreenModeChanged()
* platform/ios/WebVideoFullscreenModelVideoElement.mm: add fullscreenModeChanged()
(WebVideoFullscreenModelVideoElement::WebVideoFullscreenModelVideoElement): Init members.
(WebVideoFullscreenModelVideoElement::fullscreenModeChanged): Added. Update video element fullscreen mode.

Source/WebKit2:

Reviewed by Simon Fraser.

Going from standard fullscreen mode to optimized fullscreen mode requires the ability to
update the fullscreen mode and a new standard-and-optimized-fullscreen mode.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isPlayingFullscreenOptimizedVideo]):
Treat new standard-and-optimized as a kind of optimized.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h: IPC fullscreen mode changes
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm: ditto
(WebKit::WebVideoFullscreenManagerProxy::fullscreenModeChanged): dito
* WebProcess/ios/WebVideoFullscreenManager.h: ditto
* WebProcess/ios/WebVideoFullscreenManager.messages.in: ditto
* WebProcess/ios/WebVideoFullscreenManager.mm: dito
(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager): ditto
(WebKit::WebVideoFullscreenManager::setFullscreenModeChanged): ditto

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Bump minimum version of ATK used by jhbuild to at least 2.15.2
https://bugs.webkit.org/show_bug.cgi?id=139070

Reviewed by Carlos Garcia Campos.

Tools:

* gtk/jhbuild.modules:

LayoutTests:

* platform/gtk/accessibility/roles-exposed-expected.txt: Updated to reflect
the fact that the exposed role is STATIC and not UNKNOWN.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@177013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Add video/mp2t as alternative mimetype for MPEG TS
https://bugs.webkit.org/show_bug.cgi?id=139433

Patch by Sebastian Dröge <sebastian@centricular.com> on 2014-12-09
Reviewed by Philippe Normand.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mimeTypeCache):
It's used e.g. on http://www.jwplayer.com/html5/mediasource/ .

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