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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:59:55 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit aed62356b240dd2c651613ce8a6d7193a7c6be69
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 14 05:11:03 2002 +0000

    	- fixed 3100895 -- REGRESSION: Assertion on http://www.w3.org/Style/CSS/
    
    	A few arena-related fixes.
    
            * khtml/rendering/bidi.h: Don't define the operator new without the arena parameter.
    	That way, we get a link failure if we use it by accident, rather than an assert at runtime.
    	It would be even better to get a compile-time error, but I don't know how to make that happen.
            * khtml/rendering/render_layer.h: Ditto.
            * khtml/rendering/render_object.h: Ditto.
            * khtml/rendering/render_text.h: Ditto.
    
            * khtml/rendering/render_container.cpp:
            (RenderContainer::addChild): Create the RenderTable with the appropriate arena.
            (RenderContainer::insertPseudoChild): Create the RenderFlow objects with the appropriate arena.
    
            * khtml/rendering/render_text.cpp: (RenderText::deleteSlaves): Don't try to get the arena
    	when there are no slaves. This can happen after the element is nil, and in that case we will
    	do a nil-dereference.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2665 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 5b21e1a..30c61a8 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,26 @@
 2002-11-13  Darin Adler  <darin at apple.com>
 
+	- fixed 3100895 -- REGRESSION: Assertion on http://www.w3.org/Style/CSS/
+
+	A few arena-related fixes.
+
+        * khtml/rendering/bidi.h: Don't define the operator new without the arena parameter.
+	That way, we get a link failure if we use it by accident, rather than an assert at runtime.
+	It would be even better to get a compile-time error, but I don't know how to make that happen.
+        * khtml/rendering/render_layer.h: Ditto.
+        * khtml/rendering/render_object.h: Ditto.
+        * khtml/rendering/render_text.h: Ditto.
+
+        * khtml/rendering/render_container.cpp:
+        (RenderContainer::addChild): Create the RenderTable with the appropriate arena.
+        (RenderContainer::insertPseudoChild): Create the RenderFlow objects with the appropriate arena.
+
+        * khtml/rendering/render_text.cpp: (RenderText::deleteSlaves): Don't try to get the arena
+	when there are no slaves. This can happen after the element is nil, and in that case we will
+	do a nil-dereference.
+
+2002-11-13  Darin Adler  <darin at apple.com>
+
         * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth):
 	Use the "0" instead of the "x" as the canonical character for width.
 	This is slightly wider and is better for credit card numbers, for example.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5b21e1a..30c61a8 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,26 @@
 2002-11-13  Darin Adler  <darin at apple.com>
 
+	- fixed 3100895 -- REGRESSION: Assertion on http://www.w3.org/Style/CSS/
+
+	A few arena-related fixes.
+
+        * khtml/rendering/bidi.h: Don't define the operator new without the arena parameter.
+	That way, we get a link failure if we use it by accident, rather than an assert at runtime.
+	It would be even better to get a compile-time error, but I don't know how to make that happen.
+        * khtml/rendering/render_layer.h: Ditto.
+        * khtml/rendering/render_object.h: Ditto.
+        * khtml/rendering/render_text.h: Ditto.
+
+        * khtml/rendering/render_container.cpp:
+        (RenderContainer::addChild): Create the RenderTable with the appropriate arena.
+        (RenderContainer::insertPseudoChild): Create the RenderFlow objects with the appropriate arena.
+
+        * khtml/rendering/render_text.cpp: (RenderText::deleteSlaves): Don't try to get the arena
+	when there are no slaves. This can happen after the element is nil, and in that case we will
+	do a nil-dereference.
+
+2002-11-13  Darin Adler  <darin at apple.com>
+
         * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth):
 	Use the "0" instead of the "x" as the canonical character for width.
 	This is slightly wider and is better for credit card numbers, for example.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5b21e1a..30c61a8 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,26 @@
 2002-11-13  Darin Adler  <darin at apple.com>
 
+	- fixed 3100895 -- REGRESSION: Assertion on http://www.w3.org/Style/CSS/
+
+	A few arena-related fixes.
+
+        * khtml/rendering/bidi.h: Don't define the operator new without the arena parameter.
+	That way, we get a link failure if we use it by accident, rather than an assert at runtime.
+	It would be even better to get a compile-time error, but I don't know how to make that happen.
+        * khtml/rendering/render_layer.h: Ditto.
+        * khtml/rendering/render_object.h: Ditto.
+        * khtml/rendering/render_text.h: Ditto.
+
+        * khtml/rendering/render_container.cpp:
+        (RenderContainer::addChild): Create the RenderTable with the appropriate arena.
+        (RenderContainer::insertPseudoChild): Create the RenderFlow objects with the appropriate arena.
+
+        * khtml/rendering/render_text.cpp: (RenderText::deleteSlaves): Don't try to get the arena
+	when there are no slaves. This can happen after the element is nil, and in that case we will
+	do a nil-dereference.
+
+2002-11-13  Darin Adler  <darin at apple.com>
+
         * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth):
 	Use the "0" instead of the "x" as the canonical character for width.
 	This is slightly wider and is better for credit card numbers, for example.
