-
justing authored
Reviewed by darin <rdar://problem/5026848> Can cut/delete To Do subunits This tests to make sure that non-editable content that is in both the start and end editable roots is removed: * editing/deleting/5026848-1-expected.checksum: Added. * editing/deleting/5026848-1-expected.png: Added. * editing/deleting/5026848-1-expected.txt: Added. * editing/deleting/5026848-1.html: Added. This tests to make sure that non-editable content that is not in both the start and end editable roots is not removed: * editing/deleting/5026848-2-expected.checksum: Added. * editing/deleting/5026848-2-expected.png: Added. * editing/deleting/5026848-2-expected.txt: Added. * editing/deleting/5026848-2.html: Added. This tests to make sure that editable regions that are not in both the start and end editable roots are cleared (not removed, unless they are in another editable region): * editing/deleting/5026848-3-expected.checksum: Added. * editing/deleting/5026848-3-expected.png: Added. * editing/deleting/5026848-3-expected.txt: Added. * editing/deleting/5026848-3.html: Added. WebCore: Reviewed by darin <rdar://problem/5026848> Can cut/delete ToDo subunits We were removing non-editable content during a delete. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::initializePositionData): Set m_startRoot and m_endRoot. (WebCore::DeleteSelectionCommand::removeNode): If a node is not inside both the start and end roots, remove it only if it is in editable content. * editing/DeleteSelectionCommand.h: Added m_startRoot and m_endRoot, the editable roots that contain the start and end of the selection, respectively. We consult these every time we remove a node, and don't want to recompute them on every call to removeNode(). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
06a653c7