Title: [102962] trunk
Revision
102962
Author
[email protected]
Date
2011-12-15 10:50:59 -0800 (Thu, 15 Dec 2011)

Log Message

Unreviewed, rolling out r102829.
http://trac.webkit.org/changeset/102829
https://bugs.webkit.org/show_bug.cgi?id=74533

Caused https://bugs.webkit.org/show_bug.cgi?id=74555

Source/WebCore: 

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument):
(WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument):
(WebCore::HTMLPlugInImageElement::documentWillBecomeInactive):
(WebCore::HTMLPlugInImageElement::documentDidBecomeActive):
* html/HTMLPlugInImageElement.h:

LayoutTests: 

* media/crash-closing-page-with-media-as-plugin-fallback-expected.txt: Removed.
* media/crash-closing-page-with-media-as-plugin-fallback.html: Removed.
* media/resources/video-with-poster-as-object-fallback.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (102961 => 102962)


--- trunk/LayoutTests/ChangeLog	2011-12-15 18:45:29 UTC (rev 102961)
+++ trunk/LayoutTests/ChangeLog	2011-12-15 18:50:59 UTC (rev 102962)
@@ -1,3 +1,15 @@
+2011-12-15  Brady Eidson  <[email protected]>
+
+        Unreviewed, rolling out r102829.
+        http://trac.webkit.org/changeset/102829
+        https://bugs.webkit.org/show_bug.cgi?id=74533
+
+        Caused https://bugs.webkit.org/show_bug.cgi?id=74555
+
+        * media/crash-closing-page-with-media-as-plugin-fallback-expected.txt: Removed.
+        * media/crash-closing-page-with-media-as-plugin-fallback.html: Removed.
+        * media/resources/video-with-poster-as-object-fallback.html: Removed.
+
 2011-12-15  James Simonsen  <[email protected]>
 
         [Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()

Deleted: trunk/LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback-expected.txt (102961 => 102962)


--- trunk/LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback-expected.txt	2011-12-15 18:45:29 UTC (rev 102961)
+++ trunk/LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback-expected.txt	2011-12-15 18:50:59 UTC (rev 102962)
@@ -1,6 +0,0 @@
-This test makes sure that closing a window with a video element that has a poster image doesn't crash (radar 10576732 and https://bugs.webkit.org/show_bug.cgi?id=74533)
-If it doesn't crash, it passes.
-Click here to open test window
-Closed the window without crashing!
-
-

Deleted: trunk/LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback.html (102961 => 102962)


--- trunk/LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback.html	2011-12-15 18:45:29 UTC (rev 102961)
+++ trunk/LayoutTests/media/crash-closing-page-with-media-as-plugin-fallback.html	2011-12-15 18:50:59 UTC (rev 102962)
@@ -1,41 +0,0 @@
-<script>
-var childWindow;
-</script>
-This test makes sure that closing a window with a video element that has a poster image doesn't crash (radar 10576732 and https://bugs.webkit.org/show_bug.cgi?id=74533)<br>
-If it doesn't crash, it passes.<br>
-<button id="button" _onclick_="childWindow = window.open('resources/video-with-poster-as-object-fallback.html')">
-    Click here to open test window
-</button><br>
-<div id="result"></div><br>
-
-<script>
-if (window.layoutTestController) {
-    layoutTestController.dumpAsText();
-    layoutTestController.waitUntilDone();
-    layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
-    layoutTestController.overridePreference("WebKitPageCacheSupportsPluginsPreferenceKey", 1);
-    layoutTestController.setCanOpenWindows(true);
-    layoutTestController.setCloseRemainingWindowsWhenComplete(true);
-    var button = document.getElementById("button");
-    eventSender.mouseMoveTo(button.offsetParent.offsetLeft + button.offsetLeft + button.offsetWidth / 2, button.offsetParent.offsetTop +  button.offsetTop + button.offsetHeight / 2);
-    eventSender.mouseDown();
-    eventSender.mouseUp();
-}
-
-function childLoaded()
-{
-    childWindow.close();
-    setTimeout("checkClosed()", 0);
-}
-
-function checkClosed()
-{
-    if (childWindow.closed) {
-        document.getElementById("result").innerText = "Closed the window without crashing!";
-        if (window.layoutTestController)
-            setTimeout("layoutTestController.notifyDone();", 0);
-    }
-    setTimeout("checkClosed()", 0);
-}
-
-</script>

Deleted: trunk/LayoutTests/media/resources/video-with-poster-as-object-fallback.html (102961 => 102962)


--- trunk/LayoutTests/media/resources/video-with-poster-as-object-fallback.html	2011-12-15 18:45:29 UTC (rev 102961)
+++ trunk/LayoutTests/media/resources/video-with-poster-as-object-fallback.html	2011-12-15 18:50:59 UTC (rev 102962)
@@ -1,10 +0,0 @@
-<script src=""
-<body _onload_="opener.childLoaded()">
-<object height="500" width="500">
-<video id="theVideo" controls="controls" poster="../content/abe.png" preload="auto">
-</video>
-<script>
-document.getElementById("theVideo").src = "" '../content/counting');
-</script>
-</object>
-</body>

Modified: trunk/Source/WebCore/ChangeLog (102961 => 102962)


