From bounce-debian-bugs-dist==chris-lamb.co.uk@lists.debian.org Sun Apr 20 04:05:09 2008
Received: from liszt.debian.org ([82.195.75.100])
	by chris-lamb.co.uk with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.63)
	(envelope-from <bounce-debian-bugs-dist==chris-lamb.co.uk@lists.debian.org>)
	id 1JnPrO-0005E7-46
	for bot.address@chris-lamb.co.uk; Sun, 20 Apr 2008 04:05:08 +0100
Received: from localhost (localhost [127.0.0.1])
	by liszt.debian.org (Postfix) with QMQP
	id 82BD213A4E55; Sun, 20 Apr 2008 03:04:56 +0000 (UTC)
Old-Return-Path: <debbugs@rietz.debian.org>
X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on liszt.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-7.0 required=4.0 tests=BAYES_00,IMPRONONCABLE_2,
	LDO_WHITELIST,MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3
X-Original-To: debian-bugs-dist@lists.debian.org
Delivered-To: lists-debian-bugs-dist@liszt.debian.org
Received: from rietz.debian.org (rietz.debian.org [140.211.166.43])
	by liszt.debian.org (Postfix) with ESMTP id DE97E13A49A8;
	Sun, 20 Apr 2008 03:04:45 +0000 (UTC)
Received: from debbugs by rietz.debian.org with local (Exim 4.63)
	(envelope-from <debbugs@rietz.debian.org>)
	id 1JnPmd-00050T-LD; Sun, 20 Apr 2008 03:00:03 +0000
X-Loop: owner@bugs.debian.org
Subject: Bug#476896: kdelibs4c2a: Ported patch
Reply-To: Ted Percival <ted@midg3t.net>, 476896@bugs.debian.org
Resent-From: Ted Percival <ted@midg3t.net>
Resent-To: debian-bugs-dist@lists.debian.org
Resent-CC: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Resent-Date: Sun, 20 Apr 2008 03:00:01 +0000
Resent-Message-ID: <handler.476896.B476896.120866016311521@bugs.debian.org>
X-Debian-PR-Message: followup 476896
X-Debian-PR-Package: kdelibs4c2a
X-Debian-PR-Keywords: fixed-upstream patch upstream
X-Debian-PR-Source: kdelibs
Received: via spool by 476896-submit@bugs.debian.org id=B476896.120866016311521
          (code B ref 476896); Sun, 20 Apr 2008 03:00:01 +0000
Received: (at 476896) by bugs.debian.org; 20 Apr 2008 02:56:03 +0000
X-Amavis-Spam-Status: No, score=-8.8 required=4.0 tests=BAYES_00,FORGED_RCVD_HELO,
	HAS_PACKAGE,IMPRONONCABLE_2,MURPHY_DRUGS_REL8 autolearn=no 
	version=3.1.4-bugs.debian.org_2005_01_02
Received: from nskntmtas06p.mx.bigpond.com ([61.9.168.152])
	by rietz.debian.org with esmtp (Exim 4.63)
	(envelope-from <ted@midg3t.net>)
	id 1JnPil-0002wH-2S
	for 476896@bugs.debian.org; Sun, 20 Apr 2008 02:56:03 +0000
Received: from nskntotgx01p.mx.bigpond.com ([121.210.210.178])
          by nskntmtas06p.mx.bigpond.com with ESMTP
          id <20080420025556.NRTM2453.nskntmtas06p.mx.bigpond.com@nskntotgx01p.mx.bigpond.com>
          for <476896@bugs.debian.org>; Sun, 20 Apr 2008 02:55:56 +0000
Received: from erwin.midg3t.net ([121.210.210.178])
          by nskntotgx01p.mx.bigpond.com with ESMTP
          id <20080420025555.KZPJ14647.nskntotgx01p.mx.bigpond.com@erwin.midg3t.net>
          for <476896@bugs.debian.org>; Sun, 20 Apr 2008 02:55:55 +0000
Received: from murky.network.midg3t.net ([10.0.0.15])
	by erwin.midg3t.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69)
	(envelope-from <ted@midg3t.net>)
	id 1JnPic-0007wP-OF; Sun, 20 Apr 2008 12:55:54 +1000
Received: from ted by murky.network.midg3t.net with local (Exim 4.69)
	(envelope-from <ted@midg3t.net>)
	id 1JnPia-0007wi-EC; Sun, 20 Apr 2008 12:55:52 +1000
Content-Type: multipart/mixed; boundary="===============0752846388=="
MIME-Version: 1.0
From: Ted Percival <ted@midg3t.net>
To: Debian Bug Tracking System <476896@bugs.debian.org>
Message-ID: <20080420025552.30475.94975.reportbug@murky.network.midg3t.net>
X-Mailer: reportbug 3.39
Date: Sun, 20 Apr 2008 12:55:52 +1000
X-SA-Exim-Connect-IP: 10.0.0.15
X-SA-Exim-Mail-From: ted@midg3t.net
X-SA-Exim-Scanned: No (on erwin.midg3t.net); SAEximRunCond expanded to false
X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150202.480AB0BB.0093,ss=1,fgs=0
Resent-Date: Sun, 20 Apr 2008 03:00:03 +0000
X-Debian-Message: from BTS
X-Rc-Virus: 2007-09-13_01
X-Rc-Spam: 2007-10-04_01
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/343323
X-Loop: debian-bugs-dist@lists.debian.org
List-Id: <debian-bugs-dist.lists.debian.org>
List-Post: <mailto:debian-bugs-dist@lists.debian.org>
List-Help: <mailto:debian-bugs-dist-request@lists.debian.org?subject=help>
List-Subscribe: <mailto:debian-bugs-dist-request@lists.debian.org?subject=subscribe>
List-Unsubscribe: <mailto:debian-bugs-dist-request@lists.debian.org?subject=unsubscribe>
Precedence: list
Resent-Sender: debian-bugs-dist-request@lists.debian.org
Received-SPF: none
X-SPF-Guess: pass
X-Spam-Score: -35.4
X-Spam-Report: (-35.4 points, 5.0 required)
	pts rule name              description
	---- ---------------------- --------------------------------------------------
	-50 D_FOR_BOT              For debian-devel-changes bot
	0.1 FORGED_RCVD_HELO       Received: contains a forged HELO
	0.0 UNPARSEABLE_RELAY      Informational: message has unparseable relay lines
	-2.6 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
	[score: 0.0000]
	17 AWL                    AWL: From: address is in the auto white-list

