| 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 bool mergeBlocksAfterDelete, | 644 bool mergeBlocksAfterDelete, |
| 645 bool expandForSpecialElements, | 645 bool expandForSpecialElements, |
| 646 bool sanitizeMarkup) { | 646 bool sanitizeMarkup) { |
| 647 if (endingSelection().isRange()) | 647 if (endingSelection().isRange()) |
| 648 applyCommandToComposite(DeleteSelectionCommand::create( | 648 applyCommandToComposite(DeleteSelectionCommand::create( |
| 649 document(), smartDelete, mergeBlocksAfterDelete, | 649 document(), smartDelete, mergeBlocksAfterDelete, |
| 650 expandForSpecialElements, sanitizeMarkup), | 650 expandForSpecialElements, sanitizeMarkup), |
| 651 editingState); | 651 editingState); |
| 652 } | 652 } |
| 653 | 653 |
| 654 void CompositeEditCommand::deleteSelection(const VisibleSelection& selection, | |
| 655 EditingState* editingState, | |
| 656 bool smartDelete, | |
| 657 bool mergeBlocksAfterDelete, | |
| 658 bool expandForSpecialElements, | |
| 659 bool sanitizeMarkup) { | |
| 660 if (selection.isRange()) | |
| 661 applyCommandToComposite(DeleteSelectionCommand::create( | |
| 662 selection, smartDelete, mergeBlocksAfterDelete, | |
| 663 expandForSpecialElements, sanitizeMarkup), | |
| 664 editingState); | |
| 665 } | |
| 666 | |
| 667 void CompositeEditCommand::removeCSSProperty(Element* element, | 654 void CompositeEditCommand::removeCSSProperty(Element* element, |
| 668 CSSPropertyID property) { | 655 CSSPropertyID property) { |
| 669 // RemoveCSSPropertyCommand is never aborted. | 656 // RemoveCSSPropertyCommand is never aborted. |
| 670 applyCommandToComposite( | 657 applyCommandToComposite( |
| 671 RemoveCSSPropertyCommand::create(document(), element, property), | 658 RemoveCSSPropertyCommand::create(document(), element, property), |
| 672 ASSERT_NO_EDITING_ABORT); | 659 ASSERT_NO_EDITING_ABORT); |
| 673 } | 660 } |
| 674 | 661 |
| 675 void CompositeEditCommand::removeElementAttribute( | 662 void CompositeEditCommand::removeElementAttribute( |
| 676 Element* element, | 663 Element* element, |
| (...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1974 | 1961 |
| 1975 DEFINE_TRACE(CompositeEditCommand) { | 1962 DEFINE_TRACE(CompositeEditCommand) { |
| 1976 visitor->trace(m_commands); | 1963 visitor->trace(m_commands); |
| 1977 visitor->trace(m_startingSelection); | 1964 visitor->trace(m_startingSelection); |
| 1978 visitor->trace(m_endingSelection); | 1965 visitor->trace(m_endingSelection); |
| 1979 visitor->trace(m_undoStep); | 1966 visitor->trace(m_undoStep); |
| 1980 EditCommand::trace(visitor); | 1967 EditCommand::trace(visitor); |
| 1981 } | 1968 } |
| 1982 | 1969 |
| 1983 } // namespace blink | 1970 } // namespace blink |
| OLD | NEW |