| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 // In this case, use the previous position of the computed logical end | 513 // In this case, use the previous position of the computed logical end |
| 514 // position. | 514 // position. |
| 515 if (!InSameLogicalLine(current_position, vis_pos)) | 515 if (!InSameLogicalLine(current_position, vis_pos)) |
| 516 vis_pos = PreviousPositionOf(vis_pos); | 516 vis_pos = PreviousPositionOf(vis_pos); |
| 517 | 517 |
| 518 if (ContainerNode* editable_root = | 518 if (ContainerNode* editable_root = |
| 519 HighestEditableRoot(current_position.DeepEquivalent())) { | 519 HighestEditableRoot(current_position.DeepEquivalent())) { |
| 520 if (!editable_root->contains( | 520 if (!editable_root->contains( |
| 521 vis_pos.DeepEquivalent().ComputeContainerNode())) { | 521 vis_pos.DeepEquivalent().ComputeContainerNode())) { |
| 522 return CreateVisiblePosition( | 522 return CreateVisiblePosition( |
| 523 PositionTemplate<Strategy>::LastPositionInNode(editable_root)); | 523 PositionTemplate<Strategy>::LastPositionInNode(*editable_root)); |
| 524 } | 524 } |
| 525 } | 525 } |
| 526 | 526 |
| 527 return HonorEditingBoundaryAtOrAfter(vis_pos, | 527 return HonorEditingBoundaryAtOrAfter(vis_pos, |
| 528 current_position.DeepEquivalent()); | 528 current_position.DeepEquivalent()); |
| 529 } | 529 } |
| 530 | 530 |
| 531 VisiblePosition LogicalEndOfLine(const VisiblePosition& current_position) { | 531 VisiblePosition LogicalEndOfLine(const VisiblePosition& current_position) { |
| 532 return LogicalEndOfLineAlgorithm<EditingStrategy>(current_position); | 532 return LogicalEndOfLineAlgorithm<EditingStrategy>(current_position); |
| 533 } | 533 } |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 // to the end of the line we're on. | 747 // to the end of the line we're on. |
| 748 Element* root_element = HasEditableStyle(*node, editable_type) | 748 Element* root_element = HasEditableStyle(*node, editable_type) |
| 749 ? RootEditableElement(*node, editable_type) | 749 ? RootEditableElement(*node, editable_type) |
| 750 : node->GetDocument().documentElement(); | 750 : node->GetDocument().documentElement(); |
| 751 if (!root_element) | 751 if (!root_element) |
| 752 return VisiblePosition(); | 752 return VisiblePosition(); |
| 753 return VisiblePosition::LastPositionInNode(root_element); | 753 return VisiblePosition::LastPositionInNode(root_element); |
| 754 } | 754 } |
| 755 | 755 |
| 756 } // namespace blink | 756 } // namespace blink |
| OLD | NEW |