| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2005 Apple Computer, 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 VisiblePosition newExtent = createVisiblePosition(isBaseFirst ? end : start)
; | 160 VisiblePosition newExtent = createVisiblePosition(isBaseFirst ? end : start)
; |
| 161 setStartingSelection(VisibleSelection(newBase, newExtent, startingSelection(
).isDirectional())); | 161 setStartingSelection(VisibleSelection(newBase, newExtent, startingSelection(
).isDirectional())); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void DeleteSelectionCommand::initializePositionData(EditingState* editingState) | 164 void DeleteSelectionCommand::initializePositionData(EditingState* editingState) |
| 165 { | 165 { |
| 166 Position start, end; | 166 Position start, end; |
| 167 initializeStartEnd(start, end); | 167 initializeStartEnd(start, end); |
| 168 DCHECK(start.isNotNull()); | 168 DCHECK(start.isNotNull()); |
| 169 DCHECK(end.isNotNull()); | 169 DCHECK(end.isNotNull()); |
| 170 if (!isEditablePosition(start, ContentIsEditable, DoNotUpdateStyle)) { | 170 if (!isEditablePosition(start, ContentIsEditable)) { |
| 171 editingState->abort(); | 171 editingState->abort(); |
| 172 return; | 172 return; |
| 173 } | 173 } |
| 174 if (!isEditablePosition(end, ContentIsEditable, DoNotUpdateStyle)) { | 174 if (!isEditablePosition(end, ContentIsEditable)) { |
| 175 Node* highestRoot = highestEditableRoot(start); | 175 Node* highestRoot = highestEditableRoot(start); |
| 176 DCHECK(highestRoot); | 176 DCHECK(highestRoot); |
| 177 end = lastEditablePositionBeforePositionInRoot(end, *highestRoot); | 177 end = lastEditablePositionBeforePositionInRoot(end, *highestRoot); |
| 178 } | 178 } |
| 179 | 179 |
| 180 m_upstreamStart = mostBackwardCaretPosition(start); | 180 m_upstreamStart = mostBackwardCaretPosition(start); |
| 181 m_downstreamStart = mostForwardCaretPosition(start); | 181 m_downstreamStart = mostForwardCaretPosition(start); |
| 182 m_upstreamEnd = mostBackwardCaretPosition(end); | 182 m_upstreamEnd = mostBackwardCaretPosition(end); |
| 183 m_downstreamEnd = mostForwardCaretPosition(end); | 183 m_downstreamEnd = mostForwardCaretPosition(end); |
| 184 | 184 |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 visitor->trace(m_deleteIntoBlockquoteStyle); | 961 visitor->trace(m_deleteIntoBlockquoteStyle); |
| 962 visitor->trace(m_startRoot); | 962 visitor->trace(m_startRoot); |
| 963 visitor->trace(m_endRoot); | 963 visitor->trace(m_endRoot); |
| 964 visitor->trace(m_startTableRow); | 964 visitor->trace(m_startTableRow); |
| 965 visitor->trace(m_endTableRow); | 965 visitor->trace(m_endTableRow); |
| 966 visitor->trace(m_temporaryPlaceholder); | 966 visitor->trace(m_temporaryPlaceholder); |
| 967 CompositeEditCommand::trace(visitor); | 967 CompositeEditCommand::trace(visitor); |
| 968 } | 968 } |
| 969 | 969 |
| 970 } // namespace blink | 970 } // namespace blink |
| OLD | NEW |