| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 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 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef CompositeEditCommand_h | 26 #ifndef CompositeEditCommand_h |
| 27 #define CompositeEditCommand_h | 27 #define CompositeEditCommand_h |
| 28 | 28 |
| 29 #include "core/CSSPropertyNames.h" | 29 #include "core/CSSPropertyNames.h" |
| 30 #include "core/CoreExport.h" | 30 #include "core/CoreExport.h" |
| 31 #include "core/editing/commands/EditCommand.h" | 31 #include "core/editing/commands/EditCommand.h" |
| 32 #include "core/editing/commands/EditingState.h" | 32 #include "core/editing/commands/EditingState.h" |
| 33 #include "core/editing/commands/UndoStep.h" | 33 #include "core/editing/commands/UndoStep.h" |
| 34 #include "core/events/InputEvent.h" |
| 34 #include "wtf/Vector.h" | 35 #include "wtf/Vector.h" |
| 35 | 36 |
| 36 namespace blink { | 37 namespace blink { |
| 37 | 38 |
| 38 class EditingStyle; | 39 class EditingStyle; |
| 39 class Element; | 40 class Element; |
| 40 class HTMLBRElement; | 41 class HTMLBRElement; |
| 41 class HTMLElement; | 42 class HTMLElement; |
| 42 class HTMLSpanElement; | 43 class HTMLSpanElement; |
| 43 class Text; | 44 class Text; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void appendCommandToComposite(CompositeEditCommand*); | 115 void appendCommandToComposite(CompositeEditCommand*); |
| 115 | 116 |
| 116 virtual bool isReplaceSelectionCommand() const; | 117 virtual bool isReplaceSelectionCommand() const; |
| 117 virtual bool isTypingCommand() const; | 118 virtual bool isTypingCommand() const; |
| 118 virtual bool isCommandGroupWrapper() const; | 119 virtual bool isCommandGroupWrapper() const; |
| 119 virtual bool isDragAndDropCommand() const; | 120 virtual bool isDragAndDropCommand() const; |
| 120 virtual bool preservesTypingStyle() const; | 121 virtual bool preservesTypingStyle() const; |
| 121 virtual void setShouldRetainAutocorrectionIndicator(bool); | 122 virtual void setShouldRetainAutocorrectionIndicator(bool); |
| 122 virtual bool shouldStopCaretBlinking() const { return false; } | 123 virtual bool shouldStopCaretBlinking() const { return false; } |
| 123 | 124 |
| 125 virtual InputEvent::InputType inputType() const; |
| 126 // |TypingCommand| will return the text of the last |m_commands|. |
| 127 virtual String textDataForInputEvent() const; |
| 128 virtual DataTransfer* dataTransferForInputEvent() const; |
| 129 virtual RangeVector* targetRangesForInputEvent() const; |
| 130 |
| 124 DECLARE_VIRTUAL_TRACE(); | 131 DECLARE_VIRTUAL_TRACE(); |
| 125 | 132 |
| 126 protected: | 133 protected: |
| 127 explicit CompositeEditCommand(Document&); | 134 explicit CompositeEditCommand(Document&); |
| 128 | 135 |
| 129 // TODO(chongz): Implement "beforeinput" as described below: | 136 // TODO(chongz): Implement "beforeinput" as described below: |
| 130 // Fires "beforeinput" and will return |false| to cancel applying editing if | 137 // Fires "beforeinput" and will return |false| to cancel applying editing if |
| 131 // * "beforeinput" was canceled, or | 138 // * "beforeinput" was canceled, or |
| 132 // * |frame| was destroyed by event handlers. | 139 // * |frame| was destroyed by event handlers. |
| 133 // |willApplyEditing()| should be called from | 140 // |willApplyEditing()| should be called from |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 296 |
| 290 DEFINE_TYPE_CASTS(CompositeEditCommand, | 297 DEFINE_TYPE_CASTS(CompositeEditCommand, |
| 291 EditCommand, | 298 EditCommand, |
| 292 command, | 299 command, |
| 293 command->isCompositeEditCommand(), | 300 command->isCompositeEditCommand(), |
| 294 command.isCompositeEditCommand()); | 301 command.isCompositeEditCommand()); |
| 295 | 302 |
| 296 } // namespace blink | 303 } // namespace blink |
| 297 | 304 |
| 298 #endif // CompositeEditCommand_h | 305 #endif // CompositeEditCommand_h |
| OLD | NEW |