WebKit Bugzilla
Attachment 342003 Details for
Bug 186326
: REGRESSION (231817): Videos permanently blank out after switching out of a tab and back in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186326-20180605163044.patch (text/plain), 5.52 KB, created by
Jer Noble
on 2018-06-05 16:30:45 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2018-06-05 16:30:45 PDT
Size:
5.52 KB
patch
obsolete
>Subversion Revision: 232471 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f9fc7ccf095459b0b9bad546d8896b0ebbf04363..ab572f3fe931b06803835321170bb0d7d88d2620 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2018-06-05 Jer Noble <jer.noble@apple.com> >+ >+ REGRESSION (231817): Videos permanently blank out after switching out of a tab and back in >+ https://bugs.webkit.org/show_bug.cgi?id=186326 >+ <rdar://problem/40778157> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Check whether the element is visible in the viewport when the web view itself becomes visible, and if so, clear the m_elementIsHiddenUntilVisibleInViewport flag. >+ >+ Drive-by fix: update the inline image substitute immediately before disconnecting >+ the AVPlayerItem. >+ >+ * html/MediaElementSession.cpp: >+ (WebCore::MediaElementSession::visibilityChanged): >+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: >+ (WebCore::MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem): >+ > 2018-04-05 Jer Noble <jer.noble@apple.com> > > ASSERTION FAILED: m_scriptExecutionContext under WebCore::AudioContext::isPlayingAudioDidChange() >diff --git a/Source/WebCore/html/MediaElementSession.cpp b/Source/WebCore/html/MediaElementSession.cpp >index 8314e1e60254cf549f71e66d77417484bed49924..469145f2e9bf0f12b3df7b9956d47e28897b6d7b 100644 >--- a/Source/WebCore/html/MediaElementSession.cpp >+++ b/Source/WebCore/html/MediaElementSession.cpp >@@ -167,6 +167,8 @@ void MediaElementSession::visibilityChanged() > > if (m_element.elementIsHidden() && !m_element.isFullscreen()) > m_elementIsHiddenUntilVisibleInViewport = true; >+ else if (m_element.isVisibleInViewport()) >+ m_elementIsHiddenUntilVisibleInViewport = false; > } > > void MediaElementSession::isVisibleInViewportChanged() >diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >index 84a19bf1e3694fd08ed2be53d762c15a4469b511..042c0a30c1464b245ad9642f790ec0b1a63afb86 100644 >--- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >+++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm >@@ -978,6 +978,8 @@ void MediaPlayerPrivateAVFoundationObjC::setAVPlayerItem(AVPlayerItemType *item) > return; > > if (pthread_main_np()) { >+ if (!item) >+ updateVideoFullscreenInlineImage(); > [m_avPlayer replaceCurrentItemWithPlayerItem:item]; > return; > } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index cf8b9f9a05036319e1f20984191bbac1b321418f..ec92a4e6c3db4c5fb30e2519d1414e6b2cdc6ece 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-06-05 Jer Noble <jer.noble@apple.com> >+ >+ REGRESSION (231817): Videos permanently blank out after switching out of a tab and back in >+ https://bugs.webkit.org/show_bug.cgi?id=186326 >+ <rdar://problem/40778157> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * media/video-buffering-allowed-expected.txt: >+ * media/video-buffering-allowed.html: >+ > 2018-04-05 Jer Noble <jer.noble@apple.com> > > ASSERTION FAILED: m_scriptExecutionContext under WebCore::AudioContext::isPlayingAudioDidChange() >diff --git a/LayoutTests/media/video-buffering-allowed-expected.txt b/LayoutTests/media/video-buffering-allowed-expected.txt >index 1da49de6842019d181314144d24044b86f767f8d..ff3c0f31980c52955c757e3ddd47d04d028bee02 100644 >--- a/LayoutTests/media/video-buffering-allowed-expected.txt >+++ b/LayoutTests/media/video-buffering-allowed-expected.txt >@@ -16,6 +16,12 @@ EXPECTED (internals.elementShouldBufferData(video) == 'true') OK > * Re-insert the video element into the document. > RUN(document.body.insertBefore(video, document.body.firstChild)) > EXPECTED (internals.elementShouldBufferData(video) == 'true') OK >+* Simulate the view becoming invisible. >+RUN(internals.setPageVisibility(false)) >+EXPECTED (internals.elementShouldBufferData(video) == 'false') OK >+* Simulate the view becoming visible. >+RUN(internals.setPageVisibility(true)) >+EXPECTED (internals.elementShouldBufferData(video) == 'true') OK > * display:none the video element. > RUN(video.style.display = "none") > EXPECTED (internals.elementShouldBufferData(video) == 'true') OK >diff --git a/LayoutTests/media/video-buffering-allowed.html b/LayoutTests/media/video-buffering-allowed.html >index 6fbbe15bc71188236746855b050e2d7f759c3a58..a028380f85f127a6a8e22c610bdcf0f160caeec7 100644 >--- a/LayoutTests/media/video-buffering-allowed.html >+++ b/LayoutTests/media/video-buffering-allowed.html >@@ -31,6 +31,14 @@ > run('document.body.insertBefore(video, document.body.firstChild)'); > await testExpectedEventually('internals.elementShouldBufferData(video)', true); > >+ consoleWrite('* Simulate the view becoming invisible.'); >+ run('internals.setPageVisibility(false)'); >+ await testExpectedEventually('internals.elementShouldBufferData(video)', false); >+ >+ consoleWrite('* Simulate the view becoming visible.'); >+ run('internals.setPageVisibility(true)'); >+ await testExpectedEventually('internals.elementShouldBufferData(video)', true); >+ > consoleWrite('* display:none the video element.'); > run('video.style.display = "none"'); > await testExpectedEventually('internals.elementShouldBufferData(video)', true);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186326
:
342003
|
342009
|
342010
|
342013
|
342014
|
342017