Skip to content
  • justing's avatar
    LayoutTests: · 5e10a81c
    justing authored
            Reviewed by john
    
            Removed an unnecessary block (one that was fully
            selected but whose markup wasn't needed to preserve
            appearance):
            * editing/pasteboard/paste-text-011-expected.txt:
            Removed unnecessary style spans:
            * editing/pasteboard/merge-end-blockquote-expected.txt:
            Removed unnecessary empty anonymous blocks:
            * editing/execCommand/create-list-with-hr-expected.txt:
            * editing/pasteboard/display-block-on-spans-expected.txt:
            * editing/pasteboard/paste-text-006-expected.txt:
            * editing/pasteboard/paste-table-001-expected.txt:
            * editing/pasteboard/paste-text-013-expected.txt:
            * editing/pasteboard/paste-text-002-expected.txt:
            * editing/pasteboard/paste-list-001-expected.txt:
            * editing/pasteboard/paste-text-005-expected.txt:
            * editing/pasteboard/paste-text-003-expected.txt:
            * editing/pasteboard/paste-text-014-expected.txt:
            * editing/pasteboard/paste-pre-001-expected.txt:
            Now (correctly) includes fully selected root:
            * editing/pasteboard/paste-text-015-expected.checksum:
            * editing/pasteboard/paste-text-015-expected.png:
            * editing/pasteboard/paste-text-015-expected.txt:
            * editing/inserting/insert-3907422-fix-expected.txt:
            * editing/pasteboard/paste-text-004-expected.txt:
            Demonstrates a bug that already existed (we don't inline 
            the font styles from the Preference Pane on copy):
            * editing/pasteboard/5027857-expected.checksum:
            * editing/pasteboard/5027857-expected.png:
            * editing/pasteboard/5027857-expected.txt:
            * editing/pasteboard/paste-pre-002-expected.checksum:
            * editing/pasteboard/paste-pre-002-expected.png:
            * editing/pasteboard/paste-pre-002-expected.txt:
    
    WebCore:
    
            Reviewed by john
            
            ~2x speed up of 5k rich text paste:
            http://shakespeare.mit.edu/hamlet/full.html        
    
            * editing/ReplaceSelectionCommand.cpp:
            (WebCore::ReplaceSelectionCommand::doApply): Remove the top 
            level style span if its unnecessary before inserting
            into the document, its faster than doing it after.
            * editing/ReplaceSelectionCommand.h: Exposed 
            ReplacementFragment::removeNodePreservingChildren so that
            the style span can be removed using non-undoable removes,
            like the rest of the removes done on the ReplacementFragment.
            * editing/markup.cpp:
            (WebCore::createMarkup): Make the style span the top level
            element, otherwise it's useless.  This also facilitates the
            optimization mentioned above.
            When including markup for a fully selected root, include markup
            for all the nodes beneath that fully selected root, to preserve 
            the structure and appearance of the copied markup.  Did this
            by merging with the code for adding markup for descendants of
            special commonAncestorBlocks.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    5e10a81c