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

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

Issue 2776203002: Migrate WTF::Vector::remove() to ::erase() (Closed)
Patch Set: rebase, repatch VectorTest Created 3 years, 8 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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 5876 matching lines...) Expand 10 before | Expand all | Expand 10 after
5887 m_topLayerElements.push_back(element); 5887 m_topLayerElements.push_back(element);
5888 } 5888 }
5889 element->setIsInTopLayer(true); 5889 element->setIsInTopLayer(true);
5890 } 5890 }
5891 5891
5892 void Document::removeFromTopLayer(Element* element) { 5892 void Document::removeFromTopLayer(Element* element) {
5893 if (!element->isInTopLayer()) 5893 if (!element->isInTopLayer())
5894 return; 5894 return;
5895 size_t position = m_topLayerElements.find(element); 5895 size_t position = m_topLayerElements.find(element);
5896 DCHECK_NE(position, kNotFound); 5896 DCHECK_NE(position, kNotFound);
5897 m_topLayerElements.remove(position); 5897 m_topLayerElements.erase(position);
5898 element->setIsInTopLayer(false); 5898 element->setIsInTopLayer(false);
5899 } 5899 }
5900 5900
5901 HTMLDialogElement* Document::activeModalDialog() const { 5901 HTMLDialogElement* Document::activeModalDialog() const {
5902 if (m_topLayerElements.isEmpty()) 5902 if (m_topLayerElements.isEmpty())
5903 return 0; 5903 return 0;
5904 return toHTMLDialogElement(m_topLayerElements.back().get()); 5904 return toHTMLDialogElement(m_topLayerElements.back().get());
5905 } 5905 }
5906 5906
5907 void Document::exitPointerLock() { 5907 void Document::exitPointerLock() {
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
6669 } 6669 }
6670 6670
6671 void showLiveDocumentInstances() { 6671 void showLiveDocumentInstances() {
6672 WeakDocumentSet& set = liveDocumentSet(); 6672 WeakDocumentSet& set = liveDocumentSet();
6673 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6673 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6674 for (blink::Document* document : set) 6674 for (blink::Document* document : set)
6675 fprintf(stderr, "- Document %p URL: %s\n", document, 6675 fprintf(stderr, "- Document %p URL: %s\n", document,
6676 document->url().getString().utf8().data()); 6676 document->url().getString().utf8().data());
6677 } 6677 }
6678 #endif 6678 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/AttributeCollection.h ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698