Title: [197989] trunk
Revision
197989
Author
[email protected]
Date
2016-03-10 20:25:51 -0800 (Thu, 10 Mar 2016)

Log Message

CRASH at WebCore::RenderView::updateVisibleViewportRect
https://bugs.webkit.org/show_bug.cgi?id=155209
<rdar://problem/23997530>

Reviewed by Simon Fraser.

Source/WebCore:

Test: media/video-crash-invisible-autoplay-display-none.html

Between the time when the video element's renderer is created and destroyed, we may have unset the
InvisibleAutoplayNotPermitted restriction. So rather than check for that restriction before
unregistering for the "visible in viewport" notification, unregister only if the renderer
was previously registered.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::willDetachRenderers):

LayoutTests:

(These files were mistakenly landed in a previous commit:)
* media/video-crash-invisible-autoplay-display-none-expected.txt: Added.
* media/video-crash-invisible-autoplay-display-none.html: Added.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (197988 => 197989)


--- trunk/LayoutTests/ChangeLog	2016-03-11 04:16:55 UTC (rev 197988)
+++ trunk/LayoutTests/ChangeLog	2016-03-11 04:25:51 UTC (rev 197989)
@@ -1,3 +1,15 @@
+2016-03-10  Jer Noble  <[email protected]>
+
+        CRASH at WebCore::RenderView::updateVisibleViewportRect
+        https://bugs.webkit.org/show_bug.cgi?id=155209
+        <rdar://problem/23997530>
+
+        Reviewed by Simon Fraser.
+
+        (These files were mistakenly landed in a previous commit:)
+        * media/video-crash-invisible-autoplay-display-none-expected.txt: Added.
+        * media/video-crash-invisible-autoplay-display-none.html: Added.
+
 2016-03-10  Zalan Bujtas  <[email protected]>
 
         Simple line layout: Add text-align: justify support.

Modified: trunk/Source/WebCore/ChangeLog (197988 => 197989)


--- trunk/Source/WebCore/ChangeLog	2016-03-11 04:16:55 UTC (rev 197988)
+++ trunk/Source/WebCore/ChangeLog	2016-03-11 04:25:51 UTC (rev 197989)
@@ -1,3 +1,21 @@
+2016-03-10  Jer Noble  <[email protected]>
+
+        CRASH at WebCore::RenderView::updateVisibleViewportRect
+        https://bugs.webkit.org/show_bug.cgi?id=155209
+        <rdar://problem/23997530>
+
+        Reviewed by Simon Fraser.
+
+        Test: media/video-crash-invisible-autoplay-display-none.html
+
+        Between the time when the video element's renderer is created and destroyed, we may have unset the
+        InvisibleAutoplayNotPermitted restriction. So rather than check for that restriction before
+        unregistering for the "visible in viewport" notification, unregister only if the renderer
+        was previously registered.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::willDetachRenderers):
+
 2016-03-10  Zalan Bujtas  <[email protected]>
 
         Simple line layout: Add text-align: justify support.

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (197988 => 197989)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-03-11 04:16:55 UTC (rev 197988)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2016-03-11 04:25:51 UTC (rev 197989)
@@ -805,7 +805,7 @@
 
 void HTMLMediaElement::willDetachRenderers()
 {
-    if (renderer() && m_mediaSession->hasBehaviorRestriction(MediaElementSession::InvisibleAutoplayNotPermitted))
+    if (renderer())
         renderer()->unregisterForVisibleInViewportCallback();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to