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

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

Issue 2574773002: Migrate WTF::Vector::append() to ::push_back() [part 4 of N] (Closed)
Patch Set: rebase 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) 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, 2010, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 void StyleSheetCollection::swapSheetsForSheetList( 48 void StyleSheetCollection::swapSheetsForSheetList(
49 HeapVector<Member<StyleSheet>>& sheets) { 49 HeapVector<Member<StyleSheet>>& sheets) {
50 // Only called for collection of HTML Imports that never has active sheets. 50 // Only called for collection of HTML Imports that never has active sheets.
51 DCHECK(m_activeAuthorStyleSheets.isEmpty()); 51 DCHECK(m_activeAuthorStyleSheets.isEmpty());
52 ::blink::swap(m_styleSheetsForStyleSheetList, sheets, this); 52 ::blink::swap(m_styleSheetsForStyleSheetList, sheets, this);
53 } 53 }
54 54
55 void StyleSheetCollection::appendActiveStyleSheet(CSSStyleSheet* sheet) { 55 void StyleSheetCollection::appendActiveStyleSheet(CSSStyleSheet* sheet) {
56 m_activeAuthorStyleSheets.append(sheet); 56 m_activeAuthorStyleSheets.push_back(sheet);
57 } 57 }
58 58
59 void StyleSheetCollection::appendActiveStyleSheets( 59 void StyleSheetCollection::appendActiveStyleSheets(
60 const HeapVector<Member<CSSStyleSheet>>& sheets) { 60 const HeapVector<Member<CSSStyleSheet>>& sheets) {
61 m_activeAuthorStyleSheets.appendVector(sheets); 61 m_activeAuthorStyleSheets.appendVector(sheets);
62 } 62 }
63 63
64 void StyleSheetCollection::appendActiveStyleSheets( 64 void StyleSheetCollection::appendActiveStyleSheets(
65 const HeapVector<TraceWrapperMember<CSSStyleSheet>>& sheets) { 65 const HeapVector<TraceWrapperMember<CSSStyleSheet>>& sheets) {
66 for (CSSStyleSheet* sheet : sheets) { 66 for (CSSStyleSheet* sheet : sheets) {
67 m_activeAuthorStyleSheets.append(sheet); 67 m_activeAuthorStyleSheets.push_back(sheet);
68 } 68 }
69 } 69 }
70 70
71 void StyleSheetCollection::appendSheetForList(StyleSheet* sheet) { 71 void StyleSheetCollection::appendSheetForList(StyleSheet* sheet) {
72 m_styleSheetsForStyleSheetList.append( 72 m_styleSheetsForStyleSheetList.push_back(
73 TraceWrapperMember<StyleSheet>(this, sheet)); 73 TraceWrapperMember<StyleSheet>(this, sheet));
74 } 74 }
75 75
76 DEFINE_TRACE(StyleSheetCollection) { 76 DEFINE_TRACE(StyleSheetCollection) {
77 visitor->trace(m_activeAuthorStyleSheets); 77 visitor->trace(m_activeAuthorStyleSheets);
78 visitor->trace(m_styleSheetsForStyleSheetList); 78 visitor->trace(m_styleSheetsForStyleSheetList);
79 } 79 }
80 80
81 DEFINE_TRACE_WRAPPERS(StyleSheetCollection) { 81 DEFINE_TRACE_WRAPPERS(StyleSheetCollection) {
82 for (auto sheet : m_styleSheetsForStyleSheetList) { 82 for (auto sheet : m_styleSheetsForStyleSheetList) {
83 visitor->traceWrappers(sheet); 83 visitor->traceWrappers(sheet);
84 } 84 }
85 } 85 }
86 86
87 } // namespace blink 87 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.cpp ('k') | third_party/WebKit/Source/core/dom/TouchList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698