| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 EditCommandComposition* ensureComposition(); | 81 EditCommandComposition* ensureComposition(); |
| 82 | 82 |
| 83 virtual bool isCreateLinkCommand() const; | 83 virtual bool isCreateLinkCommand() const; |
| 84 virtual bool isTypingCommand() const; | 84 virtual bool isTypingCommand() const; |
| 85 virtual bool preservesTypingStyle() const; | 85 virtual bool preservesTypingStyle() const; |
| 86 virtual bool shouldRetainAutocorrectionIndicator() const; | 86 virtual bool shouldRetainAutocorrectionIndicator() const; |
| 87 virtual void setShouldRetainAutocorrectionIndicator(bool); | 87 virtual void setShouldRetainAutocorrectionIndicator(bool); |
| 88 virtual bool shouldStopCaretBlinking() const { return false; } | 88 virtual bool shouldStopCaretBlinking() const { return false; } |
| 89 | 89 |
| 90 protected: | 90 protected: |
| 91 explicit CompositeEditCommand(Document*); | 91 explicit CompositeEditCommand(Document&); |
| 92 | 92 |
| 93 // | 93 // |
| 94 // sugary-sweet convenience functions to help create and apply edit commands
in composite commands | 94 // sugary-sweet convenience functions to help create and apply edit commands
in composite commands |
| 95 // | 95 // |
| 96 void appendNode(PassRefPtr<Node>, PassRefPtr<ContainerNode> parent); | 96 void appendNode(PassRefPtr<Node>, PassRefPtr<ContainerNode> parent); |
| 97 void applyCommandToComposite(PassRefPtr<EditCommand>); | 97 void applyCommandToComposite(PassRefPtr<EditCommand>); |
| 98 void applyCommandToComposite(PassRefPtr<CompositeEditCommand>, const Visible
Selection&); | 98 void applyCommandToComposite(PassRefPtr<CompositeEditCommand>, const Visible
Selection&); |
| 99 void applyStyle(const EditingStyle*, EditAction = EditActionChangeAttributes
); | 99 void applyStyle(const EditingStyle*, EditAction = EditActionChangeAttributes
); |
| 100 void applyStyle(const EditingStyle*, const Position& start, const Position&
end, EditAction = EditActionChangeAttributes); | 100 void applyStyle(const EditingStyle*, const Position& start, const Position&
end, EditAction = EditActionChangeAttributes); |
| 101 void applyStyledElement(PassRefPtr<Element>); | 101 void applyStyledElement(PassRefPtr<Element>); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 inline CompositeEditCommand* toCompositeEditCommand(EditCommand* command) | 180 inline CompositeEditCommand* toCompositeEditCommand(EditCommand* command) |
| 181 { | 181 { |
| 182 ASSERT(command); | 182 ASSERT(command); |
| 183 ASSERT(command->isCompositeEditCommand()); | 183 ASSERT(command->isCompositeEditCommand()); |
| 184 return static_cast<CompositeEditCommand*>(command); | 184 return static_cast<CompositeEditCommand*>(command); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace WebCore | 187 } // namespace WebCore |
| 188 | 188 |
| 189 #endif // CompositeEditCommand_h | 189 #endif // CompositeEditCommand_h |
| OLD | NEW |