| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 startPosition = mostBackwardCaretPosition(startPosition); | 202 startPosition = mostBackwardCaretPosition(startPosition); |
| 203 | 203 |
| 204 // It is possible for the node that contains startPosition to contain only | 204 // It is possible for the node that contains startPosition to contain only |
| 205 // unrendered whitespace, and so deleteInsignificantText could remove it. | 205 // unrendered whitespace, and so deleteInsignificantText could remove it. |
| 206 // Save the position before the node in case that happens. | 206 // Save the position before the node in case that happens. |
| 207 DCHECK(startPosition.computeContainerNode()) << startPosition; | 207 DCHECK(startPosition.computeContainerNode()) << startPosition; |
| 208 Position positionBeforeStartNode( | 208 Position positionBeforeStartNode( |
| 209 Position::inParentBeforeNode(*startPosition.computeContainerNode())); | 209 Position::inParentBeforeNode(*startPosition.computeContainerNode())); |
| 210 deleteInsignificantText(startPosition, | 210 deleteInsignificantText(startPosition, |
| 211 mostForwardCaretPosition(startPosition)); | 211 mostForwardCaretPosition(startPosition)); |
| 212 |
| 213 // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets() |
| 214 // needs to be audited. See http://crbug.com/590369 for more details. |
| 215 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 216 |
| 212 if (!startPosition.isConnected()) | 217 if (!startPosition.isConnected()) |
| 213 startPosition = positionBeforeStartNode; | 218 startPosition = positionBeforeStartNode; |
| 214 if (!isVisuallyEquivalentCandidate(startPosition)) | 219 if (!isVisuallyEquivalentCandidate(startPosition)) |
| 215 startPosition = mostForwardCaretPosition(startPosition); | 220 startPosition = mostForwardCaretPosition(startPosition); |
| 216 | 221 |
| 217 startPosition = | 222 startPosition = |
| 218 positionAvoidingSpecialElementBoundary(startPosition, editingState); | 223 positionAvoidingSpecialElementBoundary(startPosition, editingState); |
| 219 if (editingState->isAborted()) | 224 if (editingState->isAborted()) |
| 220 return; | 225 return; |
| 221 | 226 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 } | 329 } |
| 325 } | 330 } |
| 326 if (editingState->isAborted()) | 331 if (editingState->isAborted()) |
| 327 return Position(); | 332 return Position(); |
| 328 | 333 |
| 329 // return the position following the new tab | 334 // return the position following the new tab |
| 330 return Position::lastPositionInNode(spanElement); | 335 return Position::lastPositionInNode(spanElement); |
| 331 } | 336 } |
| 332 | 337 |
| 333 } // namespace blink | 338 } // namespace blink |
| OLD | NEW |