Lines Matching defs:newList
145 Vector<OwnPtr<Digest> > newList;
147 newList.append(createDigest(child, 0));
153 newList.append(createDigest(child, &m_unusedNodesMap));
156 newList.append(createDigest(child, 0));
158 if (!innerPatchChildren(parentNode, oldList, newList, exceptionState)) {
215 DOMPatchSupport::diff(const Vector<OwnPtr<Digest> >& oldList, const Vector<OwnPtr<Digest> >& newList)
217 ResultMap newMap(newList.size());
231 for (size_t i = 0; i < oldList.size() && i < newList.size() && oldList[i]->m_sha1 == newList[i]->m_sha1; ++i) {
234 newMap[i].first = newList[i].get();
237 for (size_t i = 0; i < oldList.size() && i < newList.size() && oldList[oldList.size() - i - 1]->m_sha1 == newList[newList.size() - i - 1]->m_sha1; ++i) {
239 size_t newIndex = newList.size() - i - 1;
242 newMap[newIndex].first = newList[newIndex].get();
250 for (size_t i = 0; i < newList.size(); ++i) {
251 newTable.add(newList[i]->m_sha1, Vector<size_t>()).storedValue->value.append(i);
266 newMap[newIt->value[0]] = std::make_pair(newList[newIt->value[0]].get(), oldIt->value[0]);
270 for (size_t i = 0; newList.size() > 0 && i < newList.size() - 1; ++i) {
275 if (j < oldMap.size() && !oldMap[j].first && newList[i + 1]->m_sha1 == oldList[j]->m_sha1) {
276 newMap[i + 1] = std::make_pair(newList[i + 1].get(), j);
281 for (size_t i = newList.size() - 1; newList.size() > 0 && i > 0; --i) {
286 if (!oldMap[j].first && newList[i - 1]->m_sha1 == oldList[j]->m_sha1) {
287 newMap[i - 1] = std::make_pair(newList[i - 1].get(), j);
300 bool DOMPatchSupport::innerPatchChildren(ContainerNode* parentNode, const Vector<OwnPtr<Digest> >& oldList, const Vector<OwnPtr<Digest> >& newList, ExceptionState& exceptionState)
302 pair<ResultMap, ResultMap> resultMaps = diff(oldList, newList);
335 if (anchorAfter - anchorCandidate == 1 && anchorCandidate < newList.size())
336 merges.set(newList[anchorCandidate].get(), oldList[i].get());
349 for (size_t i = 0; i < newList.size(); ++i) {
365 for (size_t i = 0; i < newList.size(); ++i) {
366 if (oldHead && isHTMLHeadElement(*newList[i]->m_node))
367 merges.set(newList[i].get(), oldHead);
368 if (oldBody && isHTMLBodyElement(*newList[i]->m_node))
369 merges.set(newList[i].get(), oldBody);
381 if (newMap[i].first || merges.contains(newList[i].get()))
383 if (!insertBeforeAndMarkAsUsed(parentNode, newList[i].get(), parentNode->traverseToChildAt(i), exceptionState))