OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 m_startingSelection = selection; | 137 m_startingSelection = selection; |
138 m_startingRootEditableElement = selection.rootEditableElement(); | 138 m_startingRootEditableElement = selection.rootEditableElement(); |
139 } | 139 } |
140 | 140 |
141 void EditCommandComposition::setEndingSelection(const VisibleSelection& selectio
n) | 141 void EditCommandComposition::setEndingSelection(const VisibleSelection& selectio
n) |
142 { | 142 { |
143 m_endingSelection = selection; | 143 m_endingSelection = selection; |
144 m_endingRootEditableElement = selection.rootEditableElement(); | 144 m_endingRootEditableElement = selection.rootEditableElement(); |
145 } | 145 } |
146 | 146 |
147 #ifndef NDEBUG | |
148 void EditCommandComposition::getNodesInCommand(HashSet<Node*>& nodes) | |
149 { | |
150 size_t size = m_commands.size(); | |
151 for (size_t i = 0; i < size; ++i) | |
152 m_commands[i]->getNodesInCommand(nodes); | |
153 } | |
154 #endif | |
155 | |
156 void applyCommand(PassRefPtr<CompositeEditCommand> command) | 147 void applyCommand(PassRefPtr<CompositeEditCommand> command) |
157 { | 148 { |
158 command->apply(); | 149 command->apply(); |
159 } | 150 } |
160 | 151 |
161 CompositeEditCommand::CompositeEditCommand(Document& document) | 152 CompositeEditCommand::CompositeEditCommand(Document& document) |
162 : EditCommand(document) | 153 : EditCommand(document) |
163 { | 154 { |
164 } | 155 } |
165 | 156 |
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 return node.release(); | 1455 return node.release(); |
1465 } | 1456 } |
1466 | 1457 |
1467 PassRefPtr<Element> createBlockPlaceholderElement(Document& document) | 1458 PassRefPtr<Element> createBlockPlaceholderElement(Document& document) |
1468 { | 1459 { |
1469 RefPtr<Element> breakNode = document.createElement(brTag, false); | 1460 RefPtr<Element> breakNode = document.createElement(brTag, false); |
1470 return breakNode.release(); | 1461 return breakNode.release(); |
1471 } | 1462 } |
1472 | 1463 |
1473 } // namespace WebCore | 1464 } // namespace WebCore |
OLD | NEW |