Skip to content
  • justing's avatar
    LayoutTests: · 4ac2b9a3
    justing authored
            Reviewed by darin
            
            <rdar://problem/5046875> 
            Gmail Editor: Applying alignment to selected text in message also applies alignment to signature
    
            Added:
            * editing/style/5046875-1-expected.checksum: Added.
            * editing/style/5046875-1-expected.png: Added.
            * editing/style/5046875-1-expected.txt: Added.
            * editing/style/5046875-1.html: Added.
            * editing/style/5046875-2-expected.checksum: Added.
            * editing/style/5046875-2-expected.png: Added.
            * editing/style/5046875-2-expected.txt: Added.
            * editing/style/5046875-2.html: Added.
            moveParagraphs doesn't move unnecessary brs:
            * editing/style/create-block-for-style-002-expected.txt:
            * editing/style/create-block-for-style-004-expected.txt:
            * editing/style/create-block-for-style-001-expected.txt:
            * editing/style/create-block-for-style-009-expected.txt:
            * editing/style/create-block-for-style-010-expected.txt:
            moveParagraphs clears out unrendered text during the move:
            * editing/style/create-block-for-style-011-expected.txt:
            * editing/style/create-block-for-style-007-expected.txt:
            * editing/style/create-block-for-style-012-expected.txt:
    
    WebCore:
    
            Reviewed by darin
            
            <rdar://problem/5046875> 
            Gmail Editor: Applying alignment to selected text in message also applies alignment to signature
    
            * editing/ApplyStyleCommand.cpp:
            (WebCore::ApplyStyleCommand::doApply): Don't call applyBlockStyle unless
            there is a block style to apply.
            (WebCore::ApplyStyleCommand::applyBlockStyle): Don't do the remove step.
            It was unnecessary and removed properties from blocks that could contain 
            content outside the range being operated on (added a testcase).
            (WebCore::ApplyStyleCommand::addBlockStyleIfNeeded): Used an early return
            instead of if-nesting.
            * editing/ApplyStyleCommand.h:
            * editing/CompositeEditCommand.cpp:
            (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
            Return the new block, if one was created.  Use moveParagraphs to move
            paragraphs into the new block, instead of moving nodes.  The old code moved
            too much (added a testcase).
            * editing/CompositeEditCommand.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4ac2b9a3