Skip to content
  • harrison's avatar
    Reviewed by Justin. · 99e6fb4d
    harrison authored
            <rdar://problem/4359736> Support outlining ability with lists
    
            Added Mail SPI for list level changes.  It is SPI because it is not complete support
            for outlining.  See <rdar://problem/4457070> "API for html lists as note outlines".
            Additional support is to end a list when return is typed on empty list item.
    
            * WebCore.vcproj/WebCore/WebCore.vcproj:
            * WebCore.xcodeproj/project.pbxproj:
            Added ModifySelectionListLevelCommand.cpp and ModifySelectionListLevelCommand.h
            
            * bridge/mac/WebCoreFrameBridge.h:
            * bridge/mac/WebCoreFrameBridge.mm:
            (-[WebCoreFrameBridge canIncreaseSelectionListLevel]):
            (-[WebCoreFrameBridge canDecreaseSelectionListLevel]):
            (-[WebCoreFrameBridge increaseSelectionListLevel]):
            (-[WebCoreFrameBridge decreaseSelectionListLevel]):
            Supply list level calls in the bridge.
            
            * editing/InsertParagraphSeparatorCommand.cpp:
            (WebCore::createListItemElement):
            New.  Creates an li.
            
            (WebCore::InsertParagraphSeparatorCommand::doApply):
            - slight logic cleanup
            - on empty list item, end the list
            
            * editing/ModifySelectionListLevelCommand.cpp: Added.
            (WebCore::ModifySelectionListLevelCommand::ModifySelectionListLevelCommand):
            (WebCore::ModifySelectionListLevelCommand::preservesTypingStyle):
            (WebCore::ModifySelectionListLevelCommand::doApply):
            (WebCore::ModifySelectionListLevelCommand::canIncreaseSelectionListLevel):
            (WebCore::ModifySelectionListLevelCommand::canDecreaseSelectionListLevel):
            (WebCore::ModifySelectionListLevelCommand::increaseSelectionListLevel):
            (WebCore::ModifySelectionListLevelCommand::decreaseSelectionListLevel):
            (WebCore::modifySelectionListLevel):
            (WebCore::getStartEndListChildren):
            (WebCore::canIncreaseListLevel):
            (WebCore::canDecreaseListLevel):
            (WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeBefore):
            (WebCore::ModifySelectionListLevelCommand::insertSiblingNodeRangeAfter):
            (WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange):
            (WebCore::ModifySelectionListLevelCommand::increaseListLevel):
            (WebCore::ModifySelectionListLevelCommand::decreaseListLevel):
            * editing/ModifySelectionListLevelCommand.h: Added.
            New editing command for adjusting the list level.
            
            * editing/ReplaceSelectionCommand.cpp:
            (WebCore::ReplaceSelectionCommand::doApply):
            Slight logic cleanup
    
            * editing/htmlediting.cpp:
            (WebCore::isListElement):
            (WebCore::enclosingListChild):
            New helpers.
            
            (WebCore::isTableElement):
            Allow caller to pass 0... return false in that case.
            
            * editing/htmlediting.h:
            New helpers.
            
            * rendering/RenderContainer.cpp:
            (WebCore::updateListMarkerNumbers):
            Allow for list children that are not li nodes.  Ignore and continue rather than stopping.
            
            (WebCore::RenderContainer::addChild):
            Allow for nil beforeChild, meaning "add at end".
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    99e6fb4d