| 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 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 if (!isNodeRendered(node) && !isTableStructureNode(node)) | 284 if (!isNodeRendered(node) && !isTableStructureNode(node)) |
| 285 unrendered.append(node); | 285 unrendered.append(node); |
| 286 | 286 |
| 287 size_t n = unrendered.size(); | 287 size_t n = unrendered.size(); |
| 288 for (size_t i = 0; i < n; ++i) | 288 for (size_t i = 0; i < n; ++i) |
| 289 removeNode(unrendered[i]); | 289 removeNode(unrendered[i]); |
| 290 } | 290 } |
| 291 | 291 |
| 292 void ReplacementFragment::removeInterchangeNodes(Node* container) | 292 void ReplacementFragment::removeInterchangeNodes(Node* container) |
| 293 { | 293 { |
| 294 m_hasInterchangeNewlineAtStart = false; |
| 295 m_hasInterchangeNewlineAtEnd = false; |
| 296 |
| 294 // Interchange newlines at the "start" of the incoming fragment must be | 297 // Interchange newlines at the "start" of the incoming fragment must be |
| 295 // either the first node in the fragment or the first leaf in the fragment. | 298 // either the first node in the fragment or the first leaf in the fragment. |
| 296 Node* node = container->firstChild(); | 299 Node* node = container->firstChild(); |
| 297 while (node) { | 300 while (node) { |
| 298 if (isInterchangeNewlineNode(node)) { | 301 if (isInterchangeNewlineNode(node)) { |
| 299 m_hasInterchangeNewlineAtStart = true; | 302 m_hasInterchangeNewlineAtStart = true; |
| 300 removeNode(node); | 303 removeNode(node); |
| 301 break; | 304 break; |
| 302 } | 305 } |
| 303 node = node->firstChild(); | 306 node = node->firstChild(); |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1288 removeNodeAndPruneAncestors(nodeAfterInsertionPos); | 1291 removeNodeAndPruneAncestors(nodeAfterInsertionPos); |
| 1289 | 1292 |
| 1290 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); | 1293 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); |
| 1291 | 1294 |
| 1292 setEndingSelection(selectionAfterReplace); | 1295 setEndingSelection(selectionAfterReplace); |
| 1293 | 1296 |
| 1294 return true; | 1297 return true; |
| 1295 } | 1298 } |
| 1296 | 1299 |
| 1297 } // namespace WebCore | 1300 } // namespace WebCore |
| OLD | NEW |