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

Side by Side Diff: sky/engine/core/html/parser/HTMLDocumentParser.cpp

Issue 676763003: Remove BackgroundHTMLInputStream (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/html/parser/HTMLDocumentParser.h ('k') | no next file » | 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) 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 ASSERT(shouldUseThreading()); 315 ASSERT(shouldUseThreading());
316 ASSERT(!m_tokenizer); 316 ASSERT(!m_tokenizer);
317 ASSERT(!m_token); 317 ASSERT(!m_token);
318 ASSERT(!m_lastChunkBeforeScript); 318 ASSERT(!m_lastChunkBeforeScript);
319 319
320 ActiveParserSession session(contextForParsingSession()); 320 ActiveParserSession session(contextForParsingSession());
321 321
322 OwnPtr<ParsedChunk> chunk(popChunk); 322 OwnPtr<ParsedChunk> chunk(popChunk);
323 OwnPtr<CompactHTMLTokenStream> tokens = chunk->tokens.release(); 323 OwnPtr<CompactHTMLTokenStream> tokens = chunk->tokens.release();
324 324
325 HTMLParserThread::taskRunner()->PostTask(FROM_HERE,
326 base::Bind(&BackgroundHTMLParser::startedChunkWithCheckpoint, m_backgrou ndParser, chunk->inputCheckpoint));
327
328 for (Vector<CompactHTMLToken>::const_iterator it = tokens->begin(); it != to kens->end(); ++it) { 325 for (Vector<CompactHTMLToken>::const_iterator it = tokens->begin(); it != to kens->end(); ++it) {
329 ASSERT(!isWaitingForScripts()); 326 ASSERT(!isWaitingForScripts());
330 327
331 m_textPosition = it->textPosition(); 328 m_textPosition = it->textPosition();
332 329
333 constructTreeFromCompactHTMLToken(*it); 330 constructTreeFromCompactHTMLToken(*it);
334 331
335 if (isStopped()) 332 if (isStopped())
336 break; 333 break;
337 334
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 741
745 if (m_haveBackgroundParser) { 742 if (m_haveBackgroundParser) {
746 HTMLParserThread::taskRunner()->PostTask(FROM_HERE, 743 HTMLParserThread::taskRunner()->PostTask(FROM_HERE,
747 base::Bind(&BackgroundHTMLParser::flush, m_backgroundParser)); 744 base::Bind(&BackgroundHTMLParser::flush, m_backgroundParser));
748 } else { 745 } else {
749 DecodedDataDocumentParser::flush(); 746 DecodedDataDocumentParser::flush();
750 } 747 }
751 } 748 }
752 749
753 } 750 }
OLDNEW
« no previous file with comments | « sky/engine/core/html/parser/HTMLDocumentParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698