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

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

Issue 141143007: Revert of Revert "Moved text decoding to the parser thread" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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
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 22 matching lines...) Expand all
33 #include "core/html/parser/BackgroundHTMLInputStream.h" 33 #include "core/html/parser/BackgroundHTMLInputStream.h"
34 #include "core/html/parser/CompactHTMLToken.h" 34 #include "core/html/parser/CompactHTMLToken.h"
35 #include "core/html/parser/HTMLInputStream.h" 35 #include "core/html/parser/HTMLInputStream.h"
36 #include "core/html/parser/HTMLParserOptions.h" 36 #include "core/html/parser/HTMLParserOptions.h"
37 #include "core/html/parser/HTMLPreloadScanner.h" 37 #include "core/html/parser/HTMLPreloadScanner.h"
38 #include "core/html/parser/HTMLScriptRunnerHost.h" 38 #include "core/html/parser/HTMLScriptRunnerHost.h"
39 #include "core/html/parser/HTMLSourceTracker.h" 39 #include "core/html/parser/HTMLSourceTracker.h"
40 #include "core/html/parser/HTMLToken.h" 40 #include "core/html/parser/HTMLToken.h"
41 #include "core/html/parser/HTMLTokenizer.h" 41 #include "core/html/parser/HTMLTokenizer.h"
42 #include "core/html/parser/HTMLTreeBuilderSimulator.h" 42 #include "core/html/parser/HTMLTreeBuilderSimulator.h"
43 #include "core/html/parser/TextResourceDecoder.h"
43 #include "core/html/parser/XSSAuditor.h" 44 #include "core/html/parser/XSSAuditor.h"
44 #include "core/html/parser/XSSAuditorDelegate.h" 45 #include "core/html/parser/XSSAuditorDelegate.h"
45 #include "platform/text/SegmentedString.h" 46 #include "platform/text/SegmentedString.h"
46 #include "wtf/Deque.h" 47 #include "wtf/Deque.h"
47 #include "wtf/OwnPtr.h" 48 #include "wtf/OwnPtr.h"
48 #include "wtf/WeakPtr.h" 49 #include "wtf/WeakPtr.h"
49 #include "wtf/text/TextPosition.h" 50 #include "wtf/text/TextPosition.h"
50 51
51 namespace WebCore { 52 namespace WebCore {
52 53
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 struct ParsedChunk { 90 struct ParsedChunk {
90 OwnPtr<CompactHTMLTokenStream> tokens; 91 OwnPtr<CompactHTMLTokenStream> tokens;
91 PreloadRequestStream preloads; 92 PreloadRequestStream preloads;
92 XSSInfoStream xssInfos; 93 XSSInfoStream xssInfos;
93 HTMLTokenizer::State tokenizerState; 94 HTMLTokenizer::State tokenizerState;
94 HTMLTreeBuilderSimulator::State treeBuilderState; 95 HTMLTreeBuilderSimulator::State treeBuilderState;
95 HTMLInputCheckpoint inputCheckpoint; 96 HTMLInputCheckpoint inputCheckpoint;
96 TokenPreloadScannerCheckpoint preloadScannerCheckpoint; 97 TokenPreloadScannerCheckpoint preloadScannerCheckpoint;
97 }; 98 };
98 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>); 99 void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>);
100 void didReceiveEncodingDataFromBackgroundParser(const DocumentEncodingData&) ;
101
102 virtual void appendBytes(const char* bytes, size_t length) OVERRIDE;
103 virtual void flush() OVERRIDE FINAL;
104 virtual void setDecoder(PassOwnPtr<TextResourceDecoder>) OVERRIDE FINAL;
99 105
100 UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSessi on()); } 106 UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSessi on()); }
101 107
102 protected: 108 protected:
103 virtual void insert(const SegmentedString&) OVERRIDE FINAL; 109 virtual void insert(const SegmentedString&) OVERRIDE FINAL;
104 virtual void append(PassRefPtr<StringImpl>) OVERRIDE; 110 virtual void append(PassRefPtr<StringImpl>) OVERRIDE;
105 virtual void finish() OVERRIDE FINAL; 111 virtual void finish() OVERRIDE FINAL;
106 112
107 HTMLDocumentParser(HTMLDocument*, bool reportErrors); 113 HTMLDocumentParser(HTMLDocument*, bool reportErrors);
108 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent Policy); 114 HTMLDocumentParser(DocumentFragment*, Element* contextElement, ParserContent Policy);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 205
200 bool m_isPinnedToMainThread; 206 bool m_isPinnedToMainThread;
201 bool m_endWasDelayed; 207 bool m_endWasDelayed;
202 bool m_haveBackgroundParser; 208 bool m_haveBackgroundParser;
203 unsigned m_pumpSessionNestingLevel; 209 unsigned m_pumpSessionNestingLevel;
204 }; 210 };
205 211
206 } 212 }
207 213
208 #endif 214 #endif
OLDNEW
« no previous file with comments | « Source/core/html/parser/CSSPreloadScanner.h ('k') | Source/core/html/parser/HTMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698