| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 for (EditCommand* command = this; command; command = command->m_parent) { | 75 for (EditCommand* command = this; command; command = command->m_parent) { |
| 76 if (EditCommandComposition* composition = compositionIfPossible(command)) { | 76 if (EditCommandComposition* composition = compositionIfPossible(command)) { |
| 77 DCHECK(command->isTopLevelCommand()); | 77 DCHECK(command->isTopLevelCommand()); |
| 78 composition->setEndingSelection(selection); | 78 composition->setEndingSelection(selection); |
| 79 } | 79 } |
| 80 command->m_endingSelection = selection; | 80 command->m_endingSelection = selection; |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 void EditCommand::setEndingSelection(const VisiblePosition& position) { | 84 void EditCommand::setEndingSelection(const VisiblePosition& position) { |
| 85 setEndingSelection(createVisibleSelectionDeprecated(position)); | 85 setEndingSelection(createVisibleSelection(position)); |
| 86 } | 86 } |
| 87 | 87 |
| 88 bool EditCommand::isRenderedCharacter(const Position& position) { | 88 bool EditCommand::isRenderedCharacter(const Position& position) { |
| 89 if (position.isNull()) | 89 if (position.isNull()) |
| 90 return false; | 90 return false; |
| 91 DCHECK(position.isOffsetInAnchor()) << position; | 91 DCHECK(position.isOffsetInAnchor()) << position; |
| 92 if (!position.anchorNode()->isTextNode()) | 92 if (!position.anchorNode()->isTextNode()) |
| 93 return false; | 93 return false; |
| 94 | 94 |
| 95 LayoutObject* layoutObject = position.anchorNode()->layoutObject(); | 95 LayoutObject* layoutObject = position.anchorNode()->layoutObject(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 117 } | 117 } |
| 118 | 118 |
| 119 DEFINE_TRACE(EditCommand) { | 119 DEFINE_TRACE(EditCommand) { |
| 120 visitor->trace(m_document); | 120 visitor->trace(m_document); |
| 121 visitor->trace(m_startingSelection); | 121 visitor->trace(m_startingSelection); |
| 122 visitor->trace(m_endingSelection); | 122 visitor->trace(m_endingSelection); |
| 123 visitor->trace(m_parent); | 123 visitor->trace(m_parent); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace blink | 126 } // namespace blink |
| OLD | NEW |