Title: [114258] trunk/Source/WebCore
Revision
114258
Author
eric.carl...@apple.com
Date
2012-04-16 08:18:48 -0700 (Mon, 16 Apr 2012)

Log Message

ASSERT in notifyChildInserted when HTMLMediaElement is removed from tree
https://bugs.webkit.org/show_bug.cgi?id=83949

Reviewed by Antti Koivisto.

No new tests. I was not able to create a reproducible test case, but I have been unable
to reproduce the ASSERT that occassionally fired in existing tests since I have been
living on these changes.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedIntoDocument): Call configureMediaControls.
(WebCore::HTMLMediaElement::removedFromDocument): Ditto.
(WebCore::HTMLMediaElement::configureMediaControls): Don't show controls when the
    media element is not in a Document.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (114257 => 114258)


--- trunk/Source/WebCore/ChangeLog	2012-04-16 15:15:37 UTC (rev 114257)
+++ trunk/Source/WebCore/ChangeLog	2012-04-16 15:18:48 UTC (rev 114258)
@@ -1,5 +1,22 @@
 2012-04-16  Eric Carlson  <eric.carl...@apple.com>
 
+        ASSERT in notifyChildInserted when HTMLMediaElement is removed from tree
+        https://bugs.webkit.org/show_bug.cgi?id=83949
+
+        Reviewed by Antti Koivisto.
+
+        No new tests. I was not able to create a reproducible test case, but I have been unable
+        to reproduce the ASSERT that occassionally fired in existing tests since I have been
+        living on these changes.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::insertedIntoDocument): Call configureMediaControls.
+        (WebCore::HTMLMediaElement::removedFromDocument): Ditto.
+        (WebCore::HTMLMediaElement::configureMediaControls): Don't show controls when the
+            media element is not in a Document.
+
+2012-04-16  Eric Carlson  <eric.carl...@apple.com>
+
         Layout Test media/track/track-delete-during-setup.html is hitting an ASSERT_NOT_REACHED
         https://bugs.webkit.org/show_bug.cgi?id=82269
 

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (114257 => 114258)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2012-04-16 15:15:37 UTC (rev 114257)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2012-04-16 15:18:48 UTC (rev 114258)
@@ -497,11 +497,13 @@
     HTMLElement::insertedIntoDocument();
     if (!getAttribute(srcAttr).isEmpty() && m_networkState == NETWORK_EMPTY)
         scheduleLoad(MediaResource);
+    configureMediaControls();
 }
 
 void HTMLMediaElement::removedFromDocument()
 {
     LOG(Media, "HTMLMediaElement::removedFromDocument");
+    configureMediaControls();
     if (m_networkState > NETWORK_EMPTY)
         pause();
     if (m_isFullscreen)
@@ -4019,7 +4021,7 @@
 void HTMLMediaElement::configureMediaControls()
 {
 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
-    if (!controls()) {
+    if (!controls() || !inDocument()) {
         if (hasMediaControls())
             mediaControls()->hide();
         return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to