[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:59:17 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 59054a1a38f81dd6b807e6db4901e09fd944a911
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 2 01:43:40 2003 +0000

    	Avoid doing extra work when tearing down the document by checking to see if
    	we're in the destruction of the document.
    
            Reviewed by darin
    
            * khtml/rendering/render_block.cpp:
            * khtml/rendering/render_container.cpp:
            (RenderContainer::removeChildNode):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5113 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 738bc02..dd0e871 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2003-10-01  David Hyatt  <hyatt at apple.com>
+
+	Avoid doing extra work when tearing down the document by checking to see if
+	we're in the destruction of the document.
+	
+        Reviewed by darin
+
+        * khtml/rendering/render_block.cpp:
+        * khtml/rendering/render_container.cpp:
+        (RenderContainer::removeChildNode):
+
 2003-10-01  Richard Williamson   <rjw at apple.com>
 
 	Fixed 3438441.  Pass extra info up to WebKit about load type, specifically is a load is triggered by JS running in an onLoad handler.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 738bc02..dd0e871 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2003-10-01  David Hyatt  <hyatt at apple.com>
+
+	Avoid doing extra work when tearing down the document by checking to see if
+	we're in the destruction of the document.
+	
+        Reviewed by darin
+
+        * khtml/rendering/render_block.cpp:
+        * khtml/rendering/render_container.cpp:
+        (RenderContainer::removeChildNode):
+
 2003-10-01  Richard Williamson   <rjw at apple.com>
 
 	Fixed 3438441.  Pass extra info up to WebKit about load type, specifically is a load is triggered by JS running in an onLoad handler.
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index fb8c366..132b651 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -319,7 +319,7 @@ void RenderBlock::removeChild(RenderObject *oldChild)
     RenderObject* prev = oldChild->previousSibling();
     RenderObject* next = oldChild->nextSibling();
     bool mergedBlocks = false;
-    if (!isInline() && !oldChild->isInline() && !oldChild->continuation() &&
+    if (document()->renderer() && !isInline() && !oldChild->isInline() && !oldChild->continuation() &&
         prev && prev->isAnonymous() && prev->childrenInline() &&
         next && next->isAnonymous() && next->childrenInline()) {
         // Take all the children out of the |next| block and put them in
diff --git a/WebCore/khtml/rendering/render_container.cpp b/WebCore/khtml/rendering/render_container.cpp
index b2d4423..9ad9ea4 100644
--- a/WebCore/khtml/rendering/render_container.cpp
+++ b/WebCore/khtml/rendering/render_container.cpp
@@ -158,32 +158,34 @@ RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild)
     // So that we'll get the appropriate dirty bit set (either that a normal flow child got yanked or
     // that a positioned child got yanked).  We also repaint, so that the area exposed when the child
     // disappears gets repainted properly.
-    oldChild->setNeedsLayoutAndMinMaxRecalc();
+    if (document()->renderer()) {
+        oldChild->setNeedsLayoutAndMinMaxRecalc();
 #ifdef INCREMENTAL_REPAINTING
-    oldChild->repaint();
+        oldChild->repaint();
 #endif
+        
+        // Keep our layer hierarchy updated.
+        oldChild->removeLayers(enclosingLayer());
     
-    // Keep our layer hierarchy updated.
-    oldChild->removeLayers(enclosingLayer());
-   
-    // if oldChild is the start or end of the selection, then clear the selection to
-    // avoid problems of invalid pointers
-
-    // ### This is not the "proper" solution... ideally the selection should be maintained
-    // based on DOM Nodes and a Range, which gets adjusted appropriately when nodes are
-    // deleted/inserted near etc. But this at least prevents crashes caused when the start
-    // or end of the selection is deleted and then accessed when the user next selects
-    // something.
-
-    if (oldChild->isSelectionBorder()) {
-        RenderObject *root = oldChild;
-        while (root && root->parent())
-            root = root->parent();
-        if (root->isCanvas()) {
-            static_cast<RenderCanvas*>(root)->clearSelection();
+        // if oldChild is the start or end of the selection, then clear the selection to
+        // avoid problems of invalid pointers
+    
+        // ### This is not the "proper" solution... ideally the selection should be maintained
+        // based on DOM Nodes and a Range, which gets adjusted appropriately when nodes are
+        // deleted/inserted near etc. But this at least prevents crashes caused when the start
+        // or end of the selection is deleted and then accessed when the user next selects
+        // something.
+    
+        if (oldChild->isSelectionBorder()) {
+            RenderObject *root = oldChild;
+            while (root && root->parent())
+                root = root->parent();
+            if (root->isCanvas()) {
+                static_cast<RenderCanvas*>(root)->clearSelection();
+            }
         }
     }
-
+    
     // remove the child
     if (oldChild->previousSibling())
         oldChild->previousSibling()->setNextSibling(oldChild->nextSibling());

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list