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

Side by Side Diff: Source/core/dom/StyleEngine.cpp

Issue 150653006: Remove the Vector::append overload that takes a Vector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 10 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
« no previous file with comments | « Source/core/dom/Range.cpp ('k') | Source/core/dom/StyleSheetCollection.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 return requiresFullStyleRecalc; 401 return requiresFullStyleRecalc;
402 } 402 }
403 403
404 const Vector<RefPtr<StyleSheet> > StyleEngine::activeStyleSheetsForInspector() c onst 404 const Vector<RefPtr<StyleSheet> > StyleEngine::activeStyleSheetsForInspector() c onst
405 { 405 {
406 if (m_activeTreeScopes.isEmpty()) 406 if (m_activeTreeScopes.isEmpty())
407 return m_documentStyleSheetCollection.styleSheetsForStyleSheetList(); 407 return m_documentStyleSheetCollection.styleSheetsForStyleSheetList();
408 408
409 Vector<RefPtr<StyleSheet> > activeStyleSheets; 409 Vector<RefPtr<StyleSheet> > activeStyleSheets;
410 410
411 activeStyleSheets.append(m_documentStyleSheetCollection.styleSheetsForStyleS heetList()); 411 activeStyleSheets.appendVector(m_documentStyleSheetCollection.styleSheetsFor StyleSheetList());
412 412
413 TreeScopeSet::const_iterator begin = m_activeTreeScopes.begin(); 413 TreeScopeSet::const_iterator begin = m_activeTreeScopes.begin();
414 TreeScopeSet::const_iterator end = m_activeTreeScopes.end(); 414 TreeScopeSet::const_iterator end = m_activeTreeScopes.end();
415 for (TreeScopeSet::const_iterator it = begin; it != end; ++it) { 415 for (TreeScopeSet::const_iterator it = begin; it != end; ++it) {
416 if (TreeScopeStyleSheetCollection* collection = m_styleSheetCollectionMa p.get(*it)) 416 if (TreeScopeStyleSheetCollection* collection = m_styleSheetCollectionMa p.get(*it))
417 activeStyleSheets.append(collection->styleSheetsForStyleSheetList()) ; 417 activeStyleSheets.appendVector(collection->styleSheetsForStyleSheetL ist());
418 } 418 }
419 419
420 // FIXME: Inspector needs a vector which has all active stylesheets. 420 // FIXME: Inspector needs a vector which has all active stylesheets.
421 // However, creating such a large vector might cause performance regression. 421 // However, creating such a large vector might cause performance regression.
422 // Need to implement some smarter solution. 422 // Need to implement some smarter solution.
423 return activeStyleSheets; 423 return activeStyleSheets;
424 } 424 }
425 425
426 void StyleEngine::didRemoveShadowRoot(ShadowRoot* shadowRoot) 426 void StyleEngine::didRemoveShadowRoot(ShadowRoot* shadowRoot)
427 { 427 {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 { 610 {
611 HashMap<StyleSheetContents*, AtomicString>::iterator it = sheetToTextCache() .find(contents); 611 HashMap<StyleSheetContents*, AtomicString>::iterator it = sheetToTextCache() .find(contents);
612 if (it == sheetToTextCache().end()) 612 if (it == sheetToTextCache().end())
613 return; 613 return;
614 614
615 textToSheetCache().remove(it->value); 615 textToSheetCache().remove(it->value);
616 sheetToTextCache().remove(contents); 616 sheetToTextCache().remove(contents);
617 } 617 }
618 618
619 } 619 }
OLDNEW
« no previous file with comments | « Source/core/dom/Range.cpp ('k') | Source/core/dom/StyleSheetCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698