Chromium Code Reviews| 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 20 matching lines...) Expand all Loading... | |
| 31 #include "core/editing/UndoStep.h" | 31 #include "core/editing/UndoStep.h" |
| 32 #include "wtf/Vector.h" | 32 #include "wtf/Vector.h" |
| 33 | 33 |
| 34 namespace WebCore { | 34 namespace WebCore { |
| 35 | 35 |
| 36 class EditingStyle; | 36 class EditingStyle; |
| 37 class Element; | 37 class Element; |
| 38 class HTMLElement; | 38 class HTMLElement; |
| 39 class Text; | 39 class Text; |
| 40 | 40 |
| 41 class EditCommandComposition : public UndoStep { | 41 class EditCommandComposition FINAL : public UndoStep { |
| 42 public: | 42 public: |
| 43 static PassRefPtr<EditCommandComposition> create(Document*, const VisibleSel ection&, const VisibleSelection&, EditAction); | 43 static PassRefPtr<EditCommandComposition> create(Document*, const VisibleSel ection&, const VisibleSelection&, EditAction); |
| 44 | 44 |
| 45 virtual bool belongsTo(const Frame&) const OVERRIDE; | 45 virtual bool belongsTo(const Frame&) const OVERRIDE; |
| 46 virtual void unapply() OVERRIDE; | 46 virtual void unapply() OVERRIDE; |
| 47 virtual void reapply() OVERRIDE; | 47 virtual void reapply() OVERRIDE; |
| 48 EditAction editingAction() const OVERRIDE { return m_editAction; } | 48 virtual EditAction editingAction() const OVERRIDE { return m_editAction; } |
| 49 void append(SimpleEditCommand*); | 49 void append(SimpleEditCommand*); |
| 50 bool wasCreateLinkCommand() const { return m_editAction == EditActionCreateL ink; } | 50 bool wasCreateLinkCommand() const { return m_editAction == EditActionCreateL ink; } |
| 51 | 51 |
| 52 const VisibleSelection& startingSelection() const { return m_startingSelecti on; } | 52 const VisibleSelection& startingSelection() const { return m_startingSelecti on; } |
| 53 const VisibleSelection& endingSelection() const { return m_endingSelection; } | 53 const VisibleSelection& endingSelection() const { return m_endingSelection; } |
| 54 void setStartingSelection(const VisibleSelection&); | 54 void setStartingSelection(const VisibleSelection&); |
| 55 void setEndingSelection(const VisibleSelection&); | 55 void setEndingSelection(const VisibleSelection&); |
| 56 Element* startingRootEditableElement() const { return m_startingRootEditable Element.get(); } | 56 Element* startingRootEditableElement() const { return m_startingRootEditable Element.get(); } |
| 57 Element* endingRootEditableElement() const { return m_endingRootEditableElem ent.get(); } | 57 Element* endingRootEditableElement() const { return m_endingRootEditableElem ent.get(); } |
| 58 | 58 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 bool breakOutOfEmptyListItem(); | 161 bool breakOutOfEmptyListItem(); |
| 162 bool breakOutOfEmptyMailBlockquotedParagraph(); | 162 bool breakOutOfEmptyMailBlockquotedParagraph(); |
| 163 | 163 |
| 164 Position positionAvoidingSpecialElementBoundary(const Position&); | 164 Position positionAvoidingSpecialElementBoundary(const Position&); |
| 165 | 165 |
| 166 PassRefPtr<Node> splitTreeToNode(Node*, Node*, bool splitAncestor = false); | 166 PassRefPtr<Node> splitTreeToNode(Node*, Node*, bool splitAncestor = false); |
| 167 | 167 |
| 168 Vector<RefPtr<EditCommand> > m_commands; | 168 Vector<RefPtr<EditCommand> > m_commands; |
| 169 | 169 |
| 170 private: | 170 private: |
| 171 bool isCompositeEditCommand() const OVERRIDE { return true; } | 171 bool isCompositeEditCommand() const OVERRIDE FINAL { return true; } |
|
eseidel
2014/01/10 18:24:14
The whole class is final, no?
Inactive
2014/01/10 18:36:00
No, the CompositeEditCommand class is not FINAL. I
| |
| 172 | 172 |
| 173 RefPtr<EditCommandComposition> m_composition; | 173 RefPtr<EditCommandComposition> m_composition; |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isComposi teEditCommand(), command.isCompositeEditCommand()); | 176 DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isComposi teEditCommand(), command.isCompositeEditCommand()); |
| 177 | 177 |
| 178 } // namespace WebCore | 178 } // namespace WebCore |
| 179 | 179 |
| 180 #endif // CompositeEditCommand_h | 180 #endif // CompositeEditCommand_h |
| OLD | NEW |