Title: [187036] trunk/Source/WebCore
- Revision
- 187036
- Author
- commit-qu...@webkit.org
- Date
- 2015-07-20 14:37:18 -0700 (Mon, 20 Jul 2015)
Log Message
Allow video to rotate when app doesnt allow rotation.
https://bugs.webkit.org/show_bug.cgi?id=147121
Patch by Jeremy Jones <jere...@apple.com> on 2015-07-20
Reviewed by Jer Noble.
Set an SPI bool on the fullscreen video root view controller to allow it to override app rotation restrictions.
This allows video to be played in landscape in portrait only apps.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (187035 => 187036)
--- trunk/Source/WebCore/ChangeLog 2015-07-20 21:28:45 UTC (rev 187035)
+++ trunk/Source/WebCore/ChangeLog 2015-07-20 21:37:18 UTC (rev 187036)
@@ -1,3 +1,16 @@
+2015-07-20 Jeremy Jones <jere...@apple.com>
+
+ Allow video to rotate when app doesnt allow rotation.
+ https://bugs.webkit.org/show_bug.cgi?id=147121
+
+ Reviewed by Jer Noble.
+
+ Set an SPI bool on the fullscreen video root view controller to allow it to override app rotation restrictions.
+ This allows video to be played in landscape in portrait only apps.
+
+ * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+ (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
+
2015-07-20 Andreas Kling <akl...@apple.com>
Unreviewed assertion fix following r187031.
Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm (187035 => 187036)
--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2015-07-20 21:28:45 UTC (rev 187035)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm 2015-07-20 21:37:18 UTC (rev 187036)
@@ -897,6 +897,10 @@
-(BOOL)_isHostedInAnotherProcess;
@end
+@interface UIViewController ()
+@property (nonatomic, assign, setter=_setIgnoreAppSupportedOrientations:) BOOL _ignoreAppSupportedOrientations;
+@end
+
void WebVideoFullscreenInterfaceAVKit::setupFullscreen(PlatformLayer& videoLayer, const WebCore::IntRect& initialRect, UIView* parentView, HTMLMediaElementEnums::VideoFullscreenMode mode, bool allowsPictureInPicturePlayback)
{
ASSERT(mode != HTMLMediaElementEnums::VideoFullscreenModeNone);
@@ -916,6 +920,7 @@
[m_window setBackgroundColor:[getUIColorClass() clearColor]];
m_viewController = adoptNS([allocUIViewControllerInstance() init]);
[[m_viewController view] setFrame:[m_window bounds]];
+ [m_viewController _setIgnoreAppSupportedOrientations:YES];
[m_window setRootViewController:m_viewController.get()];
[m_window makeKeyAndVisible];
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes