Changeset 268816 in webkit
- Timestamp:
- Oct 21, 2020 12:21:55 PM (21 months ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
html/HTMLMediaElement.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r268815 r268816 1 2020-10-21 Peng Liu <peng.liu6@apple.com> 2 3 A video element may fail to enter picture-in-picture from fullscreen 4 https://bugs.webkit.org/show_bug.cgi?id=217999 5 6 Reviewed by Eric Carlson. 7 8 When a video element is entering picture-in-picture from fullscreen, 9 WebKit should only fire the `webkitendfullscreenEvent` event, but should not 10 request the player in the UI process to exit fullscreen(picture-in-picture). 11 So the condition to decide sending the exit fullscreen request is wrong because 12 HTMLMediaElement::didBecomeFullscreenElement(), which sets `m_waitingToEnterFullscreen` 13 to false, might be called before dispatching the `webkitendfullscreenEvent` event. 14 15 * html/HTMLMediaElement.cpp: 16 (WebCore::HTMLMediaElement::dispatchEvent): Fix the condition. 17 (WebCore::HTMLMediaElement::exitFullscreen): Set fullscreen mode to VideoFullscreenModeNone. 18 1 19 2020-10-21 Zalan Bujtas <zalan@apple.com> 2 20 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r268607 r268816 5741 5741 // to change the position/size back *before* exiting fullscreen. 5742 5742 // Otherwise, the exit fullscreen animation will be incorrect. 5743 if (!m_videoFullscreenStandby && !m_waitingToEnterFullscreen && event.type() == eventNames().webkitendfullscreenEvent) { 5744 setFullscreenMode(VideoFullscreenModeNone); 5743 if (!m_videoFullscreenStandby && m_videoFullscreenMode == VideoFullscreenModeNone && event.type() == eventNames().webkitendfullscreenEvent) 5745 5744 document().page()->chrome().client().exitVideoFullscreenForVideoElement(downcast<HTMLVideoElement>(*this)); 5746 }5747 5745 } 5748 5746 … … 6003 6001 6004 6002 if (oldVideoFullscreenMode == VideoFullscreenModeStandard) { 6003 setFullscreenMode(VideoFullscreenModeNone); 6005 6004 // The exit fullscreen request will be sent in dispatchEvent(). 6006 6005 scheduleEvent(eventNames().webkitendfullscreenEvent);
Note: See TracChangeset
for help on using the changeset viewer.