--- trunk/Source/WebCore/ChangeLog	2011-12-15 18:45:29 UTC (rev 102961)
+++ trunk/Source/WebCore/ChangeLog	2011-12-15 18:50:59 UTC (rev 102962)
@@ -1,3 +1,19 @@
+2011-12-15  Brady Eidson  <[email protected]>
+
+        Unreviewed, rolling out r102829.
+        http://trac.webkit.org/changeset/102829
+        https://bugs.webkit.org/show_bug.cgi?id=74533
+
+        Caused https://bugs.webkit.org/show_bug.cgi?id=74555
+
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
+        (WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument):
+        (WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument):
+        (WebCore::HTMLPlugInImageElement::documentWillBecomeInactive):
+        (WebCore::HTMLPlugInImageElement::documentDidBecomeActive):
+        * html/HTMLPlugInImageElement.h:
+
 2011-12-15  James Simonsen  <[email protected]>
 
         [Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()

Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp (102961 => 102962)


--- trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp	2011-12-15 18:45:29 UTC (rev 102961)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp	2011-12-15 18:50:59 UTC (rev 102962)
@@ -37,7 +37,6 @@
 
 HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document, bool createdByParser, PreferPlugInsForImagesOption preferPlugInsForImagesOption)
     : HTMLPlugInElement(tagName, document)
-    , ActiveDOMObject(document, this)
     // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay
     // widget updates until after all children are parsed.  For HTMLEmbedElement
     // this delay is unnecessary, but it is simpler to make both classes share
@@ -203,16 +202,27 @@
         setNeedsStyleRecalc();    
 }
 
-bool HTMLPlugInImageElement::canSuspend() const
+void HTMLPlugInImageElement::willMoveToNewOwnerDocument()
 {
-    return true;
+    if (m_needsDocumentActivationCallbacks)
+        document()->unregisterForDocumentActivationCallbacks(this);
+
+    if (m_imageLoader)
+        m_imageLoader->elementWillMoveToNewOwnerDocument();
+
+    HTMLPlugInElement::willMoveToNewOwnerDocument();
 }
 
-void HTMLPlugInImageElement::suspend(ReasonForSuspension reason)
+void HTMLPlugInImageElement::didMoveToNewOwnerDocument()
 {
-    if (reason != DocumentWillBecomeInactive)
-        return;
+    if (m_needsDocumentActivationCallbacks)
+        document()->registerForDocumentActivationCallbacks(this);   
+    
+    HTMLPlugInElement::didMoveToNewOwnerDocument();
+}
 
+void HTMLPlugInImageElement::documentWillBecomeInactive()
+{
     if (RenderStyle* rs = renderStyle()) {
         m_customStyleForPageCache = RenderStyle::clone(rs);
         m_customStyleForPageCache->setDisplay(NONE);
@@ -222,9 +232,11 @@
 
     if (m_customStyleForPageCache)
         recalcStyle(Force);
+        
+    HTMLPlugInElement::documentWillBecomeInactive();
 }
 
-void HTMLPlugInImageElement::resume()
+void HTMLPlugInImageElement::documentDidBecomeActive()
 {
     clearHasCustomStyleForRenderer();
 
@@ -232,6 +244,8 @@
         m_customStyleForPageCache = 0;
         recalcStyle(Force);
     }
+    
+    HTMLPlugInElement::documentDidBecomeActive();
 }
 
 PassRefPtr<RenderStyle> HTMLPlugInImageElement::customStyleForRenderer()

Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.h (102961 => 102962)


--- trunk/Source/WebCore/html/HTMLPlugInImageElement.h	2011-12-15 18:45:29 UTC (rev 102961)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.h	2011-12-15 18:50:59 UTC (rev 102962)
@@ -21,8 +21,8 @@
 #ifndef HTMLPlugInImageElement_h
 #define HTMLPlugInImageElement_h
 
-#include "ActiveDOMObject.h"
 #include "HTMLPlugInElement.h"
+
 #include "RenderStyle.h"
 #include <wtf/OwnPtr.h>
 
@@ -42,7 +42,7 @@
 };
 
 // Base class for HTMLObjectElement and HTMLEmbedElement
-class HTMLPlugInImageElement : public HTMLPlugInElement, public ActiveDOMObject {
+class HTMLPlugInImageElement : public HTMLPlugInElement {
 public:
     virtual ~HTMLPlugInImageElement();
 
@@ -53,7 +53,7 @@
     const String& serviceType() const { return m_serviceType; }
     const String& url() const { return m_url; }
     bool shouldPreferPlugInsForImages() const { return m_shouldPreferPlugInsForImages; }
-    
+
 protected:
     HTMLPlugInImageElement(const QualifiedName& tagName, Document*, bool createdByParser, PreferPlugInsForImagesOption);
 
@@ -73,9 +73,11 @@
     bool allowedToLoadFrameURL(const String& url);
     bool wouldLoadAsNetscapePlugin(const String& url, const String& serviceType);
 
-    virtual bool canSuspend() const OVERRIDE;
-    virtual void suspend(ReasonForSuspension) OVERRIDE;
-    virtual void resume() OVERRIDE;
+    virtual void willMoveToNewOwnerDocument() OVERRIDE;
+    virtual void didMoveToNewOwnerDocument() OVERRIDE;
+    
+    virtual void documentWillBecomeInactive() OVERRIDE;
+    virtual void documentDidBecomeActive() OVERRIDE;
 
     virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to