| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 ContainerNode* highestRoot = highestEditableRoot(visiblePosition.deepEquival
ent(), editableType); | 272 ContainerNode* highestRoot = highestEditableRoot(visiblePosition.deepEquival
ent(), editableType); |
| 273 Node* previousNode = previousLeafWithSameEditability(node, editableType); | 273 Node* previousNode = previousLeafWithSameEditability(node, editableType); |
| 274 | 274 |
| 275 while (previousNode && (!previousNode->layoutObject() || inSameLine(createVi
siblePosition(firstPositionInOrBeforeNode(previousNode)), visiblePosition))) | 275 while (previousNode && (!previousNode->layoutObject() || inSameLine(createVi
siblePosition(firstPositionInOrBeforeNode(previousNode)), visiblePosition))) |
| 276 previousNode = previousLeafWithSameEditability(previousNode, editableTyp
e); | 276 previousNode = previousLeafWithSameEditability(previousNode, editableTyp
e); |
| 277 | 277 |
| 278 while (previousNode && !previousNode->isShadowRoot()) { | 278 while (previousNode && !previousNode->isShadowRoot()) { |
| 279 if (highestEditableRoot(firstPositionInOrBeforeNode(previousNode), edita
bleType) != highestRoot) | 279 if (highestEditableRoot(firstPositionInOrBeforeNode(previousNode), edita
bleType) != highestRoot) |
| 280 break; | 280 break; |
| 281 | 281 |
| 282 Position pos = isHTMLBRElement(*previousNode) ? positionBeforeNode(previ
ousNode) : | 282 Position pos = isHTMLBRElement(*previousNode) ? Position::beforeNode(pre
viousNode) : |
| 283 Position::editingPositionOf(previousNode, caretMaxOffset(previousNod
e)); | 283 Position::editingPositionOf(previousNode, caretMaxOffset(previousNod
e)); |
| 284 | 284 |
| 285 if (isVisuallyEquivalentCandidate(pos)) | 285 if (isVisuallyEquivalentCandidate(pos)) |
| 286 return pos; | 286 return pos; |
| 287 | 287 |
| 288 previousNode = previousLeafWithSameEditability(previousNode, editableTyp
e); | 288 previousNode = previousLeafWithSameEditability(previousNode, editableTyp
e); |
| 289 } | 289 } |
| 290 return Position(); | 290 return Position(); |
| 291 } | 291 } |
| 292 | 292 |
| (...skipping 2958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3251 { | 3251 { |
| 3252 return previousPositionOfAlgorithm<EditingStrategy>(visiblePosition, rule); | 3252 return previousPositionOfAlgorithm<EditingStrategy>(visiblePosition, rule); |
| 3253 } | 3253 } |
| 3254 | 3254 |
| 3255 VisiblePositionInFlatTree previousPositionOf(const VisiblePositionInFlatTree& vi
siblePosition, EditingBoundaryCrossingRule rule) | 3255 VisiblePositionInFlatTree previousPositionOf(const VisiblePositionInFlatTree& vi
siblePosition, EditingBoundaryCrossingRule rule) |
| 3256 { | 3256 { |
| 3257 return previousPositionOfAlgorithm<EditingInFlatTreeStrategy>(visiblePositio
n, rule); | 3257 return previousPositionOfAlgorithm<EditingInFlatTreeStrategy>(visiblePositio
n, rule); |
| 3258 } | 3258 } |
| 3259 | 3259 |
| 3260 } // namespace blink | 3260 } // namespace blink |
| OLD | NEW |