Title: [232534] trunk
- Revision
- 232534
- Author
- [email protected]
- Date
- 2018-06-05 21:25:48 -0700 (Tue, 05 Jun 2018)
Log Message
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 Eric Carlson.
Source/WebCore:
Check whether the element is visible in the viewport when the web view itself becomes visible, and if so, clear the m_elementIsHiddenUntilVisibleInViewport flag.
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::visibilityChanged):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
LayoutTests:
* media/video-buffering-allowed-expected.txt:
* media/video-buffering-allowed.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (232533 => 232534)
--- trunk/LayoutTests/ChangeLog 2018-06-06 04:23:26 UTC (rev 232533)
+++ trunk/LayoutTests/ChangeLog 2018-06-06 04:25:48 UTC (rev 232534)
@@ -1,3 +1,14 @@
+2018-06-05 Jer Noble <[email protected]>
+
+ 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 Eric Carlson.
+
+ * media/video-buffering-allowed-expected.txt:
+ * media/video-buffering-allowed.html:
+
2018-06-05 Wenson Hsieh <[email protected]>
[macOS] Spelling errors in the middle of an inserted paragraph are not displayed
Modified: trunk/LayoutTests/media/video-buffering-allowed-expected.txt (232533 => 232534)
--- trunk/LayoutTests/media/video-buffering-allowed-expected.txt 2018-06-06 04:23:26 UTC (rev 232533)
+++ trunk/LayoutTests/media/video-buffering-allowed-expected.txt 2018-06-06 04:25:48 UTC (rev 232534)
@@ -16,6 +16,12 @@
* 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
Modified: trunk/LayoutTests/media/video-buffering-allowed.html (232533 => 232534)
--- trunk/LayoutTests/media/video-buffering-allowed.html 2018-06-06 04:23:26 UTC (rev 232533)
+++ trunk/LayoutTests/media/video-buffering-allowed.html 2018-06-06 04:25:48 UTC (rev 232534)
@@ -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);
Modified: trunk/Source/WebCore/ChangeLog (232533 => 232534)
--- trunk/Source/WebCore/ChangeLog 2018-06-06 04:23:26 UTC (rev 232533)
+++ trunk/Source/WebCore/ChangeLog 2018-06-06 04:25:48 UTC (rev 232534)
@@ -1,3 +1,17 @@
+2018-06-05 Jer Noble <[email protected]>
+
+ 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 Eric Carlson.
+
+ Check whether the element is visible in the viewport when the web view itself becomes visible, and if so, clear the m_elementIsHiddenUntilVisibleInViewport flag.
+
+ * html/MediaElementSession.cpp:
+ (WebCore::MediaElementSession::visibilityChanged):
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+
2018-06-05 Zalan Bujtas <[email protected]>
[LFC] Move inflow, replaced width and margin computation to a dedicated function.
Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (232533 => 232534)
--- trunk/Source/WebCore/html/MediaElementSession.cpp 2018-06-06 04:23:26 UTC (rev 232533)
+++ trunk/Source/WebCore/html/MediaElementSession.cpp 2018-06-06 04:25:48 UTC (rev 232534)
@@ -167,6 +167,8 @@
if (m_element.elementIsHidden() && !m_element.isFullscreen())
m_elementIsHiddenUntilVisibleInViewport = true;
+ else if (m_element.isVisibleInViewport())
+ m_elementIsHiddenUntilVisibleInViewport = false;
}
void MediaElementSession::isVisibleInViewportChanged()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes