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

Side by Side Diff: Source/core/html/parser/HTMLPreloadScanner.cpp

Issue 133273007: Revert "Moved text decoding to the parser thread" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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/html/parser/HTMLParserIdioms.cpp ('k') | Source/core/html/parser/HTMLTokenizer.h » ('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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 ASSERT(isMainThread()); // HTMLTokenizer::updateStateFor only works on the m ain thread. 392 ASSERT(isMainThread()); // HTMLTokenizer::updateStateFor only works on the m ain thread.
393 393
394 // When we start scanning, our best prediction of the baseElementURL is the real one! 394 // When we start scanning, our best prediction of the baseElementURL is the real one!
395 if (!startingBaseElementURL.isEmpty()) 395 if (!startingBaseElementURL.isEmpty())
396 m_scanner.setPredictedBaseElementURL(startingBaseElementURL); 396 m_scanner.setPredictedBaseElementURL(startingBaseElementURL);
397 397
398 PreloadRequestStream requests; 398 PreloadRequestStream requests;
399 399
400 while (m_tokenizer->nextToken(m_source, m_token)) { 400 while (m_tokenizer->nextToken(m_source, m_token)) {
401 if (m_token.type() == HTMLToken::StartTag) 401 if (m_token.type() == HTMLToken::StartTag)
402 m_tokenizer->updateStateFor(attemptStaticStringCreation(m_token.name (), Likely8Bit)); 402 m_tokenizer->updateStateFor(AtomicString(m_token.name()));
403 m_scanner.scan(m_token, m_source, requests); 403 m_scanner.scan(m_token, m_source, requests);
404 m_token.clear(); 404 m_token.clear();
405 } 405 }
406 406
407 preloader->takeAndPreload(requests); 407 preloader->takeAndPreload(requests);
408 } 408 }
409 409
410 } 410 }
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLParserIdioms.cpp ('k') | Source/core/html/parser/HTMLTokenizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698