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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 class EditCommandComposition final : public UndoStep { | 43 class EditCommandComposition final : public UndoStep { |
44 public: | 44 public: |
45 static PassRefPtrWillBeRawPtr<EditCommandComposition> create(Document*, cons
t VisibleSelection&, const VisibleSelection&, EditAction); | 45 static PassRefPtrWillBeRawPtr<EditCommandComposition> create(Document*, cons
t VisibleSelection&, const VisibleSelection&, EditAction); |
46 | 46 |
47 virtual bool belongsTo(const LocalFrame&) const override; | 47 virtual bool belongsTo(const LocalFrame&) const override; |
48 virtual void unapply() override; | 48 virtual void unapply() override; |
49 virtual void reapply() override; | 49 virtual void reapply() override; |
50 virtual EditAction editingAction() const override { return m_editAction; } | 50 virtual EditAction editingAction() const override { return m_editAction; } |
51 void append(SimpleEditCommand*); | 51 void append(SimpleEditCommand*); |
52 bool wasCreateLinkCommand() const { return m_editAction == EditActionCreateL
ink; } | |
53 | 52 |
54 const VisibleSelection& startingSelection() const { return m_startingSelecti
on; } | 53 const VisibleSelection& startingSelection() const { return m_startingSelecti
on; } |
55 const VisibleSelection& endingSelection() const { return m_endingSelection;
} | 54 const VisibleSelection& endingSelection() const { return m_endingSelection;
} |
56 void setStartingSelection(const VisibleSelection&); | 55 void setStartingSelection(const VisibleSelection&); |
57 void setEndingSelection(const VisibleSelection&); | 56 void setEndingSelection(const VisibleSelection&); |
58 Element* startingRootEditableElement() const { return m_startingRootEditable
Element.get(); } | 57 Element* startingRootEditableElement() const { return m_startingRootEditable
Element.get(); } |
59 Element* endingRootEditableElement() const { return m_endingRootEditableElem
ent.get(); } | 58 Element* endingRootEditableElement() const { return m_endingRootEditableElem
ent.get(); } |
60 | 59 |
61 virtual void trace(Visitor*) override; | 60 virtual void trace(Visitor*) override; |
62 | 61 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 virtual bool isCompositeEditCommand() const override final { return true; } | 173 virtual bool isCompositeEditCommand() const override final { return true; } |
175 | 174 |
176 RefPtrWillBeMember<EditCommandComposition> m_composition; | 175 RefPtrWillBeMember<EditCommandComposition> m_composition; |
177 }; | 176 }; |
178 | 177 |
179 DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isComposi
teEditCommand(), command.isCompositeEditCommand()); | 178 DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isComposi
teEditCommand(), command.isCompositeEditCommand()); |
180 | 179 |
181 } // namespace blink | 180 } // namespace blink |
182 | 181 |
183 #endif // CompositeEditCommand_h | 182 #endif // CompositeEditCommand_h |
OLD | NEW |