| 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 if (editingState->isAborted()) | 425 if (editingState->isAborted()) |
| 426 return; | 426 return; |
| 427 } | 427 } |
| 428 } | 428 } |
| 429 | 429 |
| 430 void CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren( | 430 void CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren( |
| 431 Position& position, | 431 Position& position, |
| 432 Node& node) { | 432 Node& node) { |
| 433 int offset = | 433 int offset = |
| 434 position.isOffsetInAnchor() ? position.offsetInContainerNode() : 0; | 434 position.isOffsetInAnchor() ? position.offsetInContainerNode() : 0; |
| 435 updatePositionForNodeRemoval(position, node); | 435 position = computePositionForNodeRemoval(position, node); |
| 436 if (offset == 0) | 436 if (offset == 0) |
| 437 return; | 437 return; |
| 438 position = Position(position.computeContainerNode(), offset); | 438 position = Position(position.computeContainerNode(), offset); |
| 439 } | 439 } |
| 440 | 440 |
| 441 HTMLSpanElement* | 441 HTMLSpanElement* |
| 442 CompositeEditCommand::replaceElementWithSpanPreservingChildrenAndAttributes( | 442 CompositeEditCommand::replaceElementWithSpanPreservingChildrenAndAttributes( |
| 443 HTMLElement* node) { | 443 HTMLElement* node) { |
| 444 // It would also be possible to implement all of ReplaceNodeWithSpanCommand | 444 // It would also be possible to implement all of ReplaceNodeWithSpanCommand |
| 445 // as a series of existing smaller edit commands. Someone who wanted to | 445 // as a series of existing smaller edit commands. Someone who wanted to |
| (...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1974 | 1974 |
| 1975 DEFINE_TRACE(CompositeEditCommand) { | 1975 DEFINE_TRACE(CompositeEditCommand) { |
| 1976 visitor->trace(m_commands); | 1976 visitor->trace(m_commands); |
| 1977 visitor->trace(m_startingSelection); | 1977 visitor->trace(m_startingSelection); |
| 1978 visitor->trace(m_endingSelection); | 1978 visitor->trace(m_endingSelection); |
| 1979 visitor->trace(m_undoStep); | 1979 visitor->trace(m_undoStep); |
| 1980 EditCommand::trace(visitor); | 1980 EditCommand::trace(visitor); |
| 1981 } | 1981 } |
| 1982 | 1982 |
| 1983 } // namespace blink | 1983 } // namespace blink |
| OLD | NEW |