Skip to content
  • justing's avatar
    LayoutTests: · 217ded8c
    justing authored
            Reviewed by darin
    
            <http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
            REGRESSION: Line disappears when deleting
    
            Added:
            * editing/deleting/merge-different-styles-expected.checksum: Added.
            * editing/deleting/merge-different-styles-expected.png: Added.
            * editing/deleting/merge-different-styles-expected.txt: Added.
            * editing/deleting/merge-different-styles.html: Added.
            * editing/deleting/merge-no-br-expected.checksum: Added.
            * editing/deleting/merge-no-br-expected.png: Added.
            * editing/deleting/merge-no-br-expected.txt: Added.
            * editing/deleting/merge-no-br.html: Added.
            * editing/deleting/merge-whitespace-pre-expected.checksum: Added.
            * editing/deleting/merge-whitespace-pre-expected.png: Added.
            * editing/deleting/merge-whitespace-pre-expected.txt: Added.
            * editing/deleting/merge-whitespace-pre.html: Added.
    
            Fixes (not enough style on nodes for the fixes to be reflected in pixel results):
            * editing/deleting/delete-block-merge-contents-005-expected.txt:
            * editing/deleting/delete-block-merge-contents-006-expected.txt:
            * editing/deleting/delete-block-merge-contents-008-expected.txt:
    
            Equivalent render trees:
            * editing/deleting/delete-3857753-fix-expected.txt:
            * editing/inserting/insert-div-026-expected.txt:
            
            Forgot to checkin these new expected results after fixing the DRT bug:
            * fast/lists/drag-into-marker-expected.checksum:
            * fast/lists/drag-into-marker-expected.png:
            * fast/lists/drag-into-marker-expected.txt:
    
    WebCore:
    
            Reviewed by darin
            
            <http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
            REGRESSION: Line disappears when deleting
            
            Rewrote moveNodesAfterNode to address these problems:
            It moved nodes without preserving their style. 
            It traversed over siblings looking for a br to know when
            to stop merging.  If the br was burried inside a span, it 
            wouldn't find it.  If the text is whitespace:pre, it wouldn't
            stop.
            In theory it would crash if the "enclosingInlineElements" of the start of the
            selection to delete and the end of the selection to delete were the
            same.  We think that this will fix these:
            <rdar://problems/3950559&4498113>
            CrashTracer: 2116 crashes in Mail at com.apple.WebCore: khtml::CompositeEditCommand::insertNodeAfter + 32
            CrashTracer: 1569 crashes in Mail at com.apple.WebCore: khtml::DeleteSelectionCommand::moveNodesAfterNode + 340
            But we haven't been able to construct a reproducible case.
            
            * editing/CompositeEditCommand.cpp:
            (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Moved from ReplaceSelectionCommand.
            (WebCore::CompositeEditCommand::prune): Ditto.
            * editing/CompositeEditCommand.h:
            * editing/DeleteSelectionCommand.cpp:
            (WebCore::DeleteSelectionCommand::mergeParagraphs):
            (WebCore::DeleteSelectionCommand::doApply):
            * editing/DeleteSelectionCommand.h:
            * editing/ReplaceSelectionCommand.cpp:
            (WebCore::ReplaceSelectionCommand::doApply):
            * editing/ReplaceSelectionCommand.h:
            (WebCore::):
            * editing/markup.cpp:
            (WebCore::createMarkup): 
            Was crashing when passed a collapsed range.  I early return an empty string instead.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    217ded8c