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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/MergeIdenticalElementsCommand.cpp

Issue 2571953004: Migrate WTF::Vector::append() to ::push_back() [part 5 of N] (Closed)
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 DummyExceptionStateForTesting exceptionState; 72 DummyExceptionStateForTesting exceptionState;
73 73
74 parent->insertBefore(m_element1.get(), m_element2.get(), exceptionState); 74 parent->insertBefore(m_element1.get(), m_element2.get(), exceptionState);
75 if (exceptionState.hadException()) 75 if (exceptionState.hadException())
76 return; 76 return;
77 77
78 HeapVector<Member<Node>> children; 78 HeapVector<Member<Node>> children;
79 for (Node* child = m_element2->firstChild(); child && child != atChild; 79 for (Node* child = m_element2->firstChild(); child && child != atChild;
80 child = child->nextSibling()) 80 child = child->nextSibling())
81 children.append(child); 81 children.push_back(child);
82 82
83 for (auto& child : children) 83 for (auto& child : children)
84 m_element1->appendChild(child.release(), exceptionState); 84 m_element1->appendChild(child.release(), exceptionState);
85 } 85 }
86 86
87 DEFINE_TRACE(MergeIdenticalElementsCommand) { 87 DEFINE_TRACE(MergeIdenticalElementsCommand) {
88 visitor->trace(m_element1); 88 visitor->trace(m_element1);
89 visitor->trace(m_element2); 89 visitor->trace(m_element2);
90 visitor->trace(m_atChild); 90 visitor->trace(m_atChild);
91 SimpleEditCommand::trace(visitor); 91 SimpleEditCommand::trace(visitor);
92 } 92 }
93 93
94 } // namespace blink 94 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698