Title: [111108] trunk/Source/WebCore
Revision
111108
Author
[email protected]
Date
2012-03-16 19:27:51 -0700 (Fri, 16 Mar 2012)

Log Message

HTMLFrameElementBase::m_remainsAliveOnRemovalFromTree can be cleared without unloading the frame.
https://bugs.webkit.org/show_bug.cgi?id=80766

Reviewed by Adam Barth.

* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::insertedIntoDocument):
(WebCore::HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree):
if adoptNode() is called on a detached iframe or with a detached document,
unload the iframe to avoid live iframe to hang around w/o being attached to
a document.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (111107 => 111108)


--- trunk/Source/WebCore/ChangeLog	2012-03-17 02:22:57 UTC (rev 111107)
+++ trunk/Source/WebCore/ChangeLog	2012-03-17 02:27:51 UTC (rev 111108)
@@ -1,3 +1,17 @@
+2012-03-16  Dmitry Titov  <[email protected]>
+
+        HTMLFrameElementBase::m_remainsAliveOnRemovalFromTree can be cleared without unloading the frame.
+        https://bugs.webkit.org/show_bug.cgi?id=80766
+
+        Reviewed by Adam Barth.
+
+        * html/HTMLFrameElementBase.cpp:
+        (WebCore::HTMLFrameElementBase::insertedIntoDocument):
+        (WebCore::HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree):
+        if adoptNode() is called on a detached iframe or with a detached document,
+        unload the iframe to avoid live iframe to hang around w/o being attached to
+        a document.
+
 2012-03-16  Joe Thomas  <[email protected]>
 
         Xcode project file is not sorted.

Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.cpp (111107 => 111108)


--- trunk/Source/WebCore/html/HTMLFrameElementBase.cpp	2012-03-17 02:22:57 UTC (rev 111107)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.cpp	2012-03-17 02:27:51 UTC (rev 111108)
@@ -194,7 +194,8 @@
 
     if (m_remainsAliveOnRemovalFromTree) {
         updateOnReparenting();
-        setRemainsAliveOnRemovalFromTree(false);
+        m_remainsAliveOnRemovalFromTree = false;
+        m_checkInDocumentTimer.stop();
         return;
     }
     // DocumentFragments don't kick of any loads.
@@ -294,8 +295,10 @@
     // Start the async timer that is normally stopped by attach(). If it's not stopped and fires, it'll unload the frame.
     if (value)
         m_checkInDocumentTimer.startOneShot(0);
-    else
+    else {
         m_checkInDocumentTimer.stop();
+        willRemove();
+    }
 }
 
 void HTMLFrameElementBase::checkInDocumentTimerFired(Timer<HTMLFrameElementBase>*)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to