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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 while (RefPtr<Node> node = holder->firstChild()) { | 285 while (RefPtr<Node> node = holder->firstChild()) { |
286 holder->removeChild(node.get(), ec); | 286 holder->removeChild(node.get(), ec); |
287 ASSERT(ec == 0); | 287 ASSERT(ec == 0); |
288 m_fragment->appendChild(node.get(), ec); | 288 m_fragment->appendChild(node.get(), ec); |
289 ASSERT(ec == 0); | 289 ASSERT(ec == 0); |
290 } | 290 } |
291 } | 291 } |
292 | 292 |
293 void ReplacementFragment::removeUnrenderedNodes(Node* holder) | 293 void ReplacementFragment::removeUnrenderedNodes(Node* holder) |
294 { | 294 { |
295 Vector<Node*> unrendered; | 295 Vector<RefPtr<Node> > unrendered; |
296 | 296 |
297 for (Node* node = holder->firstChild(); node; node = node->traverseNextNode(
holder)) | 297 for (Node* node = holder->firstChild(); node; node = node->traverseNextNode(
holder)) |
298 if (!isNodeRendered(node) && !isTableStructureNode(node)) | 298 if (!isNodeRendered(node) && !isTableStructureNode(node)) |
299 unrendered.append(node); | 299 unrendered.append(node); |
300 | 300 |
301 size_t n = unrendered.size(); | 301 size_t n = unrendered.size(); |
302 for (size_t i = 0; i < n; ++i) | 302 for (size_t i = 0; i < n; ++i) |
303 removeNode(unrendered[i]); | 303 removeNode(unrendered[i]); |
304 } | 304 } |
305 | 305 |
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 end = Position(start.containerNode(), start.offsetInContainerNode() + text.l
ength(), Position::PositionIsOffsetInAnchor); | 1318 end = Position(start.containerNode(), start.offsetInContainerNode() + text.l
ength(), Position::PositionIsOffsetInAnchor); |
1319 | 1319 |
1320 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); | 1320 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); |
1321 | 1321 |
1322 setEndingSelection(selectionAfterReplace); | 1322 setEndingSelection(selectionAfterReplace); |
1323 | 1323 |
1324 return true; | 1324 return true; |
1325 } | 1325 } |
1326 | 1326 |
1327 } // namespace WebCore | 1327 } // namespace WebCore |
OLD | NEW |