-
harrison authored
Reviewed by Darin. <rdar://problem/5160627> Export JS list creation support as ObjC SPI for Mail * WebCore.exp: * editing/Editor.h: * editing/Editor.cpp: (WebCore::Editor::insertOrderedList): (WebCore::Editor::insertUnorderedList): (WebCore::Editor::canIncreaseSelectionListLevel): (WebCore::Editor::canDecreaseSelectionListLevel): (WebCore::Editor::increaseSelectionListLevel): (WebCore::Editor::increaseSelectionListLevelOrdered): (WebCore::Editor::increaseSelectionListLevelUnordered): (WebCore::Editor::decreaseSelectionListLevel): Add insertOrderedList() and insertUnorderedList(). Move existing list management functions from WebCoreFrameBridge. The level increasing functions now return a PassRefPtr<Node> instead of Node. Add check for canEditRichly. - in many other functions, condense the check for nil client(). * editing/InsertListCommand.h: * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::insertList): (WebCore::InsertListCommand::fixOrphanedListChild): (WebCore::InsertListCommand::doApply): Add insertList(), which returns the new list element. Don't set the list element's ID if the specified ID was an empty string. * editing/ModifySelectionListLevel.h: * editing/ModifySelectionListLevel.cpp: (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelWithType): (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel): (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered): (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered): Return PassRefPtr<Node> instead of Node. * page/mac/WebCoreFrameBridge.h: * page/mac/WebCoreFrameBridge.mm: Move list management functions to Editor.h and Editor.cpp. WebKit: Reviewed by Darin. <rdar://problem/5160627> Export JS list creation support as ObjC SPI for Mail * WebKit.xcodeproj/project.pbxproj: * WebView/WebHTMLView.mm: (-[WebHTMLView _selectedRange]): (-[WebHTMLView _shouldDeleteRange:]): (-[WebHTMLView _canEdit]): (-[WebHTMLView _canEditRichly]): (-[WebHTMLView _hasSelection]): (-[WebHTMLView _hasSelectionOrInsertionPoint]): (-[WebHTMLView _hasInsertionPoint]): (-[WebHTMLView _isEditable]): Condense the check for nil [self frame]. Remove canEditRichly checks and rely on the editor to do the check instead. (-[WebHTMLView _insertOrderedList]): (-[WebHTMLView _insertUnorderedList]): New. (-[WebHTMLView _canIncreaseSelectionListLevel]): (-[WebHTMLView _canDecreaseSelectionListLevel]): (-[WebHTMLView _increaseSelectionListLevel]): (-[WebHTMLView _increaseSelectionListLevelOrdered]): (-[WebHTMLView _increaseSelectionListLevelUnordered]): (-[WebHTMLView _decreaseSelectionListLevel]): Moved from bridge to frame editor. * WebView/WebHTMLViewPrivate.h: Add _insertOrderedList and _insertUnorderedList to WebHTMLView(WebPrivate) git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
218a3991