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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2012 Google Inc. All rights reserved. 5 * Copyright (C) 2012 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 visitedSharedStyleSheetContents) const { 109 visitedSharedStyleSheetContents) const {
110 features.viewportDependentMediaQueryResults().appendVector( 110 features.viewportDependentMediaQueryResults().appendVector(
111 m_viewportDependentMediaQueryResults); 111 m_viewportDependentMediaQueryResults);
112 features.deviceDependentMediaQueryResults().appendVector( 112 features.deviceDependentMediaQueryResults().appendVector(
113 m_deviceDependentMediaQueryResults); 113 m_deviceDependentMediaQueryResults);
114 114
115 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) { 115 for (size_t i = 0; i < m_authorStyleSheets.size(); ++i) {
116 ASSERT(m_authorStyleSheets[i]->ownerNode()); 116 ASSERT(m_authorStyleSheets[i]->ownerNode());
117 StyleSheetContents* contents = m_authorStyleSheets[i]->contents(); 117 StyleSheetContents* contents = m_authorStyleSheets[i]->contents();
118 if (contents->hasOneClient() || 118 if (contents->hasOneClient() ||
119 visitedSharedStyleSheetContents.add(contents).isNewEntry) 119 visitedSharedStyleSheetContents.insert(contents).isNewEntry)
120 features.add(contents->ruleSet().features()); 120 features.add(contents->ruleSet().features());
121 } 121 }
122 122
123 if (!m_treeBoundaryCrossingRuleSet) 123 if (!m_treeBoundaryCrossingRuleSet)
124 return; 124 return;
125 125
126 for (const auto& rules : *m_treeBoundaryCrossingRuleSet) 126 for (const auto& rules : *m_treeBoundaryCrossingRuleSet)
127 features.add(rules->m_ruleSet->features()); 127 features.add(rules->m_ruleSet->features());
128 } 128 }
129 129
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 } 319 }
320 return true; 320 return true;
321 } 321 }
322 322
323 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) { 323 DEFINE_TRACE(ScopedStyleResolver::RuleSubSet) {
324 visitor->trace(m_parentStyleSheet); 324 visitor->trace(m_parentStyleSheet);
325 visitor->trace(m_ruleSet); 325 visitor->trace(m_ruleSet);
326 } 326 }
327 327
328 } // namespace blink 328 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698