Reviewed by John
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Nov 2004 16:48:52 +0000 (16:48 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Nov 2004 16:48:52 +0000 (16:48 +0000)
commitbee20018d7153e4ec80640c32d4895c765ec6ab2
tree868975180d7d5c8f1b6e53fd5f4c784da31987e0
parent6b5368f492e28aed9a8917a9cf3814eb808f9501
    Reviewed by John

        It is unwise to use the QPtrList autodelete feature on shared objects like DOM nodes.
        Instead, I replaced this with a helper function that derefs DOM nodes stored in a
        QPtrList when the list goes out of scope.

        * khtml/editing/htmlediting.cpp:
        (khtml::derefNodesInList): New helper to deref DOM nodes stored in a QPtrList.
        (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): No longer set lists to autodelete.
        (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Call new derefNodesInList helper.
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand):
        No longer set lists to autodelete.
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::~InsertParagraphSeparatorInQuotedContentCommand):
         Call new derefNodesInList helper.
        * khtml/editing/htmlediting.h: Add virtual destructor for InsertParagraphSeparatorCommand. It had no need
        of one before, but now it does.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp
WebCore/khtml/editing/htmlediting.h