View | Details | Raw Unified
Collapse All | Expand All

(-) khtml/rendering/render_object.h.orig (-7 / +21 lines)
 Lines 79-84    Link Here 
    kdDebug( 6040 ) << this << ": " <<  renderName() << "(RenderObject)::addChild( " << newChild << ": " <<
    kdDebug( 6040 ) << this << ": " <<  renderName() << "(RenderObject)::addChild( " << newChild << ": " <<
        newChild->renderName() << ", " << (beforeChild ? beforeChild->renderName() : "0") << " )" << endl;
        newChild->renderName() << ", " << (beforeChild ? beforeChild->renderName() : "0") << " )" << endl;
#endif
#endif
    // protect ourselves from deletion
    setDoNotDelete(true);
    bool needsTable = false;
    bool needsTable = false;
 Lines 159-164    Link Here 
            static_cast<RenderText*>(newChild)->setText(textToTransform, true);
            static_cast<RenderText*>(newChild)->setText(textToTransform, true);
    }
    }
    newChild->attach();
    newChild->attach();
    
    setDoNotDelete(false);
}
}
RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild)
RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild)
 Lines 545-551    Link Here 
	RenderObject *next = child->nextSibling();
	RenderObject *next = child->nextSibling();
	if ( child->isRenderBlock() && child->isAnonymousBlock() && !child->continuation() &&
	if ( child->isRenderBlock() && child->isAnonymousBlock() && !child->continuation() &&
             !child->childrenInline() && !child->isTableCell() ) {
             !child->childrenInline() && !child->isTableCell() && !child->doNotDelete()) {
	    RenderObject *firstAnChild = child->firstChild();
	    RenderObject *firstAnChild = child->firstChild();
	    RenderObject *lastAnChild = child->lastChild();
	    RenderObject *lastAnChild = child->lastChild();
	    if ( firstAnChild ) {
	    if ( firstAnChild ) {
 Lines 560-576    Link Here 
		    child->previousSibling()->setNextSibling( firstAnChild );
		    child->previousSibling()->setNextSibling( firstAnChild );
		if ( child->nextSibling() )
		if ( child->nextSibling() )
		    child->nextSibling()->setPreviousSibling( lastAnChild );
		    child->nextSibling()->setPreviousSibling( lastAnChild );
                if ( child == firstChild() )
                    m_first = firstAnChild;
                if ( child == lastChild() )
                    m_last = lastAnChild;
	    } else {
	    } else {
		if ( child->previousSibling() )
		if ( child->previousSibling() )
		    child->previousSibling()->setNextSibling( child->nextSibling() );
		    child->previousSibling()->setNextSibling( child->nextSibling() );
		if ( child->nextSibling() )
		if ( child->nextSibling() )
		    child->nextSibling()->setPreviousSibling( child->previousSibling() );
		    child->nextSibling()->setPreviousSibling( child->previousSibling() );
	    }
	    if ( child == firstChild() )
	    if ( child == firstChild() )
		m_first = firstAnChild;
                    m_first = child->nextSibling();
	    if ( child == lastChild() )
	    if ( child == lastChild() )
		m_last = lastAnChild;
                    m_last = child->previousSibling();
            }
	    child->setParent( 0 );
	    child->setParent( 0 );
	    child->setPreviousSibling( 0 );
	    child->setPreviousSibling( 0 );
	    child->setNextSibling( 0 );
	    child->setNextSibling( 0 );
 Lines 178-184    Link Here 
      m_isRoot( false ),
      m_isRoot( false ),
      m_afterPageBreak( false ),
      m_afterPageBreak( false ),
      m_needsPageClear( false ),
      m_needsPageClear( false ),
      m_containsPageBreak( false )
      m_containsPageBreak( false ),
      m_doNotDelete(false)
{
{
  assert( node );
  assert( node );
  if (node->getDocument()->documentElement() == node) setIsRoot(true);
  if (node->getDocument()->documentElement() == node) setIsRoot(true);
 Lines 754-759    Link Here 
    virtual void deleteInlineBoxes(RenderArena* arena=0) {(void)arena;}
    virtual void deleteInlineBoxes(RenderArena* arena=0) {(void)arena;}
    virtual void detach( );
    virtual void detach( );
    void setDoNotDelete(bool b) { m_doNotDelete = b; }
    bool doNotDelete() const { return m_doNotDelete; }
    const QFont &font(bool firstLine) const {
    const QFont &font(bool firstLine) const {
	return style( firstLine )->font();
	return style( firstLine )->font();
    }
    }
 Lines 835-841    Link Here 
    bool m_needsPageClear            : 1;
    bool m_needsPageClear            : 1;
    bool m_containsPageBreak         : 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 + 27 bits.
    void arenaDelete(RenderArena *arena, void *objectBase);
    void arenaDelete(RenderArena *arena, void *objectBase);