Title: [149989] trunk
- Revision
- 149989
- Author
- [email protected]
- Date
- 2013-05-12 23:40:52 -0700 (Sun, 12 May 2013)
Log Message
REGRESSION (r149749): Video becomes invisible when it starts playing at newyorkbygehry.com
https://bugs.webkit.org/show_bug.cgi?id=115963
Reviewed by Dean Jackson.
Source/WebCore:
Test: media/video-remove-insert-repaints.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedInto): Set m_inActiveDocument when inserted into a document.
(WebCore::HTMLMediaElement::removedFrom): Fix logging.
LayoutTests:
* media/video-remove-insert-repaints.html: Added.
* media/video-remove-insert-repaints-expected.txt: Added.
* platform/mac/media/video-remove-insert-repaints-expected.png: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (149988 => 149989)
--- trunk/LayoutTests/ChangeLog 2013-05-13 06:39:19 UTC (rev 149988)
+++ trunk/LayoutTests/ChangeLog 2013-05-13 06:40:52 UTC (rev 149989)
@@ -1,3 +1,14 @@
+2013-05-12 Eric Carlson <[email protected]>
+
+ REGRESSION (r149749): Video becomes invisible when it starts playing at newyorkbygehry.com
+ https://bugs.webkit.org/show_bug.cgi?id=115963
+
+ Reviewed by Dean Jackson.
+
+ * media/video-remove-insert-repaints.html: Added.
+ * media/video-remove-insert-repaints-expected.txt: Added.
+ * platform/mac/media/video-remove-insert-repaints-expected.png: Added.
+
2013-05-12 Jinwoo Song <[email protected]>
[EFL] Unreviewed EFL gardening
Added: trunk/LayoutTests/media/video-remove-insert-repaints-expected.txt (0 => 149989)
--- trunk/LayoutTests/media/video-remove-insert-repaints-expected.txt (rev 0)
+++ trunk/LayoutTests/media/video-remove-insert-repaints-expected.txt 2013-05-13 06:40:52 UTC (rev 149989)
@@ -0,0 +1,8 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderText {#text} at (0,0) size 0x0
+layer at (8,8) size 320x240
+ RenderVideo {VIDEO} at (0,0) size 320x240
Added: trunk/LayoutTests/media/video-remove-insert-repaints.html (0 => 149989)
--- trunk/LayoutTests/media/video-remove-insert-repaints.html (rev 0)
+++ trunk/LayoutTests/media/video-remove-insert-repaints.html 2013-05-13 06:40:52 UTC (rev 149989)
@@ -0,0 +1,49 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Test that video is rendered after being re-inserted into a document.</title>
+
+ <script src=""
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ function seeked()
+ {
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+
+ function playing()
+ {
+ video.pause();
+ video.currentTime = 0;
+ }
+
+ function canplaythrough()
+ {
+ document.body.removeChild(video);
+ document.body.offsetLeft;
+ document.body.appendChild(video);
+ video.play();
+ }
+
+ function start()
+ {
+ video = document.getElementsByTagName('video')[0];
+ video.src = "" 'content/test');
+ video.addEventListener('canplaythrough', canplaythrough);
+ video.addEventListener('playing', playing);
+ video.addEventListener('seeked', seeked);
+ }
+
+ </script>
+
+ </head>
+
+ <body _onload_="start()">
+
+ <video width=320 height=240 ></video>
+
+ </body>
+</html>
Added: trunk/LayoutTests/platform/mac/media/video-remove-insert-repaints-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/media/video-remove-insert-repaints-expected.png
___________________________________________________________________
Added: svn:mime-type
Modified: trunk/Source/WebCore/ChangeLog (149988 => 149989)
--- trunk/Source/WebCore/ChangeLog 2013-05-13 06:39:19 UTC (rev 149988)
+++ trunk/Source/WebCore/ChangeLog 2013-05-13 06:40:52 UTC (rev 149989)
@@ -1,3 +1,16 @@
+2013-05-12 Eric Carlson <[email protected]>
+
+ REGRESSION (r149749): Video becomes invisible when it starts playing at newyorkbygehry.com
+ https://bugs.webkit.org/show_bug.cgi?id=115963
+
+ Reviewed by Dean Jackson.
+
+ Test: media/video-remove-insert-repaints.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::insertedInto): Set m_inActiveDocument when inserted into a document.
+ (WebCore::HTMLMediaElement::removedFrom): Fix logging.
+
2013-05-12 David Kilzer <[email protected]>
Move sudden termination symbols to the Mac-only section
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (149988 => 149989)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2013-05-13 06:39:19 UTC (rev 149988)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2013-05-13 06:40:52 UTC (rev 149989)
@@ -578,19 +578,25 @@
Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint)
{
LOG(Media, "HTMLMediaElement::insertedInto");
+
HTMLElement::insertedInto(insertionPoint);
- if (insertionPoint->inDocument() && !getAttribute(srcAttr).isEmpty() && m_networkState == NETWORK_EMPTY)
- scheduleDelayedAction(LoadMediaResource);
+ if (insertionPoint->inDocument()) {
+ m_inActiveDocument = true;
+
+ if (m_networkState == NETWORK_EMPTY && !getAttribute(srcAttr).isEmpty())
+ scheduleDelayedAction(LoadMediaResource);
+ }
+
configureMediaControls();
return InsertionDone;
}
void HTMLMediaElement::removedFrom(ContainerNode* insertionPoint)
{
+ LOG(Media, "HTMLMediaElement::removedFrom");
+
m_inActiveDocument = false;
-
if (insertionPoint->inDocument()) {
- LOG(Media, "HTMLMediaElement::removedFrom");
configureMediaControls();
if (m_networkState > NETWORK_EMPTY)
pause();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes