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 void append(SimpleEditCommand*); | 48 void append(SimpleEditCommand*); |
49 bool wasCreateLinkCommand() const { return m_editAction == EditActionCreateL
ink; } | 49 bool wasCreateLinkCommand() const { return m_editAction == EditActionCreateL
ink; } |
50 | 50 |
51 const VisibleSelection& startingSelection() const { return m_startingSelecti
on; } | 51 const VisibleSelection& startingSelection() const { return m_startingSelecti
on; } |
52 const VisibleSelection& endingSelection() const { return m_endingSelection;
} | 52 const VisibleSelection& endingSelection() const { return m_endingSelection;
} |
53 void setStartingSelection(const VisibleSelection&); | 53 void setStartingSelection(const VisibleSelection&); |
54 void setEndingSelection(const VisibleSelection&); | 54 void setEndingSelection(const VisibleSelection&); |
55 Element* startingRootEditableElement() const { return m_startingRootEditable
Element.get(); } | 55 Element* startingRootEditableElement() const { return m_startingRootEditable
Element.get(); } |
56 Element* endingRootEditableElement() const { return m_endingRootEditableElem
ent.get(); } | 56 Element* endingRootEditableElement() const { return m_endingRootEditableElem
ent.get(); } |
57 | 57 |
58 #ifndef NDEBUG | |
59 virtual void getNodesInCommand(HashSet<Node*>&); | |
60 #endif | |
61 | |
62 private: | 58 private: |
63 EditCommandComposition(Document*, const VisibleSelection& startingSelection,
const VisibleSelection& endingSelection, EditAction); | 59 EditCommandComposition(Document*, const VisibleSelection& startingSelection,
const VisibleSelection& endingSelection, EditAction); |
64 | 60 |
65 RefPtr<Document> m_document; | 61 RefPtr<Document> m_document; |
66 VisibleSelection m_startingSelection; | 62 VisibleSelection m_startingSelection; |
67 VisibleSelection m_endingSelection; | 63 VisibleSelection m_endingSelection; |
68 Vector<RefPtr<SimpleEditCommand> > m_commands; | 64 Vector<RefPtr<SimpleEditCommand> > m_commands; |
69 RefPtr<Element> m_startingRootEditableElement; | 65 RefPtr<Element> m_startingRootEditableElement; |
70 RefPtr<Element> m_endingRootEditableElement; | 66 RefPtr<Element> m_endingRootEditableElement; |
71 EditAction m_editAction; | 67 EditAction m_editAction; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 inline CompositeEditCommand* toCompositeEditCommand(EditCommand* command) | 176 inline CompositeEditCommand* toCompositeEditCommand(EditCommand* command) |
181 { | 177 { |
182 ASSERT(command); | 178 ASSERT(command); |
183 ASSERT(command->isCompositeEditCommand()); | 179 ASSERT(command->isCompositeEditCommand()); |
184 return static_cast<CompositeEditCommand*>(command); | 180 return static_cast<CompositeEditCommand*>(command); |
185 } | 181 } |
186 | 182 |
187 } // namespace WebCore | 183 } // namespace WebCore |
188 | 184 |
189 #endif // CompositeEditCommand_h | 185 #endif // CompositeEditCommand_h |
OLD | NEW |