| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 public: | 48 public: |
| 49 static EditCommandComposition* create(Document*, | 49 static EditCommandComposition* create(Document*, |
| 50 const VisibleSelection&, | 50 const VisibleSelection&, |
| 51 const VisibleSelection&, | 51 const VisibleSelection&, |
| 52 InputEvent::InputType); | 52 InputEvent::InputType); |
| 53 | 53 |
| 54 bool belongsTo(const LocalFrame&) const override; | 54 bool belongsTo(const LocalFrame&) const override; |
| 55 void unapply() override; | 55 void unapply() override; |
| 56 void reapply() override; | 56 void reapply() override; |
| 57 InputEvent::InputType inputType() const override; | 57 InputEvent::InputType inputType() const override; |
| 58 int sequence() const override; |
| 59 void setSequence(int) override; |
| 60 |
| 58 void append(SimpleEditCommand*); | 61 void append(SimpleEditCommand*); |
| 59 void append(EditCommandComposition*); | 62 void append(EditCommandComposition*); |
| 60 | 63 |
| 61 const VisibleSelection& startingSelection() const { | 64 const VisibleSelection& startingSelection() const { |
| 62 return m_startingSelection; | 65 return m_startingSelection; |
| 63 } | 66 } |
| 64 const VisibleSelection& endingSelection() const { return m_endingSelection; } | 67 const VisibleSelection& endingSelection() const { return m_endingSelection; } |
| 65 void setStartingSelection(const VisibleSelection&); | 68 void setStartingSelection(const VisibleSelection&); |
| 66 void setEndingSelection(const VisibleSelection&); | 69 void setEndingSelection(const VisibleSelection&); |
| 67 Element* startingRootEditableElement() const { | 70 Element* startingRootEditableElement() const { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 79 const VisibleSelection& endingSelection, | 82 const VisibleSelection& endingSelection, |
| 80 InputEvent::InputType); | 83 InputEvent::InputType); |
| 81 | 84 |
| 82 Member<Document> m_document; | 85 Member<Document> m_document; |
| 83 VisibleSelection m_startingSelection; | 86 VisibleSelection m_startingSelection; |
| 84 VisibleSelection m_endingSelection; | 87 VisibleSelection m_endingSelection; |
| 85 HeapVector<Member<SimpleEditCommand>> m_commands; | 88 HeapVector<Member<SimpleEditCommand>> m_commands; |
| 86 Member<Element> m_startingRootEditableElement; | 89 Member<Element> m_startingRootEditableElement; |
| 87 Member<Element> m_endingRootEditableElement; | 90 Member<Element> m_endingRootEditableElement; |
| 88 InputEvent::InputType m_inputType; | 91 InputEvent::InputType m_inputType; |
| 92 int m_sequence; |
| 89 }; | 93 }; |
| 90 | 94 |
| 91 class CORE_EXPORT CompositeEditCommand : public EditCommand { | 95 class CORE_EXPORT CompositeEditCommand : public EditCommand { |
| 92 public: | 96 public: |
| 93 enum ShouldPreserveSelection { PreserveSelection, DoNotPreserveSelection }; | 97 enum ShouldPreserveSelection { PreserveSelection, DoNotPreserveSelection }; |
| 94 enum ShouldPreserveStyle { PreserveStyle, DoNotPreserveStyle }; | 98 enum ShouldPreserveStyle { PreserveStyle, DoNotPreserveStyle }; |
| 95 | 99 |
| 96 ~CompositeEditCommand() override; | 100 ~CompositeEditCommand() override; |
| 97 | 101 |
| 98 // Returns |false| if the command failed. e.g. It's aborted. | 102 // Returns |false| if the command failed. e.g. It's aborted. |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 276 |
| 273 DEFINE_TYPE_CASTS(CompositeEditCommand, | 277 DEFINE_TYPE_CASTS(CompositeEditCommand, |
| 274 EditCommand, | 278 EditCommand, |
| 275 command, | 279 command, |
| 276 command->isCompositeEditCommand(), | 280 command->isCompositeEditCommand(), |
| 277 command.isCompositeEditCommand()); | 281 command.isCompositeEditCommand()); |
| 278 | 282 |
| 279 } // namespace blink | 283 } // namespace blink |
| 280 | 284 |
| 281 #endif // CompositeEditCommand_h | 285 #endif // CompositeEditCommand_h |
| OLD | NEW |