This is a multi-part MIME message sent by reportbug.


--===============0752846388==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: kdelibs4c2a
Followup-For: Bug #476896

There are two trivial conflicts when applying upstream's patch to the
Debian package. In case it saves some time, I prepared a patch
with the conflicts resolved.

--===============0752846388==
Content-Type: text/x-c++; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="debian-476896.patch"

commit 3b2e06674197b23e52381521185bd13e046a16d7
Author: Ted Percival <ted@midg3t.net>
Date:   Sun Apr 20 12:49:31 2008 +1000

    Backported fix for KDE bug #150006
    Using attachment #23875

diff --git a/khtml/rendering/render_container.cpp b/khtml/rendering/render_container.cpp
index 7500780..c309b67 100644
--- a/khtml/rendering/render_container.cpp
+++ b/khtml/rendering/render_container.cpp
@@ -79,6 +79,8 @@ void RenderContainer::addChild(RenderObject *newChild, RenderObject *beforeChild
     kdDebug( 6040 ) << this << ": " <<  renderName() << "(RenderObject)::addChild( " << newChild << ": " <<
         newChild->renderName() << ", " << (beforeChild ? beforeChild->renderName() : "0") << " )" << endl;
 #endif
+    // protect ourselves from deletion
+    setDoNotDelete(true);
 
     bool needsTable = false;
 
@@ -159,6 +161,8 @@ void RenderContainer::addChild(RenderObject *newChild, RenderObject *beforeChild
             static_cast<RenderText*>(newChild)->setText(textToTransform, true);
     }
     newChild->attach();
+    
+    setDoNotDelete(false);
 }
 
 RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild)
@@ -545,7 +549,7 @@ void RenderContainer::removeLeftoverAnonymousBoxes()
 	RenderObject *next = child->nextSibling();
 
 	if ( child->isRenderBlock() && child->isAnonymousBlock() && !child->continuation() &&
-             !child->childrenInline() && !child->isTableCell() ) {
+             !child->childrenInline() && !child->isTableCell() && !child->doNotDelete()) {
 	    RenderObject *firstAnChild = child->firstChild();
 	    RenderObject *lastAnChild = child->lastChild();
 	    if ( firstAnChild ) {
@@ -560,17 +564,21 @@ void RenderContainer::removeLeftoverAnonymousBoxes()
 		    child->previousSibling()->setNextSibling( firstAnChild );
 		if ( child->nextSibling() )
 		    child->nextSibling()->setPreviousSibling( lastAnChild );
+		if ( child == firstChild() )
+		    m_first = firstAnChild;
+		if ( child == lastChild() )
+		    m_last = lastAnChild;
 	    } else {
 		if ( child->previousSibling() )
 		    child->previousSibling()->setNextSibling( child->nextSibling() );
 		if ( child->nextSibling() )
 		    child->nextSibling()->setPreviousSibling( child->previousSibling() );
-
+		if ( child == firstChild() )
+		    m_first = child->nextSibling();
+		if ( child == lastChild() )
+		    m_last = child->previousSibling();
 	    }
-	    if ( child == firstChild() )
-		m_first = firstAnChild;
-	    if ( child == lastChild() )
-		m_last = lastAnChild;
+
 	    child->setParent( 0 );
 	    child->setPreviousSibling( 0 );
 	    child->setNextSibling( 0 );
diff --git a/khtml/rendering/render_object.cpp b/khtml/rendering/render_object.cpp
index 9840688..9f97922 100644
--- a/khtml/rendering/render_object.cpp
+++ b/khtml/rendering/render_object.cpp
@@ -178,7 +178,8 @@ RenderObject::RenderObject(DOM::NodeImpl* node)
       m_isRoot( false ),
       m_afterPageBreak( false ),
       m_needsPageClear( false ),
-      m_containsPageBreak( false )
+      m_containsPageBreak( false ),
+	  m_doNotDelete( false )
 {
   assert( node );
   if (node->getDocument()->documentElement() == node) setIsRoot(true);
diff --git a/khtml/rendering/render_object.h b/khtml/rendering/render_object.h
index 0df080f..ea3938f 100644
--- a/khtml/rendering/render_object.h
+++ b/khtml/rendering/render_object.h
@@ -753,6 +753,9 @@ public:
 
     virtual void deleteInlineBoxes(RenderArena* arena=0) {(void)arena;}
     virtual void detach( );
+    
+    void setDoNotDelete(bool b) { m_doNotDelete = b; }
+    bool doNotDelete() const { return m_doNotDelete; }
 
     const QFont &font(bool firstLine) const {
 	return style( firstLine )->font();
@@ -835,7 +838,9 @@ private:
     bool m_needsPageClear            : 1;
     bool m_containsPageBreak         : 1;
 
-    // ### we have 16 + 24 bits. Cut 8 and save 32
+	bool m_doNotDelete 	             : 1; // This object should not be auto-deleted
+
+    // ### we have 16 + 25 bits.
 
 
     void arenaDelete(RenderArena *arena, void *objectBase);

--===============0752846388==--



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


