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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2004343002: Remove unwanted copyToVector() uses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused typedef Created 4 years, 6 months 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 2098 matching lines...) Expand 10 before | Expand all | Expand 10 after
2109 m_useElementsNeedingUpdate.remove(&element); 2109 m_useElementsNeedingUpdate.remove(&element);
2110 } 2110 }
2111 2111
2112 void Document::updateUseShadowTreesIfNeeded() 2112 void Document::updateUseShadowTreesIfNeeded()
2113 { 2113 {
2114 ScriptForbiddenScope forbidScript; 2114 ScriptForbiddenScope forbidScript;
2115 2115
2116 if (m_useElementsNeedingUpdate.isEmpty()) 2116 if (m_useElementsNeedingUpdate.isEmpty())
2117 return; 2117 return;
2118 2118
2119 HeapVector<Member<SVGUseElement>> elements; 2119 HeapHashSet<Member<SVGUseElement>> elements;
2120 copyToVector(m_useElementsNeedingUpdate, elements); 2120 m_useElementsNeedingUpdate.swap(elements);
2121 m_useElementsNeedingUpdate.clear();
2122
2123 for (SVGUseElement* element : elements) 2121 for (SVGUseElement* element : elements)
2124 element->buildPendingResource(); 2122 element->buildPendingResource();
2125 } 2123 }
2126 2124
2127 StyleResolver* Document::styleResolver() const 2125 StyleResolver* Document::styleResolver() const
2128 { 2126 {
2129 return m_styleEngine->resolver(); 2127 return m_styleEngine->resolver();
2130 } 2128 }
2131 2129
2132 StyleResolver& Document::ensureStyleResolver() const 2130 StyleResolver& Document::ensureStyleResolver() const
(...skipping 3882 matching lines...) Expand 10 before | Expand all | Expand 10 after
6015 #ifndef NDEBUG 6013 #ifndef NDEBUG
6016 using namespace blink; 6014 using namespace blink;
6017 void showLiveDocumentInstances() 6015 void showLiveDocumentInstances()
6018 { 6016 {
6019 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 6017 Document::WeakDocumentSet& set = Document::liveDocumentSet();
6020 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6018 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6021 for (Document* document : set) 6019 for (Document* document : set)
6022 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6020 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6023 } 6021 }
6024 #endif 6022 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698