Skip to content
  • justing's avatar
    LayoutTests: · 867f199a
    justing authored
            Reviewed by darin
    
            Removed unnecessary style spans:
            * editing/deleting/delete-3857753-fix-expected.txt:
            * editing/execCommand/4916541-expected.txt:
            * editing/execCommand/create-list-from-range-selection-expected.txt:
            * editing/execCommand/format-block-expected.txt:
            * editing/execCommand/format-block-from-range-selection-expected.txt:
            * editing/execCommand/format-block-with-braces-expected.txt:
            * editing/execCommand/indent-selection-expected.txt:
            * editing/execCommand/remove-list-from-range-selection-expected.txt:
            * editing/execCommand/remove-list-items-expected.txt:
            * editing/execCommand/switch-list-type-expected.txt:
            * editing/pasteboard/4861080-expected.txt:
            * editing/pasteboard/display-block-on-spans-expected.txt:
            * editing/pasteboard/drag-drop-modifies-page-expected.txt:
            * editing/pasteboard/paste-table-002-expected.txt:
            * editing/pasteboard/paste-text-001-expected.txt:
            * editing/pasteboard/paste-text-at-tabspan-001-expected.txt:
            * editing/pasteboard/paste-text-at-tabspan-002-expected.txt:
            * editing/pasteboard/paste-text-at-tabspan-003-expected.txt:
            * editing/style/smoosh-styles-001-expected.txt:
            * editing/style/smoosh-styles-002-expected.txt:
    
    WebCore:
    
            Reviewed by darin
            
            ~3x speedup pasting 5k lines of rich text:
            http://shakespeare.mit.edu/hamlet/full.html
            ~2x speedup pasting 10k lines of plain text
            
            * css/CSSComputedStyleDeclaration.cpp:
            (WebCore::computedStyle): Added for convenience.
            * css/CSSComputedStyleDeclaration.h:
            * editing/ReplaceSelectionCommand.cpp:
            (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
            The code that pushed down the top level style span had
            a bug in it that made it do unnecessary work.  Instead of
            fixing the bug I removed the code because it was used to 
            help see more redundancies in second level style spans, but 
            createMarkup now *only* creates a top level style span.
            Only remove redundant styles from style spans and only remove
            unstyled elements if they are style spans.  FF doesn't
            remove redundant styles from elements, or remove redundant 
            font tags on copy/paste.  We could offer this functionality 
            through a separate "cleanup" command.
            * editing/markup.cpp:
            (WebCore::createMarkup): Only add markup for ancestors of 
            lastClosed if we're including markup for acommonAncestorBlock 
            (we do this for commonAncestorBlocks like tables and lists),
            otherwise it's unnecessary/redundant.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    867f199a