| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 173 } |
| 174 | 174 |
| 175 // Insert the character at the leftmost candidate. | 175 // Insert the character at the leftmost candidate. |
| 176 startPosition = mostBackwardCaretPosition(startPosition); | 176 startPosition = mostBackwardCaretPosition(startPosition); |
| 177 | 177 |
| 178 // It is possible for the node that contains startPosition to contain only u
nrendered whitespace, | 178 // It is possible for the node that contains startPosition to contain only u
nrendered whitespace, |
| 179 // and so deleteInsignificantText could remove it. Save the position before
the node in case that happens. | 179 // and so deleteInsignificantText could remove it. Save the position before
the node in case that happens. |
| 180 ASSERT(startPosition.computeContainerNode()); | 180 ASSERT(startPosition.computeContainerNode()); |
| 181 Position positionBeforeStartNode(positionInParentBeforeNode(*startPosition.c
omputeContainerNode())); | 181 Position positionBeforeStartNode(positionInParentBeforeNode(*startPosition.c
omputeContainerNode())); |
| 182 deleteInsignificantText(startPosition, mostForwardCaretPosition(startPositio
n)); | 182 deleteInsignificantText(startPosition, mostForwardCaretPosition(startPositio
n)); |
| 183 if (!startPosition.inDocument()) | 183 if (!startPosition.inShadowIncludingDocument()) |
| 184 startPosition = positionBeforeStartNode; | 184 startPosition = positionBeforeStartNode; |
| 185 if (!isVisuallyEquivalentCandidate(startPosition)) | 185 if (!isVisuallyEquivalentCandidate(startPosition)) |
| 186 startPosition = mostForwardCaretPosition(startPosition); | 186 startPosition = mostForwardCaretPosition(startPosition); |
| 187 | 187 |
| 188 startPosition = positionAvoidingSpecialElementBoundary(startPosition, editin
gState); | 188 startPosition = positionAvoidingSpecialElementBoundary(startPosition, editin
gState); |
| 189 if (editingState->isAborted()) | 189 if (editingState->isAborted()) |
| 190 return; | 190 return; |
| 191 | 191 |
| 192 Position endPosition; | 192 Position endPosition; |
| 193 | 193 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 282 } |
| 283 } | 283 } |
| 284 if (editingState->isAborted()) | 284 if (editingState->isAborted()) |
| 285 return Position(); | 285 return Position(); |
| 286 | 286 |
| 287 // return the position following the new tab | 287 // return the position following the new tab |
| 288 return lastPositionInNode(spanElement.get()); | 288 return lastPositionInNode(spanElement.get()); |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace blink | 291 } // namespace blink |
| OLD | NEW |