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

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

Issue 532343002: Progress HTMLDocumentParser state on non-interrupted cases (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | 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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 void HTMLDocumentParser::end() 821 void HTMLDocumentParser::end()
822 { 822 {
823 ASSERT(!isDetached()); 823 ASSERT(!isDetached());
824 ASSERT(!isScheduledForResume()); 824 ASSERT(!isScheduledForResume());
825 825
826 if (m_haveBackgroundParser) 826 if (m_haveBackgroundParser)
827 stopBackgroundParser(); 827 stopBackgroundParser();
828 828
829 // Informs the the rest of WebCore that parsing is really finished (and dele tes this). 829 // Informs the the rest of WebCore that parsing is really finished (and dele tes this).
830 m_treeBuilder->finished(); 830 m_treeBuilder->finished();
831
832 DocumentParser::stopParsing();
831 } 833 }
832 834
833 void HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd() 835 void HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd()
834 { 836 {
835 ASSERT(isStopping()); 837 ASSERT(isStopping());
836 // FIXME: It may not be correct to disable this for the background parser. 838 // FIXME: It may not be correct to disable this for the background parser.
837 // That means hasInsertionPoint() may not be correct in some cases. 839 // That means hasInsertionPoint() may not be correct in some cases.
838 ASSERT(!hasInsertionPoint() || m_haveBackgroundParser); 840 ASSERT(!hasInsertionPoint() || m_haveBackgroundParser);
839 if (m_scriptRunner && !m_scriptRunner->executeScriptsWaitingForParsing()) 841 if (m_scriptRunner && !m_scriptRunner->executeScriptsWaitingForParsing())
840 return; 842 return;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) 1071 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder)
1070 { 1072 {
1071 ASSERT(decoder); 1073 ASSERT(decoder);
1072 DecodedDataDocumentParser::setDecoder(decoder); 1074 DecodedDataDocumentParser::setDecoder(decoder);
1073 1075
1074 if (m_haveBackgroundParser) 1076 if (m_haveBackgroundParser)
1075 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco der, m_backgroundParser, takeDecoder())); 1077 HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::setDeco der, m_backgroundParser, takeDecoder()));
1076 } 1078 }
1077 1079
1078 } 1080 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698