Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 219970
Collapse All | Expand All

(-)khtml/rendering/render_container.cpp.orig (-5 / +13 lines)
Lines 79-84 Link Here
79
    kdDebug( 6040 ) << this << ": " <<  renderName() << "(RenderObject)::addChild( " << newChild << ": " <<
79
    kdDebug( 6040 ) << this << ": " <<  renderName() << "(RenderObject)::addChild( " << newChild << ": " <<
80
        newChild->renderName() << ", " << (beforeChild ? beforeChild->renderName() : "0") << " )" << endl;
80
        newChild->renderName() << ", " << (beforeChild ? beforeChild->renderName() : "0") << " )" << endl;
81
#endif
81
#endif
82
    // protect ourselves from deletion
83
    setDoNotDelete(true);
82
84
83
    bool needsTable = false;
85
    bool needsTable = false;
84
86
Lines 159-164 Link Here
159
            static_cast<RenderText*>(newChild)->setText(textToTransform, true);
161
            static_cast<RenderText*>(newChild)->setText(textToTransform, true);
160
    }
162
    }
161
    newChild->attach();
163
    newChild->attach();
164
    
165
    setDoNotDelete(false);
162
}
166
}
163
167
164
RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild)
168
RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild)
Lines 545-551 Link Here
545
	RenderObject *next = child->nextSibling();
549
	RenderObject *next = child->nextSibling();
546
550
547
	if ( child->isRenderBlock() && child->isAnonymousBlock() && !child->continuation() &&
551
	if ( child->isRenderBlock() && child->isAnonymousBlock() && !child->continuation() &&
548
             !child->childrenInline() && !child->isTableCell() ) {
552
             !child->childrenInline() && !child->isTableCell() && !child->doNotDelete()) {
549
	    RenderObject *firstAnChild = child->firstChild();
553
	    RenderObject *firstAnChild = child->firstChild();
550
	    RenderObject *lastAnChild = child->lastChild();
554
	    RenderObject *lastAnChild = child->lastChild();
551
	    if ( firstAnChild ) {
555
	    if ( firstAnChild ) {
Lines 560-576 Link Here
560
		    child->previousSibling()->setNextSibling( firstAnChild );
564
		    child->previousSibling()->setNextSibling( firstAnChild );
561
		if ( child->nextSibling() )
565
		if ( child->nextSibling() )
562
		    child->nextSibling()->setPreviousSibling( lastAnChild );
566
		    child->nextSibling()->setPreviousSibling( lastAnChild );
567
                if ( child == firstChild() )
568
                    m_first = firstAnChild;
569
                if ( child == lastChild() )
570
                    m_last = lastAnChild;
563
	    } else {
571
	    } else {
564
		if ( child->previousSibling() )
572
		if ( child->previousSibling() )
565
		    child->previousSibling()->setNextSibling( child->nextSibling() );
573
		    child->previousSibling()->setNextSibling( child->nextSibling() );
566
		if ( child->nextSibling() )
574
		if ( child->nextSibling() )
567
		    child->nextSibling()->setPreviousSibling( child->previousSibling() );
575
		    child->nextSibling()->setPreviousSibling( child->previousSibling() );
568
569
	    }
570
	    if ( child == firstChild() )
576
	    if ( child == firstChild() )
571
		m_first = firstAnChild;
577
                    m_first = child->nextSibling();
572
	    if ( child == lastChild() )
578
	    if ( child == lastChild() )
573
		m_last = lastAnChild;
579
                    m_last = child->previousSibling();
580
            }
581
574
	    child->setParent( 0 );
582
	    child->setParent( 0 );
575
	    child->setPreviousSibling( 0 );
583
	    child->setPreviousSibling( 0 );
576
	    child->setNextSibling( 0 );
584
	    child->setNextSibling( 0 );
(-)khtml/rendering/render_object.cpp.orig (-1 / +2 lines)
Lines 178-184 Link Here
178
      m_isRoot( false ),
178
      m_isRoot( false ),
179
      m_afterPageBreak( false ),
179
      m_afterPageBreak( false ),
180
      m_needsPageClear( false ),
180
      m_needsPageClear( false ),
181
      m_containsPageBreak( false )
181
      m_containsPageBreak( false ),
182
      m_doNotDelete(false)
182
{
183
{
183
  assert( node );
184
  assert( node );
184
  if (node->getDocument()->documentElement() == node) setIsRoot(true);
185
  if (node->getDocument()->documentElement() == node) setIsRoot(true);
(-)khtml/rendering/render_object.h.orig (-1 / +6 lines)
Lines 754-759 Link Here
754
    virtual void deleteInlineBoxes(RenderArena* arena=0) {(void)arena;}
754
    virtual void deleteInlineBoxes(RenderArena* arena=0) {(void)arena;}
755
    virtual void detach( );
755
    virtual void detach( );
756
756
757
    void setDoNotDelete(bool b) { m_doNotDelete = b; }
758
    bool doNotDelete() const { return m_doNotDelete; }
759
757
    const QFont &font(bool firstLine) const {
760
    const QFont &font(bool firstLine) const {
758
	return style( firstLine )->font();
761
	return style( firstLine )->font();
759
    }
762
    }
Lines 835-841 Link Here
835
    bool m_needsPageClear            : 1;
838
    bool m_needsPageClear            : 1;
836
    bool m_containsPageBreak         : 1;
839
    bool m_containsPageBreak         : 1;
837
840
838
    // ### we have 16 + 24 bits. Cut 8 and save 32
841
    bool m_doNotDelete               : 1; // This object should not be auto-deleted
842
843
    // ### we have 16 + 27 bits.
839
844
840
845
841
    void arenaDelete(RenderArena *arena, void *objectBase);
846
    void arenaDelete(RenderArena *arena, void *objectBase);

Return to bug 219970