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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp

Issue 2583233002: Migrate WTF::Vector::append() to ::push_back() [part 7 of N] (Closed)
Patch Set: 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) 2008, 2010 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/
4 * Copyright (C) 2010 Google Inc. All Rights Reserved. 4 * Copyright (C) 2010 Google Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 void CSSPreloadScanner::emitRule(const SegmentedString& source) { 231 void CSSPreloadScanner::emitRule(const SegmentedString& source) {
232 if (equalIgnoringCase(m_rule, "import")) { 232 if (equalIgnoringCase(m_rule, "import")) {
233 String url = parseCSSStringOrURL(m_ruleValue.toString()); 233 String url = parseCSSStringOrURL(m_ruleValue.toString());
234 TextPosition position = 234 TextPosition position =
235 TextPosition(source.currentLine(), source.currentColumn()); 235 TextPosition(source.currentLine(), source.currentColumn());
236 auto request = PreloadRequest::createIfNeeded( 236 auto request = PreloadRequest::createIfNeeded(
237 FetchInitiatorTypeNames::css, position, url, *m_predictedBaseElementURL, 237 FetchInitiatorTypeNames::css, position, url, *m_predictedBaseElementURL,
238 Resource::CSSStyleSheet, m_referrerPolicy); 238 Resource::CSSStyleSheet, m_referrerPolicy);
239 if (request) { 239 if (request) {
240 // FIXME: Should this be including the charset in the preload request? 240 // FIXME: Should this be including the charset in the preload request?
241 m_requests->append(std::move(request)); 241 m_requests->push_back(std::move(request));
242 } 242 }
243 m_state = Initial; 243 m_state = Initial;
244 } else if (equalIgnoringCase(m_rule, "charset")) 244 } else if (equalIgnoringCase(m_rule, "charset"))
245 m_state = Initial; 245 m_state = Initial;
246 else 246 else
247 m_state = DoneParsingImportRules; 247 m_state = DoneParsingImportRules;
248 m_rule.clear(); 248 m_rule.clear();
249 m_ruleValue.clear(); 249 m_ruleValue.clear();
250 } 250 }
251 251
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 m_resource.clear(); 343 m_resource.clear();
344 } 344 }
345 345
346 DEFINE_TRACE(CSSPreloaderResourceClient) { 346 DEFINE_TRACE(CSSPreloaderResourceClient) {
347 visitor->trace(m_preloader); 347 visitor->trace(m_preloader);
348 visitor->trace(m_resource); 348 visitor->trace(m_resource);
349 StyleSheetResourceClient::trace(visitor); 349 StyleSheetResourceClient::trace(visitor);
350 } 350 }
351 351
352 } // namespace blink 352 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698