diff --git a/WebCore/khtml/rendering/bidi.h b/WebCore/khtml/rendering/bidi.h
index 67a2da4..354a31f 100644
--- a/WebCore/khtml/rendering/bidi.h
+++ b/WebCore/khtml/rendering/bidi.h
@@ -113,7 +113,7 @@ namespace khtml {
         
 private:
     // The normal operator new is disallowed.
-    void* operator new(size_t sz) throw() { assert(false); return 0; };
+    void* operator new(size_t sz) throw();
 
 public:
 	RenderFlow *par;
diff --git a/WebCore/khtml/rendering/render_container.cpp b/WebCore/khtml/rendering/render_container.cpp
index fcbdfed..cbf1401 100644
--- a/WebCore/khtml/rendering/render_container.cpp
+++ b/WebCore/khtml/rendering/render_container.cpp
@@ -125,7 +125,7 @@ void RenderContainer::addChild(RenderObject *newChild, RenderObject *beforeChild
             table = static_cast<RenderTable *>(beforeChild);
         else {
             //kdDebug( 6040 ) << "creating anonymous table" << endl;
-            table = new RenderTable(0 /* is anonymous */);
+            table = new (renderArena()) RenderTable(0 /* is anonymous */);
             RenderStyle *newStyle = new RenderStyle();
             newStyle->inheritFrom(style());
             newStyle->setDisplay(TABLE);
@@ -209,12 +209,12 @@ void RenderContainer::insertPseudoChild(RenderStyle::PseudoId type, RenderObject
     {
         if (pseudo->contentType()==CONTENT_TEXT)
         {
-            RenderObject* po = new RenderFlow(0 /* anonymous box */);
+            RenderObject* po = new (renderArena()) RenderFlow(0 /* anonymous box */);
             po->setStyle(pseudo);
 
             addChild(po, beforeChild);
 
-            RenderText* t = new RenderText(0 /*anonymous object */, pseudo->contentText());
+            RenderText* t = new (renderArena()) RenderText(0 /*anonymous object */, pseudo->contentText());
             t->setStyle(pseudo);
 
 //            kdDebug() << DOM::DOMString(pseudo->contentText()).string() << endl;
@@ -226,7 +226,7 @@ void RenderContainer::insertPseudoChild(RenderStyle::PseudoId type, RenderObject
         }
         else if (pseudo->contentType()==CONTENT_OBJECT)
         {
-            RenderObject* po = new RenderImage(0);
+            RenderObject* po = new (renderArena()) RenderImage(0);
             po->setStyle(pseudo);
             addChild(po, beforeChild);
             po->close();
diff --git a/WebCore/khtml/rendering/render_layer.h b/WebCore/khtml/rendering/render_layer.h
index 626ef3c..be88cc8 100644
--- a/WebCore/khtml/rendering/render_layer.h
+++ b/WebCore/khtml/rendering/render_layer.h
@@ -109,7 +109,7 @@ public:
         
 private:
     // The normal operator new is disallowed on all render objects.
-    void* operator new(size_t sz) throw() { assert(false); return 0; };
+    void* operator new(size_t sz) throw();
 
 public:
     // Z-Index Implementation Notes
@@ -157,7 +157,7 @@ public:
       void operator delete(void* ptr, size_t sz);
         
       // The normal operator new is disallowed.
-      void* operator new(size_t sz) throw() { assert(false); return 0; };
+      void* operator new(size_t sz) throw();
     };
 
     // The list of layer elements is built through a recursive examination
@@ -205,7 +205,7 @@ public:
       void operator delete(void* ptr, size_t sz);
         
       // The normal operator new is disallowed.
-      void* operator new(size_t sz) throw() { assert(false); return 0; };
+      void* operator new(size_t sz) throw();
     };
       
 private:
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index 75d297d..744d25b 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -131,7 +131,7 @@ public:
         
 private:
     // The normal operator new is disallowed on all render objects.
-    void* operator new(size_t sz) throw() { assert(false); return 0; };
+    void* operator new(size_t sz) throw();
     
 public:
     RenderArena* renderArena();
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index da74115..642fb0e 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -350,13 +350,15 @@ void RenderText::deleteSlaves()
     // We don't delete the array itself here because its
     // likely to be used in the same size later again, saves
     // us resize() calls
-    RenderArena* arena = element()->getDocument()->renderArena();
     unsigned int len = m_lines.size();
-    for(unsigned int i=0; i < len; i++) {
-        TextSlave* s = m_lines.at(i);
-        if (s)
-            s->detach(arena);
-        m_lines.remove(i);
+    if (len) {
+        RenderArena* arena = element()->getDocument()->renderArena();
+        for(unsigned int i=0; i < len; i++) {
+            TextSlave* s = m_lines.at(i);
+            if (s)
+                s->detach(arena);
+            m_lines.remove(i);
+        }
     }
     
     KHTMLAssert(m_lines.count() == 0);
diff --git a/WebCore/khtml/rendering/render_text.h b/WebCore/khtml/rendering/render_text.h
index 8c68873..35d8bc5 100644
--- a/WebCore/khtml/rendering/render_text.h
+++ b/WebCore/khtml/rendering/render_text.h
@@ -68,7 +68,7 @@ public:
         
 private:
     // The normal operator new is disallowed.
-    void* operator new(size_t sz) throw() { assert(false); return 0; };
+    void* operator new(size_t sz) throw();
 
 public:
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list