Title: [204069] branches/safari-602-branch/Source/WebCore
- Revision
- 204069
- Author
- [email protected]
- Date
- 2016-08-02 23:15:56 -0700 (Tue, 02 Aug 2016)
Log Message
Merge r203984. rdar://problem/27409854
Modified Paths
Diff
Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (204068 => 204069)
--- branches/safari-602-branch/Source/WebCore/ChangeLog 2016-08-03 06:15:54 UTC (rev 204068)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog 2016-08-03 06:15:56 UTC (rev 204069)
@@ -1,5 +1,23 @@
2016-08-02 Babak Shafiei <[email protected]>
+ Merge r203984. rdar://problem/27409854
+
+ 2016-08-01 Eric Carlson <[email protected]>
+
+ [iOS] A video element that does not pause after exiting from fullscreen should be allowed to continue playing inline
+ https://bugs.webkit.org/show_bug.cgi?id=160416
+ <rdar://problem/27409854>
+
+ Reviewed by Alex Christensen.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::exitFullscreen): If playback normally requires fullscreen but the
+ element was not paused when exiting from fullscreen, set the 'playsinline' attribute so we won't
+ force fullscreen if playback is paused and resumes, and set the 'controls' attribute so the
+ user can control playback.
+
+2016-08-02 Babak Shafiei <[email protected]>
+
Merge r203982. rdar://problem/27547583
2016-08-01 Eric Carlson <[email protected]>
Modified: branches/safari-602-branch/Source/WebCore/html/HTMLMediaElement.cpp (204068 => 204069)
--- branches/safari-602-branch/Source/WebCore/html/HTMLMediaElement.cpp 2016-08-03 06:15:54 UTC (rev 204068)
+++ branches/safari-602-branch/Source/WebCore/html/HTMLMediaElement.cpp 2016-08-03 06:15:56 UTC (rev 204069)
@@ -5464,19 +5464,29 @@
#endif
if (hasMediaControls())
mediaControls()->exitedFullscreen();
- if (document().page() && is<HTMLVideoElement>(*this)) {
- if (m_mediaSession->requiresFullscreenForVideoPlayback(*this) && (!document().settings() || !document().settings()->allowsInlineMediaPlaybackAfterFullscreen() || isVideoTooSmallForInlinePlayback()))
+
+ if (!document().page() || !is<HTMLVideoElement>(*this))
+ return;
+
+ if (!paused() && m_mediaSession->requiresFullscreenForVideoPlayback(*this)) {
+ if (!document().settings() || !document().settings()->allowsInlineMediaPlaybackAfterFullscreen() || isVideoTooSmallForInlinePlayback())
pauseInternal();
+ else {
+ // Allow inline playback, but set 'playsinline' so pausing and starting again (e.g. when scrubbing) won't go back to fullscreen.
+ // Also set the controls attribute so the user will be able to control playback.
+ setBooleanAttribute(HTMLNames::playsinlineAttr, true);
+ setControls(true);
+ }
+ }
#if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
- if (document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped())
- document().page()->chrome().client().exitVideoFullscreenToModeWithoutAnimation(downcast<HTMLVideoElement>(*this), VideoFullscreenModeNone);
- else
+ if (document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped())
+ document().page()->chrome().client().exitVideoFullscreenToModeWithoutAnimation(downcast<HTMLVideoElement>(*this), VideoFullscreenModeNone);
+ else
#endif
- if (document().page()->chrome().client().supportsVideoFullscreen(oldVideoFullscreenMode)) {
- document().page()->chrome().client().exitVideoFullscreenForVideoElement(downcast<HTMLVideoElement>(*this));
- scheduleEvent(eventNames().webkitendfullscreenEvent);
- }
+ if (document().page()->chrome().client().supportsVideoFullscreen(oldVideoFullscreenMode)) {
+ document().page()->chrome().client().exitVideoFullscreenForVideoElement(downcast<HTMLVideoElement>(*this));
+ scheduleEvent(eventNames().webkitendfullscreenEvent);
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes