OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple 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 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 selection_modifier.Modify(FrameSelection::kAlterationExtend, | 894 selection_modifier.Modify(FrameSelection::kAlterationExtend, |
895 kDirectionForward, kCharacterGranularity); | 895 kDirectionForward, kCharacterGranularity); |
896 | 896 |
897 Position downstream_end = | 897 Position downstream_end = |
898 MostForwardCaretPosition(EndingSelection().End()); | 898 MostForwardCaretPosition(EndingSelection().End()); |
899 VisiblePosition visible_end = EndingSelection().VisibleEnd(); | 899 VisiblePosition visible_end = EndingSelection().VisibleEnd(); |
900 Node* enclosing_table_cell = | 900 Node* enclosing_table_cell = |
901 EnclosingNodeOfType(visible_end.DeepEquivalent(), &IsTableCell); | 901 EnclosingNodeOfType(visible_end.DeepEquivalent(), &IsTableCell); |
902 if (enclosing_table_cell && | 902 if (enclosing_table_cell && |
903 visible_end.DeepEquivalent() == | 903 visible_end.DeepEquivalent() == |
904 VisiblePosition::LastPositionInNode(enclosing_table_cell) | 904 VisiblePosition::LastPositionInNode(*enclosing_table_cell) |
905 .DeepEquivalent()) | 905 .DeepEquivalent()) |
906 return; | 906 return; |
907 if (visible_end.DeepEquivalent() == | 907 if (visible_end.DeepEquivalent() == |
908 EndOfParagraph(visible_end).DeepEquivalent()) | 908 EndOfParagraph(visible_end).DeepEquivalent()) |
909 downstream_end = MostForwardCaretPosition( | 909 downstream_end = MostForwardCaretPosition( |
910 NextPositionOf(visible_end, kCannotCrossEditingBoundary) | 910 NextPositionOf(visible_end, kCannotCrossEditingBoundary) |
911 .DeepEquivalent()); | 911 .DeepEquivalent()); |
912 // When deleting tables: Select the table first, then perform the deletion | 912 // When deleting tables: Select the table first, then perform the deletion |
913 if (IsDisplayInsideTable(downstream_end.ComputeContainerNode()) && | 913 if (IsDisplayInsideTable(downstream_end.ComputeContainerNode()) && |
914 downstream_end.ComputeOffsetInContainerNode() <= | 914 downstream_end.ComputeOffsetInContainerNode() <= |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 } | 1015 } |
1016 NOTREACHED(); | 1016 NOTREACHED(); |
1017 preserves_typing_style_ = false; | 1017 preserves_typing_style_ = false; |
1018 } | 1018 } |
1019 | 1019 |
1020 bool TypingCommand::IsTypingCommand() const { | 1020 bool TypingCommand::IsTypingCommand() const { |
1021 return true; | 1021 return true; |
1022 } | 1022 } |
1023 | 1023 |
1024 } // namespace blink | 1024 } // namespace blink |
OLD | NEW |