| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 static void AdjustPositionForUserSelectAll(VisiblePosition& pos, | 181 static void AdjustPositionForUserSelectAll(VisiblePosition& pos, |
| 182 bool is_forward) { | 182 bool is_forward) { |
| 183 if (Node* root_user_select_all = EditingStrategy::RootUserSelectAllForNode( | 183 if (Node* root_user_select_all = EditingStrategy::RootUserSelectAllForNode( |
| 184 pos.DeepEquivalent().AnchorNode())) | 184 pos.DeepEquivalent().AnchorNode())) |
| 185 pos = CreateVisiblePosition( | 185 pos = CreateVisiblePosition( |
| 186 is_forward ? MostForwardCaretPosition( | 186 is_forward ? MostForwardCaretPosition( |
| 187 Position::AfterNode(root_user_select_all), | 187 Position::AfterNode(root_user_select_all), |
| 188 kCanCrossEditingBoundary) | 188 kCanCrossEditingBoundary) |
| 189 : MostBackwardCaretPosition( | 189 : MostBackwardCaretPosition( |
| 190 Position::BeforeNode(root_user_select_all), | 190 Position::BeforeNode(*root_user_select_all), |
| 191 kCanCrossEditingBoundary)); | 191 kCanCrossEditingBoundary)); |
| 192 } | 192 } |
| 193 | 193 |
| 194 VisiblePosition SelectionModifier::ModifyExtendingRight( | 194 VisiblePosition SelectionModifier::ModifyExtendingRight( |
| 195 TextGranularity granularity) { | 195 TextGranularity granularity) { |
| 196 VisiblePosition pos = | 196 VisiblePosition pos = |
| 197 CreateVisiblePosition(selection_.Extent(), selection_.Affinity()); | 197 CreateVisiblePosition(selection_.Extent(), selection_.Affinity()); |
| 198 | 198 |
| 199 // The difference between modifyExtendingRight and modifyExtendingForward is: | 199 // The difference between modifyExtendingRight and modifyExtendingForward is: |
| 200 // modifyExtendingForward always extends forward logically. | 200 // modifyExtendingForward always extends forward logically. |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 x = LineDirectionPointForBlockDirectionNavigationOf(visible_position); | 859 x = LineDirectionPointForBlockDirectionNavigationOf(visible_position); |
| 860 x_pos_for_vertical_arrow_navigation_ = x; | 860 x_pos_for_vertical_arrow_navigation_ = x; |
| 861 } else { | 861 } else { |
| 862 x = x_pos_for_vertical_arrow_navigation_; | 862 x = x_pos_for_vertical_arrow_navigation_; |
| 863 } | 863 } |
| 864 | 864 |
| 865 return x; | 865 return x; |
| 866 } | 866 } |
| 867 | 867 |
| 868 } // namespace blink | 868 } // namespace blink |
| OLD | NEW |