Changeset 212314 in webkit
- Timestamp:
- Feb 14, 2017 11:34:09 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r212313 r212314 1 2017-02-14 Jeremy Jones <jeremyj@apple.com> 2 3 When playing inline after fullscreen, set a flag instead of adding attribute plays inline, and use in requiresFullscreenForVideoPlayback. 4 https://bugs.webkit.org/show_bug.cgi?id=167815 5 rdar://problem/27685077 6 7 Reviewed by Jer Noble. 8 9 Add a new test that tests inline after fullscreen behavior of looping video. 10 11 * media/media-fullscreen-loop-inline-expected.txt: Added. 12 * media/media-fullscreen-loop-inline.html: Added. 13 * platform/mac-wk2/TestExpectations: Skipped on webkit2. 14 1 15 2017-02-14 Ryan Haddad <ryanhaddad@apple.com> 2 16 -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r212246 r212314 322 322 webkit.org/b/156077 inspector/heap/getRemoteObject.html [ Pass Failure ] 323 323 324 # Video fullscreen is not implemented for mac wk2 in webkittestrunner 325 media/media-fullscreen-loop-inline.html [ Skip ] 326 324 327 ### END OF (1) Classified failures with bug reports 325 328 ######################################## -
trunk/Source/WebCore/ChangeLog
r212311 r212314 1 2017-02-14 Jeremy Jones <jeremyj@apple.com> 2 3 When playing inline after fullscreen, set a flag instead of adding attribute plays inline, and use in requiresFullscreenForVideoPlayback. 4 https://bugs.webkit.org/show_bug.cgi?id=167815 5 rdar://problem/27685077 6 7 Reviewed by Jer Noble. 8 9 Test: media/media-fullscreen-loop-inline.html 10 11 When video is allowed to play inline after fullscreen. Looped video causes play state to update, which can send video back to fullscreen when 12 allowsInline is false. This change will set a new flag when allowsInlineMediaPlaybackAfterFullscreen allows inline playback that can be tested 13 in requiresFullscreenForVideoPlayback to prevent sending video back into fullscreen when video loops. 14 15 * html/HTMLMediaElement.cpp: 16 (WebCore::HTMLMediaElement::enterFullscreen): 17 (WebCore::HTMLMediaElement::exitFullscreen): 18 * html/HTMLMediaElement.h: 19 (WebCore::HTMLMediaElement::isTemporarilyAllowingInlinePlaybackAfterFullscreen): Added. 20 * html/MediaElementSession.cpp: 21 (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): 22 1 23 2017-02-14 Jer Noble <jer.noble@apple.com> 2 24 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r212311 r212314 5453 5453 return; 5454 5454 5455 m_temporarilyAllowingInlinePlaybackAfterFullscreen = false; 5456 5455 5457 #if ENABLE(FULLSCREEN_API) 5456 5458 if (document().settings().fullScreenEnabled()) { … … 5516 5518 pauseInternal(); 5517 5519 else { 5518 // Allow inline playback, but set 'playsinline' so pausing and starting again (e.g. when scrubbing) won't go back to fullscreen.5520 // Allow inline playback, but set a flag so pausing and starting again (e.g. when scrubbing or looping) won't go back to fullscreen. 5519 5521 // Also set the controls attribute so the user will be able to control playback. 5520 setBooleanAttribute(HTMLNames::playsinlineAttr, true);5522 m_temporarilyAllowingInlinePlaybackAfterFullscreen = true; 5521 5523 setControls(true); 5522 5524 } -
trunk/Source/WebCore/html/HTMLMediaElement.h
r212311 r212314 494 494 double playbackStartedTime() const { return m_playbackStartedTime; } 495 495 496 bool isTemporarilyAllowingInlinePlaybackAfterFullscreen() const {return m_temporarilyAllowingInlinePlaybackAfterFullscreen; } 497 496 498 protected: 497 499 HTMLMediaElement(const QualifiedName&, Document&, bool createdByParser); … … 892 894 std::function<void()> m_preparedForInlineCompletionHandler; 893 895 896 bool m_temporarilyAllowingInlinePlaybackAfterFullscreen { false }; 897 894 898 #if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)) 895 899 RetainPtr<PlatformLayer> m_videoFullscreenLayer; -
trunk/Source/WebCore/html/MediaElementSession.cpp
r211964 r212314 541 541 return false; 542 542 543 if (element.isTemporarilyAllowingInlinePlaybackAfterFullscreen()) 544 return false; 545 543 546 if (!element.document().settings().allowsInlineMediaPlayback()) 544 547 return true;
Note: See TracChangeset
for help on using the changeset viewer.