Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: Source/core/editing/ReplaceSelectionCommand.cpp

Issue 717603002: Clean up htmlediting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/editing/BreakBlockquoteCommand.cpp ('k') | Source/core/editing/htmlediting.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 280
281 removeNode(holder); 281 removeNode(holder);
282 } 282 }
283 283
284 void ReplacementFragment::removeUnrenderedNodes(ContainerNode* holder) 284 void ReplacementFragment::removeUnrenderedNodes(ContainerNode* holder)
285 { 285 {
286 WillBeHeapVector<RefPtrWillBeMember<Node>> unrendered; 286 WillBeHeapVector<RefPtrWillBeMember<Node>> unrendered;
287 287
288 for (Node& node : NodeTraversal::descendantsOf(*holder)) { 288 for (Node& node : NodeTraversal::descendantsOf(*holder)) {
289 if (!isNodeRendered(&node) && !isTableStructureNode(&node)) 289 if (!isNodeRendered(node) && !isTableStructureNode(&node))
290 unrendered.append(&node); 290 unrendered.append(&node);
291 } 291 }
292 292
293 for (auto& node : unrendered) 293 for (auto& node : unrendered)
294 removeNode(node); 294 removeNode(node);
295 } 295 }
296 296
297 void ReplacementFragment::removeInterchangeNodes(ContainerNode* container) 297 void ReplacementFragment::removeInterchangeNodes(ContainerNode* container)
298 { 298 {
299 m_hasInterchangeNewlineAtStart = false; 299 m_hasInterchangeNewlineAtStart = false;
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 void ReplaceSelectionCommand::trace(Visitor* visitor) 1542 void ReplaceSelectionCommand::trace(Visitor* visitor)
1543 { 1543 {
1544 visitor->trace(m_startOfInsertedContent); 1544 visitor->trace(m_startOfInsertedContent);
1545 visitor->trace(m_endOfInsertedContent); 1545 visitor->trace(m_endOfInsertedContent);
1546 visitor->trace(m_insertionStyle); 1546 visitor->trace(m_insertionStyle);
1547 visitor->trace(m_documentFragment); 1547 visitor->trace(m_documentFragment);
1548 CompositeEditCommand::trace(visitor); 1548 CompositeEditCommand::trace(visitor);
1549 } 1549 }
1550 1550
1551 } // namespace blink 1551 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/editing/BreakBlockquoteCommand.cpp ('k') | Source/core/editing/htmlediting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698