• justin.garcia@apple.com's avatar
    WebCore: · a2300356
    justin.garcia@apple.com authored
    2009-04-15  Justin Garcia  <justin.garcia@apple.com>
    
            Reviewed by Dan Bernstein.
    
            https://bugs.webkit.org/show_bug.cgi?id=25204
            Create a fast path for ReplaceSelectionCommand that merges text nodes
            
            During simple pastes, where we're just pasting a text node into a run of text, we would split the current
            text and insert the new node in between.  This is slow and we hit this bug:
    
            https://bugs.webkit.org/show_bug.cgi?id=6148
    
            in the layout and rendering code where adjacent text nodes don't shape correctly in Arabic.
            
            This change creates a fast path for ReplaceSelectionCommand that inserts text directly into the
            text node that holds the selection (very similar to the fast path we wrote for InsertTextCommand).
    
            * editing/ReplaceSelectionCommand.cpp:
            (WebCore::ReplaceSelectionCommand::doApply):
            (WebCore::ReplaceSelectionCommand::performTrivialReplace):
            * editing/ReplaceSelectionCommand.h:
            * editing/TextIterator.cpp:
    
    LayoutTests:
    
    2009-04-15  Justin Garcia  <justin.garcia@apple.com>
    
            Reviewed by Dan Bernstein.
            
            https://bugs.webkit.org/show_bug.cgi?id=25204
            Create a fast path for ReplaceSelectionCommand that merges text nodes
            
            Simplified DOM/Render trees:
            * editing/pasteboard/4840662-expected.txt:
            * platform/mac/editing/pasteboard/bad-placeholder-expected.txt:
            * platform/mac/editing/pasteboard/paste-match-style-001-expected.txt:
            * platform/mac/editing/pasteboard/paste-text-019-expected.txt:
            * platform/mac/editing/pasteboard/paste-xml-expected.txt:
    
            Removed redundant styles that were generated during nesting prevention that is no longer needed:
            * platform/mac/editing/pasteboard/4076267-2-expected.txt:
            * platform/mac/editing/pasteboard/5156401-1-expected.txt:
            
            No longer incorrectly uncollapsing unrendered whitespace:
            * editing/pasteboard/paste-into-anchor-text-expected.txt:
            * platform/mac/editing/pasteboard/5387578-expected.txt:
            
            No longer invalidating the old selected DOM range during a paste:
            * editing/pasteboard/copy-in-password-field-expected.txt:
    
    
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@42549 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    a2300356
ChangeLog 3.09 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.