| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008 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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 styleInEmptyParagraph->mergeTypingStyle(&document()); | 1479 styleInEmptyParagraph->mergeTypingStyle(&document()); |
| 1480 // The moved paragraph should assume the block style of the destination. | 1480 // The moved paragraph should assume the block style of the destination. |
| 1481 styleInEmptyParagraph->removeBlockProperties(); | 1481 styleInEmptyParagraph->removeBlockProperties(); |
| 1482 } | 1482 } |
| 1483 | 1483 |
| 1484 // FIXME (5098931): We should add a new insert action | 1484 // FIXME (5098931): We should add a new insert action |
| 1485 // "WebViewInsertActionMoved" and call shouldInsertFragment here. | 1485 // "WebViewInsertActionMoved" and call shouldInsertFragment here. |
| 1486 | 1486 |
| 1487 DCHECK(!document().needsLayoutTreeUpdate()); | 1487 DCHECK(!document().needsLayoutTreeUpdate()); |
| 1488 | 1488 |
| 1489 setEndingSelection( | 1489 const SelectionInDOMTree& selectionToDelete = |
| 1490 SelectionInDOMTree::Builder().collapse(start).extend(end).build()); | 1490 SelectionInDOMTree::Builder().collapse(start).extend(end).build(); |
| 1491 setEndingSelection(selectionToDelete); |
| 1491 document().frame()->spellChecker().clearMisspellingsForMovingParagraphs( | 1492 document().frame()->spellChecker().clearMisspellingsForMovingParagraphs( |
| 1492 endingSelection()); | 1493 selectionToDelete); |
| 1493 deleteSelection(editingState, false, false, false); | 1494 deleteSelection(editingState, false, false, false); |
| 1494 if (editingState->isAborted()) | 1495 if (editingState->isAborted()) |
| 1495 return; | 1496 return; |
| 1496 | 1497 |
| 1497 DCHECK(destination.deepEquivalent().isConnected()) << destination; | 1498 DCHECK(destination.deepEquivalent().isConnected()) << destination; |
| 1498 cleanupAfterDeletion(editingState, destination); | 1499 cleanupAfterDeletion(editingState, destination); |
| 1499 if (editingState->isAborted()) | 1500 if (editingState->isAborted()) |
| 1500 return; | 1501 return; |
| 1501 DCHECK(destination.deepEquivalent().isConnected()) << destination; | 1502 DCHECK(destination.deepEquivalent().isConnected()) << destination; |
| 1502 | 1503 |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1961 | 1962 |
| 1962 DEFINE_TRACE(CompositeEditCommand) { | 1963 DEFINE_TRACE(CompositeEditCommand) { |
| 1963 visitor->trace(m_commands); | 1964 visitor->trace(m_commands); |
| 1964 visitor->trace(m_startingSelection); | 1965 visitor->trace(m_startingSelection); |
| 1965 visitor->trace(m_endingSelection); | 1966 visitor->trace(m_endingSelection); |
| 1966 visitor->trace(m_undoStep); | 1967 visitor->trace(m_undoStep); |
| 1967 EditCommand::trace(visitor); | 1968 EditCommand::trace(visitor); |
| 1968 } | 1969 } |
| 1969 | 1970 |
| 1970 } // namespace blink | 1971 } // namespace blink |
| OLD | NEW |