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

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

Issue 2470233009: WTF/std normalization: replace WTF::Vector::first() with ::front() (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) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 // ApplicationCache needs to be initialized before issuing preloads. We 322 // ApplicationCache needs to be initialized before issuing preloads. We
323 // suspend preload until HTMLHTMLElement is inserted and ApplicationCache is 323 // suspend preload until HTMLHTMLElement is inserted and ApplicationCache is
324 // initialized. Note: link rel preloads don't follow this policy per the spec. 324 // initialized. Note: link rel preloads don't follow this policy per the spec.
325 // These directives should initiate a fetch as fast as possible. 325 // These directives should initiate a fetch as fast as possible.
326 if (!m_triedLoadingLinkHeaders && document()->loader() && 326 if (!m_triedLoadingLinkHeaders && document()->loader() &&
327 !pendingChunks.isEmpty()) { 327 !pendingChunks.isEmpty()) {
328 // Note that on commit, the loader dispatched preloads for all the non-media 328 // Note that on commit, the loader dispatched preloads for all the non-media
329 // links. 329 // links.
330 document()->loader()->dispatchLinkHeaderPreloads( 330 document()->loader()->dispatchLinkHeaderPreloads(
331 &pendingChunks.first()->viewport, LinkLoader::OnlyLoadMedia); 331 &pendingChunks.front()->viewport, LinkLoader::OnlyLoadMedia);
332 m_triedLoadingLinkHeaders = true; 332 m_triedLoadingLinkHeaders = true;
333 } 333 }
334 334
335 // Defer preloads if any of the chunks contains a <meta> csp tag. 335 // Defer preloads if any of the chunks contains a <meta> csp tag.
336 for (auto& chunk : pendingChunks) { 336 for (auto& chunk : pendingChunks) {
337 if (chunk->pendingCSPMetaTokenIndex != TokenizedChunk::noPendingToken) { 337 if (chunk->pendingCSPMetaTokenIndex != TokenizedChunk::noPendingToken) {
338 m_pendingCSPMetaToken = 338 m_pendingCSPMetaToken =
339 &chunk->tokens->at(chunk->pendingCSPMetaTokenIndex); 339 &chunk->tokens->at(chunk->pendingCSPMetaTokenIndex);
340 } 340 }
341 } 341 }
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 case Asynchronous: 1300 case Asynchronous:
1301 m_loadingTaskRunner->postTask( 1301 m_loadingTaskRunner->postTask(
1302 BLINK_FROM_HERE, 1302 BLINK_FROM_HERE,
1303 WTF::bind(function, std::forward<Ps>(parameters)...)); 1303 WTF::bind(function, std::forward<Ps>(parameters)...));
1304 return; 1304 return;
1305 } 1305 }
1306 NOTREACHED(); 1306 NOTREACHED();
1307 } 1307 }
1308 1308
1309 } // namespace blink 1309 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698