Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragme...
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Feb 2005 17:11:26 +0000 (17:11 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Feb 2005 17:11:26 +0000 (17:11 +0000)
commit76c0dbc8d1262e402a8f79e5a1baa8c96751c6b7
tree6a1e5873e56f8526db463faa8a52fff8d6c444f7
parentf6dcb8499c8c52ae9472176263cd935135f0a36b
Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): ref and deref the element while it is "floating"
        (khtml::ReplacementFragment::insertFragmentForTestRendering): ditto
        (khtml::floatRefdElement): new, keeps an element alive while its ref count is 0
        (khtml::createDefaultParagraphElement): removed commented out code
        (khtml::createBlockPlaceholderElement): ref the element and return it as "floating"
        (khtml::createFontElement): ditto
        (khtml::createStyleSpanElement): ditto
        * khtml/editing/htmlediting.h:

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