| 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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 } | 922 } |
| 923 | 923 |
| 924 rebalanceWhitespaceAt(m_endingPosition); | 924 rebalanceWhitespaceAt(m_endingPosition); |
| 925 | 925 |
| 926 calculateTypingStyleAfterDelete(); | 926 calculateTypingStyleAfterDelete(); |
| 927 | 927 |
| 928 setEndingSelection(VisibleSelection(m_endingPosition, affinity, endingSelect
ion().isDirectional())); | 928 setEndingSelection(VisibleSelection(m_endingPosition, affinity, endingSelect
ion().isDirectional())); |
| 929 clearTransientState(); | 929 clearTransientState(); |
| 930 } | 930 } |
| 931 | 931 |
| 932 EditAction DeleteSelectionCommand::editingAction() const | 932 InputEvent::InputType DeleteSelectionCommand::inputType() const |
| 933 { | 933 { |
| 934 // Note that DeleteSelectionCommand is also used when the user presses the D
elete key, | 934 // Note that DeleteSelectionCommand is also used when the user presses the D
elete key, |
| 935 // but in that case there's a TypingCommand that supplies the editingAction(
), so | 935 // but in that case there's a TypingCommand that supplies the inputType(), s
o |
| 936 // the Undo menu correctly shows "Undo Typing" | 936 // the Undo menu correctly shows "Undo Typing" |
| 937 return EditActionCut; | 937 return InputEvent::InputType::Cut; |
| 938 } | 938 } |
| 939 | 939 |
| 940 // Normally deletion doesn't preserve the typing style that was present before i
t. For example, | 940 // Normally deletion doesn't preserve the typing style that was present before i
t. For example, |
| 941 // type a character, Bold, then delete the character and start typing. The Bold
typing style shouldn't | 941 // type a character, Bold, then delete the character and start typing. The Bold
typing style shouldn't |
| 942 // stick around. Deletion should preserve a typing style that *it* sets, howeve
r. | 942 // stick around. Deletion should preserve a typing style that *it* sets, howeve
r. |
| 943 bool DeleteSelectionCommand::preservesTypingStyle() const | 943 bool DeleteSelectionCommand::preservesTypingStyle() const |
| 944 { | 944 { |
| 945 return m_typingStyle; | 945 return m_typingStyle; |
| 946 } | 946 } |
| 947 | 947 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 961 visitor->trace(m_deleteIntoBlockquoteStyle); | 961 visitor->trace(m_deleteIntoBlockquoteStyle); |
| 962 visitor->trace(m_startRoot); | 962 visitor->trace(m_startRoot); |
| 963 visitor->trace(m_endRoot); | 963 visitor->trace(m_endRoot); |
| 964 visitor->trace(m_startTableRow); | 964 visitor->trace(m_startTableRow); |
| 965 visitor->trace(m_endTableRow); | 965 visitor->trace(m_endTableRow); |
| 966 visitor->trace(m_temporaryPlaceholder); | 966 visitor->trace(m_temporaryPlaceholder); |
| 967 CompositeEditCommand::trace(visitor); | 967 CompositeEditCommand::trace(visitor); |
| 968 } | 968 } |
| 969 | 969 |
| 970 } // namespace blink | 970 } // namespace blink |
| OLD | NEW |