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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 TypingCommand(Document*, ETypingCommand, const String& text, bool selectInse
rtedText, TextGranularity, bool killRing); | 74 TypingCommand(Document*, ETypingCommand, const String& text, bool selectInse
rtedText, TextGranularity, bool killRing); |
75 | 75 |
76 bool smartDelete() const { return m_smartDelete; } | 76 bool smartDelete() const { return m_smartDelete; } |
77 void setSmartDelete(bool smartDelete) { m_smartDelete = smartDelete; } | 77 void setSmartDelete(bool smartDelete) { m_smartDelete = smartDelete; } |
78 | 78 |
79 virtual void doApply(); | 79 virtual void doApply(); |
80 virtual EditAction editingAction() const; | 80 virtual EditAction editingAction() const; |
81 virtual bool isTypingCommand() const; | 81 virtual bool isTypingCommand() const; |
82 virtual bool preservesTypingStyle() const { return m_preservesTypingStyle; } | 82 virtual bool preservesTypingStyle() const { return m_preservesTypingStyle; } |
83 | 83 |
| 84 static void updateSelectionIfDifferentFromCurrentSelection(TypingCommand*, F
rame*); |
| 85 |
84 void updatePreservesTypingStyle(ETypingCommand); | 86 void updatePreservesTypingStyle(ETypingCommand); |
85 void markMisspellingsAfterTyping(ETypingCommand); | 87 void markMisspellingsAfterTyping(ETypingCommand); |
86 void typingAddedToOpenCommand(ETypingCommand); | 88 void typingAddedToOpenCommand(ETypingCommand); |
87 bool makeEditableRootEmpty(); | 89 bool makeEditableRootEmpty(); |
88 | 90 |
89 ETypingCommand m_commandType; | 91 ETypingCommand m_commandType; |
90 String m_textToInsert; | 92 String m_textToInsert; |
91 bool m_openForMoreTyping; | 93 bool m_openForMoreTyping; |
92 bool m_selectInsertedText; | 94 bool m_selectInsertedText; |
93 bool m_smartDelete; | 95 bool m_smartDelete; |
94 TextGranularity m_granularity; | 96 TextGranularity m_granularity; |
95 bool m_killRing; | 97 bool m_killRing; |
96 bool m_preservesTypingStyle; | 98 bool m_preservesTypingStyle; |
97 | 99 |
98 // Undoing a series of backward deletes will restore a selection around all
of the | 100 // Undoing a series of backward deletes will restore a selection around all
of the |
99 // characters that were deleted, but only if the typing command being undone | 101 // characters that were deleted, but only if the typing command being undone |
100 // was opened with a backward delete. | 102 // was opened with a backward delete. |
101 bool m_openedByBackwardDelete; | 103 bool m_openedByBackwardDelete; |
102 }; | 104 }; |
103 | 105 |
104 } // namespace WebCore | 106 } // namespace WebCore |
105 | 107 |
106 #endif // TypingCommand_h | 108 #endif // TypingCommand_h |
OLD | NEW |