Skip to content
  • justing's avatar
    LayoutTests: · ac637289
    justing authored
            Reviewed by oliver
            
            <rdar://problem/5156401> 
            Crash when dragging text into a link inside a table cell
    
            Test for the crash:
            * editing/pasteboard/5156401-1-expected.checksum: Added.
            * editing/pasteboard/5156401-1-expected.png: Added.
            * editing/pasteboard/5156401-1-expected.txt: Added.
            * editing/pasteboard/5156401-1.html: Added.
            
            Test inserting at the end of a link where we would previously
            insert in the wrong paragraph:
            * editing/inserting/5156401-2-expected.checksum: Added.
            * editing/inserting/5156401-2-expected.png: Added.
            * editing/inserting/5156401-2-expected.txt: Added.
            * editing/inserting/5156401-2.html: Added.
    
    WebCore:
    
            Reviewed by oliver
            
            <rdar://problem/5156401> 
            Crash when dragging text into a link inside a table cell
    
            * editing/CompositeEditCommand.cpp:
            (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
            Don't avoid the anchor if doing so would skip over a line break, that
            would put content in the wrong paragraph, which can throw ReplaceSelectionCommand,
            which relies on moveParagraphs into infinite recursion.
            Renamed the input position.
            Don't need to re-fetch the enclosing anchor when preparing to push it down,
            since it hasn't changed since the top of the function.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ac637289