| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // See the bug 33668 and editing/execCommand/insert-list-orphaned-it
em-with-nested-lists.html. | 227 // See the bug 33668 and editing/execCommand/insert-list-orphaned-it
em-with-nested-lists.html. |
| 228 // FIXME: This might be a bug in moveParagraphWithClones or deleteSe
lection. | 228 // FIXME: This might be a bug in moveParagraphWithClones or deleteSe
lection. |
| 229 if (listNode && listNode->inDocument()) | 229 if (listNode && listNode->inDocument()) |
| 230 removeNode(listNode); | 230 removeNode(listNode); |
| 231 | 231 |
| 232 newList = mergeWithNeighboringLists(newList); | 232 newList = mergeWithNeighboringLists(newList); |
| 233 | 233 |
| 234 // Restore the start and the end of current selection if they starte
d inside listNode | 234 // Restore the start and the end of current selection if they starte
d inside listNode |
| 235 // because moveParagraphWithClones could have removed them. | 235 // because moveParagraphWithClones could have removed them. |
| 236 if (rangeStartIsInList && newList) | 236 if (rangeStartIsInList && newList) |
| 237 currentSelection->setStart(newList, 0, IGNORE_EXCEPTION_STATE); | 237 currentSelection->setStart(newList, 0, IGNORE_EXCEPTION); |
| 238 if (rangeEndIsInList && newList) | 238 if (rangeEndIsInList && newList) |
| 239 currentSelection->setEnd(newList, lastOffsetInNode(newList.get()
), IGNORE_EXCEPTION_STATE); | 239 currentSelection->setEnd(newList, lastOffsetInNode(newList.get()
), IGNORE_EXCEPTION); |
| 240 | 240 |
| 241 setEndingSelection(VisiblePosition(firstPositionInNode(newList.get()
))); | 241 setEndingSelection(VisiblePosition(firstPositionInNode(newList.get()
))); |
| 242 | 242 |
| 243 return; | 243 return; |
| 244 } | 244 } |
| 245 | 245 |
| 246 unlistifyParagraph(endingSelection().visibleStart(), listNode.get(), lis
tChildNode); | 246 unlistifyParagraph(endingSelection().visibleStart(), listNode.get(), lis
tChildNode); |
| 247 } | 247 } |
| 248 | 248 |
| 249 if (!listChildNode || switchListType || forceCreateList) | 249 if (!listChildNode || switchListType || forceCreateList) |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 if (listElement) | 389 if (listElement) |
| 390 return mergeWithNeighboringLists(listElement); | 390 return mergeWithNeighboringLists(listElement); |
| 391 | 391 |
| 392 if (canMergeLists(previousList, nextList)) | 392 if (canMergeLists(previousList, nextList)) |
| 393 mergeIdenticalElements(previousList, nextList); | 393 mergeIdenticalElements(previousList, nextList); |
| 394 | 394 |
| 395 return listElement; | 395 return listElement; |
| 396 } | 396 } |
| 397 | 397 |
| 398 } | 398 } |
| OLD | NEW |