| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007 Apple, Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 if (EditCommandComposition* composition = compositionIfPossible(command)
) { | 84 if (EditCommandComposition* composition = compositionIfPossible(command)
) { |
| 85 DCHECK(command->isTopLevelCommand()); | 85 DCHECK(command->isTopLevelCommand()); |
| 86 composition->setEndingSelection(selection); | 86 composition->setEndingSelection(selection); |
| 87 } | 87 } |
| 88 command->m_endingSelection = selection; | 88 command->m_endingSelection = selection; |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 | 91 |
| 92 void EditCommand::setEndingSelection(const VisiblePosition& position) | 92 void EditCommand::setEndingSelection(const VisiblePosition& position) |
| 93 { | 93 { |
| 94 setEndingSelection(VisibleSelection(position)); | 94 setEndingSelection(createVisibleSelectionDeprecated(position)); |
| 95 } | 95 } |
| 96 | 96 |
| 97 bool EditCommand::isRenderedCharacter(const Position& position) | 97 bool EditCommand::isRenderedCharacter(const Position& position) |
| 98 { | 98 { |
| 99 if (position.isNull()) | 99 if (position.isNull()) |
| 100 return false; | 100 return false; |
| 101 DCHECK(position.isOffsetInAnchor()) << position; | 101 DCHECK(position.isOffsetInAnchor()) << position; |
| 102 if (!position.anchorNode()->isTextNode()) | 102 if (!position.anchorNode()->isTextNode()) |
| 103 return false; | 103 return false; |
| 104 | 104 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 128 | 128 |
| 129 DEFINE_TRACE(EditCommand) | 129 DEFINE_TRACE(EditCommand) |
| 130 { | 130 { |
| 131 visitor->trace(m_document); | 131 visitor->trace(m_document); |
| 132 visitor->trace(m_startingSelection); | 132 visitor->trace(m_startingSelection); |
| 133 visitor->trace(m_endingSelection); | 133 visitor->trace(m_endingSelection); |
| 134 visitor->trace(m_parent); | 134 visitor->trace(m_parent); |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace blink | 137 } // namespace blink |
| OLD | NEW |