Diff
Modified: branches/safari-536.28-branch/LayoutTests/ChangeLog (133473 => 133474)
--- branches/safari-536.28-branch/LayoutTests/ChangeLog 2012-11-05 15:17:52 UTC (rev 133473)
+++ branches/safari-536.28-branch/LayoutTests/ChangeLog 2012-11-05 15:20:49 UTC (rev 133474)
@@ -1,5 +1,21 @@
2012-11-05 Lucas Forschler <[email protected]>
+ Merge r125052
+
+ 2012-08-08 Tom Sepez <[email protected]>
+
+ Video element image loader must persist after element detach.
+ https://bugs.webkit.org/show_bug.cgi?id=90801
+
+ Reviewed by Eric Carlson.
+
+ We rely on the OwnPtr in the element to cleanup the loader.
+
+ * fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt: Added.
+ * fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html: Added.
+
+2012-11-05 Lucas Forschler <[email protected]>
+
Merge r124914
2012-08-07 Abhishek Arya <[email protected]>
@@ -10921,3 +10937,4 @@
.
.
.
+.
Copied: branches/safari-536.28-branch/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt (from rev 125052, trunk/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt) (0 => 133474)
--- branches/safari-536.28-branch/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt (rev 0)
+++ branches/safari-536.28-branch/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener-expected.txt 2012-11-05 15:20:49 UTC (rev 133474)
@@ -0,0 +1,3 @@
+This page tests that you can correctly remove a video object with a poster in a beforeload listener without causing a crash.
+
+PASS
Copied: branches/safari-536.28-branch/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html (from rev 125052, trunk/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html) (0 => 133474)
--- branches/safari-536.28-branch/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html (rev 0)
+++ branches/safari-536.28-branch/LayoutTests/fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html 2012-11-05 15:20:49 UTC (rev 133474)
@@ -0,0 +1,46 @@
+<html>
+<head>
+ <script src=""
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ var count = 0;
+ var maxCount = 10;
+ var timeout = 100;
+
+ document.addEventListener("beforeload", function(event) {
+ event.target.parentElement.removeChild(event.target);
+ }, true);
+ </script>
+</head>
+<body>
+ <p>This page tests that you can correctly remove a video object with a poster in a beforeload listener without causing a crash.</p>
+ <div id="console"></div>
+ <script>
+ function checkObjectRemoval()
+ {
+ if (!document.getElementsByTagName("video").length) {
+ print("PASS", "green");
+ if (window.testRunner)
+ testRunner.notifyDone();
+ return;
+ }
+
+ if (++count > maxCount) {
+ print("FAIL", "red");
+ if (window.testRunner)
+ testRunner.notifyDone();
+ return;
+ }
+
+ setTimeout("checkObjectRemoval()", timeout);
+ }
+
+ setTimeout("checkObjectRemoval()", timeout);
+ </script>
+ <video poster="../resources/abe.png">>><source>>>
+</body>
+</html>
Modified: branches/safari-536.28-branch/Source/WebCore/ChangeLog (133473 => 133474)
--- branches/safari-536.28-branch/Source/WebCore/ChangeLog 2012-11-05 15:17:52 UTC (rev 133473)
+++ branches/safari-536.28-branch/Source/WebCore/ChangeLog 2012-11-05 15:20:49 UTC (rev 133474)
@@ -1,5 +1,25 @@
2012-11-05 Lucas Forschler <[email protected]>
+ Merge r125052
+
+ 2012-08-08 Tom Sepez <[email protected]>
+
+ Video element image loader must persist after element detach.
+ https://bugs.webkit.org/show_bug.cgi?id=90801
+
+ Reviewed by Eric Carlson.
+
+ We rely on the OwnPtr in the element to cleanup the loader.
+
+ Test: fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html
+
+ * html/HTMLVideoElement.cpp:
+ (WebCore):
+ * html/HTMLVideoElement.h:
+ (HTMLVideoElement):
+
+2012-11-05 Lucas Forschler <[email protected]>
+
Merge r124924
2012-08-07 Anders Carlsson <[email protected]>
@@ -206395,3 +206415,4 @@
.
.
.
+.
Modified: branches/safari-536.28-branch/Source/WebCore/html/HTMLVideoElement.cpp (133473 => 133474)
--- branches/safari-536.28-branch/Source/WebCore/html/HTMLVideoElement.cpp 2012-11-05 15:17:52 UTC (rev 133473)
+++ branches/safari-536.28-branch/Source/WebCore/html/HTMLVideoElement.cpp 2012-11-05 15:20:49 UTC (rev 133474)
@@ -87,14 +87,6 @@
#endif
}
-void HTMLVideoElement::detach()
-{
- HTMLMediaElement::detach();
-
- if (!shouldDisplayPosterImage() && m_imageLoader)
- m_imageLoader.clear();
-}
-
void HTMLVideoElement::collectStyleForAttribute(Attribute* attr, StylePropertySet* style)
{
if (attr->name() == widthAttr)
Modified: branches/safari-536.28-branch/Source/WebCore/html/HTMLVideoElement.h (133473 => 133474)
--- branches/safari-536.28-branch/Source/WebCore/html/HTMLVideoElement.h 2012-11-05 15:17:52 UTC (rev 133473)
+++ branches/safari-536.28-branch/Source/WebCore/html/HTMLVideoElement.h 2012-11-05 15:20:49 UTC (rev 133474)
@@ -74,7 +74,6 @@
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
#endif
virtual void attach();
- virtual void detach();
virtual void parseAttribute(Attribute*) OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForAttribute(Attribute*, StylePropertySet*) OVERRIDE;