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

Side by Side Diff: third_party/WebKit/Source/core/dom/CSSSelectorWatch.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 for (const auto& selector : selectors) { 152 for (const auto& selector : selectors) {
153 CSSSelectorList selectorList = CSSParser::parseSelector( 153 CSSSelectorList selectorList = CSSParser::parseSelector(
154 CSSParserContext(UASheetMode, nullptr), nullptr, selector); 154 CSSParserContext(UASheetMode, nullptr), nullptr, selector);
155 if (!selectorList.isValid()) 155 if (!selectorList.isValid())
156 continue; 156 continue;
157 157
158 // Only accept Compound Selectors, since they're cheaper to match. 158 // Only accept Compound Selectors, since they're cheaper to match.
159 if (!allCompound(selectorList)) 159 if (!allCompound(selectorList))
160 continue; 160 continue;
161 161
162 m_watchedCallbackSelectors.append( 162 m_watchedCallbackSelectors.push_back(
163 StyleRule::create(std::move(selectorList), callbackPropertySet)); 163 StyleRule::create(std::move(selectorList), callbackPropertySet));
164 } 164 }
165 document().styleEngine().watchedSelectorsChanged(); 165 document().styleEngine().watchedSelectorsChanged();
166 } 166 }
167 167
168 DEFINE_TRACE(CSSSelectorWatch) { 168 DEFINE_TRACE(CSSSelectorWatch) {
169 visitor->trace(m_watchedCallbackSelectors); 169 visitor->trace(m_watchedCallbackSelectors);
170 visitor->trace(m_document); 170 visitor->trace(m_document);
171 Supplement<Document>::trace(visitor); 171 Supplement<Document>::trace(visitor);
172 } 172 }
173 173
174 } // namespace blink 174 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/AttributeCollection.h ('k') | third_party/WebKit/Source/core/dom/CSSSelectorWatchTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698